Our /boot/boot.scr
indeed sets the root=
argument to the filesystems UUID
to work with eMMC, SD card and USB the same way. But petitboot by default, for whatever crappy creason…, replaces this with a /dev/*
line. I thought this would only cause issues with SD card and eMMC, since it replaces the line falsely to wait for an eMMC, when the rootfs is actually on SD card, and the other way round. This is since Hardkernels ancient vendor kernel has /dev/mmcblk0
and /dev/mmcblk1
swapped compared to mainline kernel. But if it even replaces it with /dev/sda1
even that the rootfs is on /dev/sdb1
, then petitboot is more destructive and dumb than I thought.
However, we actually disable this misbehaviour via setenv rootuuid "true"
, as mentioned, which works well on my N2+. But it seems on your HC4 this does not work. Please try the following:
In your /boot/boot.cmd
, the setenv rootuuid "true"
is located within a if test "${petitboot_active}" = "1"; then
block. Possibly, this petitboot_active
variable is for some reason not set in your case. Remove that condition so that
if test "${petitboot_active}" = "1"; then
setenv fdtfile "amlogic/meson-sm1-odroid-${variant}.dtb"
setenv rootuuid "true"
fi
becomes
setenv fdtfile "amlogic/meson-sm1-odroid-${variant}.dtb"
setenv rootuuid "true"
Then recompile the boot.scr
from it:
mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr
Ah, do you have a way to do that e.g. booting the system via SD card with that USB drive attached? I can also generate new images with this condition removed. It doesn’t hurt to set those to variables even when booting via mainline U-Boot.