Board | U-Boot package | WiFi package(s) | Bootlog |
---|---|---|---|
OrangePi Zero Plus | uboot-orangepi-zero |
rtl8189fs-dkms |
here |
OrangePi PC2 | uboot-orangepi-pc2 |
N/A | here |
NanoPi Neo2 | uboot-nanopi-neo2 |
N/A | here 1G |
Theese bootloaders are ready to apply additional DT overlays from Armbian's Device Tree overlays for sunxi devices. See this repository for more info.
Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.
- Zero the beginning of the SD card:
dd if=/dev/zero of=/dev/sdX bs=1M count=8
- Start fdisk to partition the SD card:
fdisk /dev/sdX
- At the fdisk prompt, create the new partition:
- Type o. This will clear out any partitions on the drive.
- Type p to list partitions. There should be no partitions left.
- Type n, then p for primary, 1 for the first partition on the drive, 4096 for the first sector, and then press ENTER to accept the default last sector.
- Write the partition table and exit by typing w.
- Create the ext4 filesystem:
mkfs.ext4 /dev/sdX1
- Mount the filesystem:
mkdir root mount /dev/sdX1 root
- Download and extract the root filesystem:
wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C root
- Download appropriate U-Boot package from releases:
wget https://github.com/RoEdAl/alarm-uboot-sunxi-aarch64/releases/download/vyyy.mm-r/uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz
- Extract required U-Boot binary and compiled script from package:
bsdtar -xf uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz boot/u-boot-sunxi-with-spl.bin boot/boot.scr
- Install the U-Boot bootloader:
dd if=boot/u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8k seek=1 cp boot/boot.scr root/boot sync
- Umount the partition:
umount root
- Insert the micro SD card into the board, connect ethernet, and apply 5V power.
- Use the serial console or SSH to the IP address given to the board by your router.
- Login as the default user alarm with the password alarm.
- The default root password is root.
- After logging into the system initialize the pacman keyring and populate the Arch Linux ARM package signing keys:
pacman-key --init pacman-key --populate archlinuxarm
- Install U-Boot package:
wget https://github.com/RoEdAl/alarm-uboot-sunxi-aarch64/releases/download/vx-y/uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz pacman -U uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz
Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.
- Zero the beginning of the SD card:
dd if=/dev/zero of=/dev/sdX bs=1M count=8
- Start fdisk to partition the SD card:
fdisk /dev/sdX
- At the fdisk prompt, create the new partition:
- Type o. This will clear out any partitions on the drive.
- Type p to list partitions. There should be no partitions left.
- Type n, then p for primary, 1 for the first partition on the drive, 4096 for the first sector, and then type +256M for the last sector.
- Type n, then p for primary, 2 for the second partition on the drive, 528384 for the first sector, and then press ENTER to accept the default last sector.
- Write the partition table and exit by typing w.
- Create the boot filesystem:
mkfs.ext4 /dev/sdX1 -O ^has_journal,^ext_attr,^huge_file -m 0
- Mount the filesystem:
mkdir boot mount /dev/sdX1 boot
- Create the root filesystem:
mkfs.f2fs /dev/sdX2
- Mount the filesystem:
mkdir root mount /dev/sdX2 root
- Download and extract the root filesystem:
wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C root
- Move boot files to the first partition
mv root/boot/* boot
- Download appropriate U-Boot package from releases:
wget https://github.com/RoEdAl/alarm-uboot-sunxi-aarch64/releases/download/vyyy.mm-r/uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz
- Extract required U-Boot binary and compiled script from package:
bsdtar -xf uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz boot/u-boot-sunxi-with-spl.bin boot/boot.scr
- Install the U-Boot bootloader:
dd if=boot/u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8k seek=1 sync rm boot/u-boot-sunxi-with-spl.bin
- Inform bootloader that root filestystem is on second partition:
touch boot/root-is-on-2nd-partition
- Add
fstab
entry to mount boot partition:echo '/dev/mmcblk0p1 /boot ext4 defaults 0 2' >> root/etc/fstab
- Optionally configure systemd-journald service to store log data only in memory:
mkdir -p root/usr/lib/systemd/journald.conf.d echo '[Journal]' > root/usr/lib/systemd/journald.conf.d/storage-volatile.conf echo 'Storage=volatile' >> root/usr/lib/systemd/journald.conf.d/storage-volatile.conf
- Umount the partitions:
umount root boot
- Insert the micro SD card into the board, connect ethernet, and apply 5V power.
- Use the serial console or SSH to the IP address given to the board by your router.
- Login as the default user alarm with the password alarm.
- The default root password is root.
- After logging into the system initialize the pacman keyring and populate the Arch Linux ARM package signing keys:
pacman-key --init pacman-key --populate archlinuxarm
- Install U-Boot package:
wget https://github.com/RoEdAl/alarm-uboot-sunxi-aarch64/releases/download/vx-y/uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz pacman -U uboot-<your board name>-yyyy.mm-r-aarch64.pkg.tar.xz
- Install
f2fs-tools
package and rebuild initcpio:pacman -Syu f2fs-tools mkinitcpio -p linux-aarch64
- Change root filesystem mount flags (optional):
- Edit
/boot/boot.txt
U-Boot script and add following option tobootargs
environment variable:rootflags=nodiscard,relatime,lazytime,background_gc=sync
- Compile modified script and reboot:
cd /boot ./mkscr reboot
- Edit
uboot-*
packages: Due togit-apply
behaviour packages you must builduboot-*
packages outside a git repository. Specify BUILDDIR in~/.makepkg.conf
file.uboot-orangepi-pc2
package:HDMI port is not initialized - no HDMI outputHDMI initialization was added in kernel 4.17.