Arch on Rock64 with USB boot

- rock64 arm arm64 linux

Here are my notes to install Arch on a Rock64 and boot on USB first.

Warning, you can brick your device (but can unbrick it), you are on your own.

Reboot and remove the USB device


Here is a config for a ext4 /boot and / btrfs.

mount -o noatime,ssd,compress=lzo,subvol=@root /dev/sda2 root
mount /dev/sda1 root/boot
cd root/boot
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr

And the matching boot.txt

# After modifying, run ./mkscr
# MAC address (use spaces instead of colons)
setenv macaddr da 19 c8 7a 6d f4
part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs console=ttyS2,1500000 rootfstype=btrfs root=UUID=7ba94ef7-a453-495a-a93c-a6cdb875b28e rootflags=subvol=@root rw rootwait earlycon=uart8250,mmio32,0xff130000
setenv fdtfile rockchip/rk3328-rock64.dtb
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /Image; then
  if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /dtbs/${fdtfile}; then
    fdt addr ${fdt_addr_r}
    fdt resize
    fdt set /ethernet@ff540000 local-mac-address "[${macaddr}]"
    if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /initramfs-linux.img; then
      booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
      booti ${kernel_addr_r} - ${fdt_addr_r};

Do not used zstd compression for now since it was not available in 4.4 ayufan kernel you may find yourself stuck with a filesystem you cannot read back in older kernel (been there).


I’ve tried mainline 5.1 kernel for days, with a lot of instabilities, memory corruption, compilator crashed.
It looked like cpu overheating problems but was not, simply downgraded to 4.4 ayufan kernel and everything went back to normal.

You can install linux-aarch64-rock64-bin from AUR or used mine more recent AUR packages.


USB 3 port is unstable with ayufan kernel, hopefully it may be fixed in mainline.

Disabling uas for your usb key seems to improve a lot.

Identify your USB storage with lsusb -v

Add usb-storage module loading options identifying your device on your bootargs in /boot/boot.txt

setenv bootargs console=ttyS2,1500000 rootfstype=btrfs root=UUID=c9136915-614c-4203-ba8d-5f2f202ffbcd rootflags=subvol=@root usb-storage.quirks=0x078
1:0x5588:u rw rootwait earlycon=uart8250,mmio32,0xff130000