Since RockPi4 is already using upstream Uboot, I’m wondering what is needed to switch kernels through U-boot.
Currently, the timeout doesn’t really allow user to choose which kernel to boot.
This brings a lot of pain to test kernels. (Have to switch custom compiled kernel to test 64K page size)
As when the default kernel fails, either goes into Uboot input all the kernel/dtbs/initrd and kernel options (pretty long), or remove the sdcard, mount it and modify the extlinux/*.
The later method needs me to access the sdcard, but since I’m also using NVME on that board, the ribbon cable mostly blocks the sdcard slot.
So it will take me over 5mins just to modify the default kernel back to manjaro kernel.
Any good idea on that? IIRC some Uboot build allows kernel selection afaik, and with such feature,
it should allow us to do more testing related to kernel/initrd/dtbs.
The problem is, I created the entry, and change DEFAULT to my new entry, then U-boot indeed defaults to the new initrd/kernel/fdt.
So far so good, but when the kernel doesn’t work (mostly I screw up something), e.g. I forgot to include the rockchip pcie controller or the xfs module, then we fall to initramfs shell.
What I want is, in uboot, allow me to choose between the entries already in the extlinux.conf.
Is it possible? I tried bootmenu command, but that doesn’t work and seems to need extra script other than extlinux.conf payload.
Exactly what I tried. Only the DEFAULT works to switch different labels.
And if I screw up the path of either kernel/fdt/initrd, then U-boot would automatically switch to the manjaro one.
But that’s all.
Firstly, the timeout doesn’t work at all. Uboot always only follow its 3 sec delay. Since it hasn’t yet read the extlinux payload.
Furthermore, if I interrupt the count down of U-boot, it just go back to uboot shell. Not boot entry choosing.
I’m wondering if I missed something or there are some extra options needed in uboot to do that.
Currently the workaround is, fallback to initramfs shell, mount the /boot partition, use vi the change the extlinux payload back to manjaro kernel, and force reboot.
The workflow can be updated to a script, and be passed into the initramfs through mkinitpcio, but that’s still a workaround, far less elegant than uboot boot choose.