Boot from NVME not working

I am trying to boot armbian from NVME without SD/eMMC

  1. Booting armbian image from SD works fine
    (Armbian_22.11.0-trunk_Rock-5b_jammy_legacy_5.10.72_xfce_desktop.img)

  2. Downloaded spi loader to flash https://wiki.radxa.com/Rock5/install/spi

  3. Wrote armbian image to this NVME

  4. When powering on, the green led is on, after a second the blue one lights as well.
    This is the serial output (nothing after that, just stops there):

DDR Version V1.08 20220617
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
Manufacturer ID:0x6
CH0 RX Vref:31.7%, TX Vref:22.8%,21.8%
CH1 RX Vref:30.7%, TX Vref:21.8%,21.8%
CH2 RX Vref:31.7%, TX Vref:22.8%,22.8%
CH3 RX Vref:32.7%, TX Vref:19.8%,19.8%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-405-gb52c2eadd:derrick.huang
NOTICE:  BL31: Built : 11:23:47, Aug 15 2022
INFO:    spec: 0x1
INFO:    ext 32k is not valid
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    system boots from cpu-hwid-0
INFO:    idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO:    dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO:    dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO:    dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO:    dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO:    BL31: Initialising Exception Handling Framework
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE init                                                                                ialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9

any ideas what is wrong?

is the ssd detected with lsblk from the sd?
and how did you write armbian to the ssd

Haven’t tested yet if the ssd is detected when booting with sd. I’ll check that later.
I wrote the image with balenaEtcher, the same way like the SD.

did you put the ssd in an nvme enclosure or in the nvme slot in your pc?

I used a USB nvme enclosure. Is there any difference between this and a native PCI/m.2 slot?

it could be that the enclosure does wierd things
but test if the ssd shows up with the sd and if yes try to rewrite it with your internal slot of your pc/laptop

This particular model SSD requires a lot of start-up current and for a very good chance that this SSD is never detected by Rock5, you can verify this by inserting an sdcard and boot from there to see if you can see this SSD using lspci.

By the way, armbian image NEVER works with nvme boot on Rock5, you should try with the official images first.

You will see something like below during the boot if you tried to boot from nvme using armbian image:

Device 0: Vendor: 0x144d Rev: 4B2QEXM7 Prod: S6P1NS0T805701H
Type: Hard Disk
Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
… is now current device
Scanning nvme 0:1…
Found U-Boot script /boot/boot.scr
3242 bytes read in 1 ms (3.1 MiB/s)

Executing script at 00500000

Unknown command 

Please note that the nvme drive is found in this example and the boot is hang due to an internal issue of armbian itself, which is very different to your situation here(no drive is detected at all)

yes thats posible

You are impatient :wink: First boot with inserted nvme takes some time, on earlier loader version it rebooted here, on current it takes some time to pass this, maybe this is the delay introduced to allow PD power negotiations.

that is possible and thats why i left a pi 4b with broken firmware and a recovery sd for 1 day because i thought that it would maybe help (it didnt)
but give it 1 minute and maybe it will work
and thanks @dominik for the info

Update:
If I just add the SD (with nvme with flashed image installed) i got a bootloop.

So a “clean” try

  1. Erased SPI Flash (see section " Erase SPI Nor Flash")
  2. Formatted NVME (one single NTFS partition, with USB adapter)
  3. Flashed rock-5b-debian-bullseye-xfce4-arm64-20220919-0912-gpt.img to SD
  4. Booted with SD and clean NVME installed

The result:

rock@rock-5b:~$ dmesg | grep nvme
[ 6.828399] nvme nvme0: pci function 0000:01:00.0
[ 6.828452] nvme 0000:01:00.0: enabling device (0000 -> 0002)
[ 6.835519] nvme nvme0: missing or invalid SUBNQN field.
[ 6.934936] nvme nvme0: 8/0/0 default/read/poll queues
[ 7.522134] nvme0n1: p1

and

rock@rock-5b:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 28.9G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part /boot
└─mmcblk0p2 179:2 0 28.4G 0 part /
nvme0n1 259:0 0 238.5G 0 disk
└─nvme0n1p1 259:1 0 238.5G 0 part

so NVME is working.

Next steps:

  1. Flashed SPI Flash again
  2. Wrote Rock Debian image to NVME
    3. Boot from NVME is working

So it seems it is just armbian that is not working.
Thanks for your help

1 Like

oh cool then ask this question on armbian forum

Have the same issue with original radxa Ubuntu image. Boot is unreliable.

it is just a opton wich is not that old

AND DONT USE ARMBIAN WITH ROCK5B

they added patches on a old 5.10 kernel

just use the 5.10 kernel of raxda that is a real rockchip 5.10.110 the armbian is a fake 5.10 kernel