At least for my OPi5 it was needed to flash SPI to allow USB/NVMe boot. I need to say, I was using Orange Pi Debian for this, as they have a menu option for this
Awesome…will this auto update the uboot if/when kernel is upgraded?
Very very awesome…I hope to be able to get my Orange Pi PC done this way…I know it only runs under USB 2.0…but has to be SO much faster than a stupid SD card…even a class 10 one.
I think for now we’ll just add the option to dietpi-config to manually update/flash U-Boot to the root device and/or SPI. As long as the board boots, there is usually no reason to update the bootloader, as this is its only task. Flashing U-Boot without specific reason (like enabling booting from other devices) on a perfectly functioning device is also a risk, especially with the Armbian U-Boot packages. It happened quite a few times that a new U-Boot build suddenly broke boot. Also Armbian does not automatically flash U-Boot when the package is updated, for the same reason I suppose.
Is there any way to create a script that will put the uboot and image stuff on the SD and have it point to the root partition on the NVME/USB device…this way allowing the SBC’s that don’t have flashable EEPROMS to allow for booting to USB/NVME to be able to have the SD card be the boot device, but have the external faster device be the root device?
I had this “feature” before I updated my Opi5’s bootloader:
Installed my system on a SD card
Copied my whole SD card via dd to the NVMe card (e.g. dd if=/dev/mmcblk0 of=/dev/nvme0n1 bs=1M status=progress)
Rebooted
That led to a state, where the UUIDs, PTUUID, etc. of the SD card and the NVMe were identical.
The system booted from the SD card and mounted the root filesystem from the NVMe.
But I am not sure whether this is a recommendable solution.
When I used the new option in dietpi-config menu to update the SPI flash bootloader, NVMe stopped booting. I had to flash and boot from an SD to run the platform_install.sh and write_uboot_platform_mtd to make NVMe to boot again.
Am I doing something wrong? Or is the new option in dietpi-config not working as expected?
@dsouza
Can you test again whether the system comes up after a reboot? We just tested it and it seems that this bootloader has issues with reboot but requires a power cycle to come up again. The dietpi-config update and write_uboot_platform_mtd however (should) do exactly the same: The only difference is that we make the dd output visible.
Probably we should find a source for and download the one from Orange Pi themselves instead of flashing the one from Armbian .