Plebian-Linux / quartz64-images

GitHub Actions Repository for automatically generated images for the Quartz64 family of single board computers
https://plebian.org
GNU General Public License v3.0
41 stars 10 forks source link

Is NVMe boot on soquartz blade possible? #31

Closed psitem closed 1 year ago

psitem commented 1 year ago

Is it possible to boot from NVMe on a soquartz blade?

CounterPillow commented 1 year ago

The short answer is no. If you write the Plebian SOQuartz Blade image to NVMe, it won't work.

The long answer is that it's theoretically possible, with a big asterisk. To properly explain this, I need to go into how the booting works.

We have three main phases to the boot: maskrom, u-boot and kernel. Maskrom is a bit of read-only memory on the SoC itself that tells it how to boot from either SPI flash, eMMC or SD. Typically, maskrom then finds an u-boot on one of these 3, which then continues the boot process. SOQuartz Blade doesn't seem to come with SPI flash, so it needs either an eMMC module or SD card.

Such an u-boot could in theory have the drivers to load things off an NVMe drive, but those drivers for this SoC haven't been written for mainline u-boot yet. So we also have the requirement that the kernel and its initramfs be on something u-boot knows how to read, in this case also SPI, eMMC or SD.

The kernel has the necessary drivers to read things off NVMe on RK3566, so in theory you could then have the root file system on NVMe while your /boot is on SD or eMMC. However, we don't currently produce images that are arranged in this way.

So in the future, you might either be able to boot with a /boot on SD/eMMC or with just an u-boot on SD/eMMC, but it'll never boot without at least something on SD/eMMC because (as far as I can tell from the schematics and my boards) there's no SPI flash to shove things into.