Help, this is the result of many hours of trying all sorts of stuff to get the rock64 to boot off a USB using trixie. It was working flawlessly on my bullseye install and broke when I upgraded to the latest dietpi.
– What Works
Rock64 V2, 1GB ram, boots perfectly from SD card with Trixie
Rock64 boots from SD card after SPI U-Boot update
Updated U-Boot package is correctly installed and flashed to SPI
USB drive works perfectly when booted from SD (can mount, read/write)
All multiple Rock64 boards in my possession (I have several)
– What Doesn’t Work
Rock64 will not boot from USB when SD card is removed
Result: All three LEDs solid (red, white, green) = boot failure
No network activity, cannot SSHCreating a bug report/issue
– Verified boot loader install:
root@DietPi:~# dpkg -l | grep linux-u-boot-rock64-current
ii linux-u-boot-rock64-current 26.02.0-trunk-dietpi1 arm64 Das U-Boot for rock64
root@DietPi:~# dd if=/dev/mtd0 bs=1M count=1 2>/dev/null | wc -c
1048576
– Issues found and fixed along the way:
Missing Journal
sudo tune2fs -j /dev/sda1
USB missing boot flag
echo -e "a\n1\nw" | sudo fdisk /dev/sda
Filesystem Not Expanded
# After booting from SD card
echo -e "d\nn\n\n32768\n\nw" | sudo fdisk /dev/sda
sudo e2fsck -f /dev/sda1
sudo resize2fs /dev/sda1
– USB drives, ports and boards
I have multiple boards and multiple USB drives. I tried both USB 2.0 ports. Alwasy solid LED lights.
– Other test
Clone sd card to the USB with dd
# Booted from SD card
sudo dd if=/dev/mmcblk0 of=/dev/sda bs=4M status=progress conv=fsync
# Successfully copied 7.9GB in ~342 seconds
# Then expanded to full USB capacity
echo -e "d\nn\n\n32768\n\nw" | sudo fdisk /dev/sda
sudo e2fsck -f /dev/sda1
sudo resize2fs /dev/sda1
# Re-set boot flag (lost during fdisk operation)
echo -e "a\n1\nw" | sudo fdisk /dev/sda
– Bash command outputs
fdisk
fdisk -l
Disk /dev/mtdblock0: 16 MiB, 16777216 bytes, 32768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x177980de
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 32768 15523839 15491072 7.4G 83 Linux
Disk /dev/sda: 29.88 GiB, 32080200192 bytes, 62656641 sectors
Disk model: Flash Drive FIT
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf7138353
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 32768 62656640 62623873 29.9G 83 Linux
ls /mnt/usb/boot
root@DietPi:~# sudo mount /dev/sda1 /mnt/usb
root@DietPi:~# ls -la /mnt/usb/boot/
total 61144
drwxr-xr-x 4 root root 4096 Dec 16 02:15 .
drwxr-xr-x 19 root root 4096 Dec 16 02:14 ..
lrwxrwxrwx 1 root root 34 Dec 15 07:03 Image -> vmlinuz-6.12.61-current-rockchip64
-rw-r--r-- 1 root root 5561030 Dec 7 17:38 System.map-6.12.61-current-rockchip64
-rw-r--r-- 1 root root 3153 Nov 16 01:56 boot.cmd
-rw-r--r-- 1 root root 3225 Nov 16 01:57 boot.scr
-rw-r--r-- 1 root root 259201 Dec 7 17:38 config-6.12.61-current-rockchip64
drwxr-xr-x 4 root root 4096 Dec 15 07:06 dietpi
-rw-r--r-- 1 root root 18092 Nov 15 23:05 dietpi-LICENSE.txt
-rw-r--r-- 1 root root 16637 Nov 15 23:05 dietpi-README.md
-rw------- 1 root root 3950 Jan 1 2021 dietpi-wifi.txt
-rw-r--r-- 1 root root 19847 Dec 15 07:05 dietpi.txt
-rw-r--r-- 1 root root 370 Jan 1 2021 dietpiEnv.txt
lrwxrwxrwx 1 root root 30 Dec 15 07:03 dtb -> dtb-6.12.61-current-rockchip64
drwxr-xr-x 3 root root 4096 Dec 15 07:00 dtb-6.12.61-current-rockchip64
lrwxrwxrwx 1 root root 37 Dec 15 07:03 initrd.img -> initrd.img-6.12.61-current-rockchip64
-rw-r--r-- 1 root root 18809585 Dec 15 07:03 initrd.img-6.12.61-current-rockchip64
-rw-r--r-- 1 root root 37878272 Dec 7 17:38 vmlinuz-6.12.61-current-rockchip64