Jump to content

Recommended Posts

Posted (edited)

I updated to Armbian 26.2.1 on OPi5, and it can't boot from MTD (rootfs at NVMe), and I have to use SD card to boot to NVMe as workaround.

 

After looking into this issue, I found rkspi_loader.img is no longer available for current (6.18.8 kernel) u-boot pkg and armbian-config flashes u-boot-rockchip-spi.bin ( or similar sata version) to /dev/mtdblock0 and I think this is wrong image for MTD bootloader. If I use older vendor image, which u-boot pkg has rkspi_loader.img, system can boot to NVMe rootfs and I notice that /dev/mtdblock0 has several gpt partitions including u-boot one, and flashing u-boot-rockchip-spi.bin erases partitions in SPI flash.

 

I noticed that several related changes were introduced since 25.11, such as https://github.com/armbian/build/commit/e5b845f9432abb0408287599bba5889a86e6d068 , but I couldn't do quick fix to bring back working rkspi_loader.img because I am not familiar with whole armbian build.

 

One thing to note that if board was flashed with old rkspi_loader.img and not updated with 26.2 MTD image, it still boots to NVMe  rootfs, but I have other issues such as video playback not working with 6.18 kernel likely due to mismatch u-boot and kernel version leading to wrong HW initialization.

 

BTW, I checked 26.2 u-boot pkg for Rock 5B (similar rk3588 board), and rkspi_loader.img is still included.

Edited by zjd
  • zjd changed the title to Armbian 26.2.1 can't boot from MTD on OrangePi5
Posted

After digging into more details, I think Armbian has moved to use new U-Boot generated FIT image u-boot-rockchip-spi.bin for SPI boot, however, it doesn't work to boot NVMe rootfs and sometimes breaks the board and I have to erase SPI to get SD card booting. Couldn't find more information how Armbian does MTD boot now.

 

Note that older vendor SPI bootloader can boot kernel 6.18.8 but I ran into other issue like freezing system for a couple of minutes so that I'd say to avoid use old MTD image with 26.2 6.18 kernel.

Posted

I connected UART today and did some debugging, and it looks like that this u-boot 2025.10 for Armbian 26.02 doesn't see NVMe drive, i.e. 'nvme scan' returns nothing.

 

Is OPi5 NVMe support included in upstream mainline u-boot?

Posted

If you have flashed working rkspi_loader.img to MTD before, i.e. from previous releases, you can keep using it with vendor kernel w/o updating MTD.

The 26.2.1 image with vendor kernel uses new FIT u-boot loader as well, I doubt it will work with NVMe.

 

BTW, I need 6.18 kernel and new u-boot and noticed that 26.2.1 image default to vendor kernel instead of 6.18 kernel now.

Posted
On 2/27/2026 at 7:28 PM, xsetiadi said:

but still using vendor kernel?


Vendor kernel will stay for awhile (this year for sure) as mainline is not on this level yet.

 

10 minutes ago, xsetiadi said:

orangepi5: bump u-boot to v2026.04-rc3

 

This part might not be part of the release - you can grab it from nightly release - but most likely it won't have any affect to this topic.

Posted (edited)

Oh damn, wish I would have read this before I tried to install (26.2 with vendor kernel build on the 9th) from SD to Nvme...

How can I reflash MTD if I only have a MacBook available?

Note to self and the next one hitting that wall:
Going to maskrom mode kinda fixed it, after that I started again from a mSD and from that running ArmBian I flashed the same img to the Nvme on the board. Another reboot and it was started from the SSD 😉

Edited by mircsicz
Fixed it
Posted

so today im finally reinstall my opi5, and when choose mtd to flash i got two option, i guess the sata version is if im using sata ssd instead of nvme ssd?

Posted
8 hours ago, xsetiadi said:

i guess the sata version is if im using sata ssd instead of nvme ssd?

correct

Posted

i find it is very convenient now, not only able to choose boot from nvme or sata ssd. but can also install the image from armbian-config. last time im installing armbian i need to dd the image manualy into nvme. very nice work for armbian team:thumbup:

Posted

Well the only thing armbian-config does, is calling "armbian-install" which has been there for ages :)
 

Posted

Hi everyone,

I just got an Orange Pi 5 and am experiencing the same issue as the OP. I've since then installed the bootloader on the SD card and the rootfs on the NVME drive. I don't really understand what came out of the discussion here: is it possible to boot from the MTD?

Thanks a lot!

EV

Posted

Booting from mtd/nvme should just work.

Most common problems:

- dirty mtd/emmc. vendor/unmatching boot loader can cause issues.

- mixup between m.2 sata and actual nvme. Correct overlay/dt must be used

- wrong rootfs uuid in armbianEnv.txt after running armbian-install (after done, do not reboot but mount freshly written nvme to a random folder and check if the uuid is correct)
 

Posted

Thank you very much for your reply, Werner - and indeed for all the tremendous work you do!

The drive is listed as an /dev/nvme0n1p1, so I think I did choose the right overlay. Rootfs UUID is correct.

I tested SPI/MTD boot with Armbian 26.2.1, rootfs on NVMe.

 

I erased and reflashed the SPI flash manually:

``` shell
sudo flash_eraseall /dev/mtd0
sudo dd if=/usr/lib/linux-u-boot-vendor-orangepi5/u-boot-rockchip-spi.bin \
  of=/dev/mtdblock0 bs=1M conv=fsync status=progress
sync
```

 

I then verified that the running system was still using /boot from the SD card:

``` shell
findmnt /boot
```

which returned:

``` shell
/boot  /dev/mmcblk1p1[/boot]
```

I mounted the NVMe rootfs and compared /boot on SD vs NVMe:

``` shell
sudo mkdir -p /mnt/nvme
sudo mount /dev/nvme0n1p1 /mnt/nvme
ls -la /boot
ls -la /mnt/nvme/boot
```

The NVMe /boot contents were older/stale compared with the SD /boot, so I synchronized them:

``` shell
sudo rsync -aHAX --delete /boot/ /mnt/nvme/boot/
sync
```

I then powered the board off completely, removed the SD card, and tested booting from SPI + NVMe again but it still won't boot without the SD card.

I watched your video on UART debugging, but unfortunately, my serial cable is too slow, so I'll get one of those you recommend and try again.

Thanks again!


 

Posted

I tried u-boot 2026.04 from rolling release, still has same problem:

DDR 9fa84341ce typ 24/09/06-09:51:11,fwver: v1.18
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
ch0 ttot16
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
ch1 ttot16
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
ch2 ttot16
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
ch3 ttot16
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
Manufacturer ID:0x1
DQS rds:h6,h1 
CH0 RX Vref:28.9%, TX Vref:20.8%,22.8%
DQ rds:h5 h1 l0 l0 l1 h1 h1 h2, l0 l0 h1 h2 h1 h2 h1 h4 

DQS rds:l0,h1 
CH1 RX Vref:29.7%, TX Vref:21.8%,20.8%
DQ rds:h4 l0 h3 h5 l1 h6 h1 h2, h1 h6 h3 h7 h1 h2 h2 l1 

DQS rds:h1,l0 
CH2 RX Vref:32.2%, TX Vref:20.8%,20.8%
DQ rds:h3 l0 h5 h2 h1 h6 l0 h1, h1 h4 h3 h1 h1 h3 h5 h4 

DQS rds:h1,h1 
CH3 RX Vref:29.7%, TX Vref:23.8%,22.8%
DQ rds:h1 h1 h1 h4 h4 l0 h1 h1, l0 h3 h7 l1 l0 h3 h1 h3 

stride=0x2, ddr_config=0x4
hash ch_mask0-1 0x20 0x40, bank_mask0-3 0xa00 0x1400 0x2800 0x0, rank_mask0 0x401000
change to F1: 528MHz
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
change to F2: 1068MHz
ch0 ttot12
ch1 ttot12
ch2 ttot12
ch3 ttot12
change to F3: 1560MHz
ch0 ttot14
ch1 ttot14
ch2 ttot14
ch3 ttot14
change to F0: 2112MHz
ch0 ttot16
ch1 ttot16
ch2 ttot16
ch3 ttot16
out

U-Boot SPL 2026.04_armbian-2026.04-S88dc-P9ef2-H95ba-Va0a8-B138f-R448a (Apr 25 2026 - 16:56:23 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-868-g040d2de11:derrick.huang, fwver: v1.48
NOTICE:  BL31: Built : 15:02:44, Dec 19 2024
INFO:    spec: 0x13
INFO:    code: 0x88
INFO:    ext 32k is not valid
INFO:    ddr: stride-en 4CH
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO:    l3 cache partition cfg-0
INFO:    system boots from cpu-hwid-0
INFO:    disable memory repair
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 initialization. SMC`s destined for OPTEE K
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x800000
INFO:    SPSR = 0x3c9


U-Boot 2026.04_armbian-2026.04-S88dc-P9ef2-H95ba-Va0a8-B138f-R448a (Apr 25 2026 - 16:56:23 +0000)

Model: Xunlong Orange Pi 5
SoC:   RK3588S
DRAM:  8 GiB
Core:  726 devices, 33 uclasses, devicetree: separate
MMC:   mmc@fe2c0000: 0
Loading Environment from nowhere... OK
In:    serial@feb50000
Out:   serial@feb50000
Err:   serial@feb50000
Model: Xunlong Orange Pi 5
SoC:   RK3588S
Net:   eth0: ethernet@fe1c0000
Hit any key to stop autoboot: 0

<comment: stopped for mannual command >

=> nvme scan
<comment: No NVMe drive found>

=> boot
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
Card did not respond to voltage select! : -110
Cannot persist EFI variables without system partition
Scanning bootdev 'mmc@fe2c0000.bootdev':
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
scanning bus for devices...
USB EHCI 1.00
USB OHCI 1.0
USB EHCI 1.00
USB OHCI 1.0
USB XHCI 1.10
Bus usb@fc800000: 1 USB Device(s) found
Bus usb@fc840000: 1 USB Device(s) found
Bus usb@fc880000: 1 USB Device(s) found
Bus usb@fc8c0000: 1 USB Device(s) found
Bus usb@fcd00000: 1 USB Device(s) found
Scanning bootdev 'ethernet@fe1c0000.bootdev':
ethernet@fe1c0000 Waiting for PHY auto negotiation to complete....... done
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.0.50 (257 ms)
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-02-2a-1c-db-3c-a0
Using ethernet@fe1c0000 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.50
Filename 'pxelinux.cfg/01-02-2a-1c-db-3c-a0'.
Load address: 0xe00000
Loading: T T 

<comment: went through predefined boot devices and stuck at waiting for TFTP server, which doesn't exist>

 

When SD card plugged in, u-boot went through boot devices and found that it is bootable and load OS:

DDR 9fa84341ce typ 24/09/06-09:51:11,fwver: v1.18
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
ch0 ttot16
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
ch1 ttot16
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
ch2 ttot16
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
ch3 ttot16
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
Manufacturer ID:0x1
DQS rds:h4,h1 
CH0 RX Vref:29.3%, TX Vref:20.8%,21.8%
DQ rds:h7 h1 l0 l0 l0 h1 h2 h2, l0 l0 h1 h2 h1 h3 h1 h4 

DQS rds:l0,h2 
CH1 RX Vref:29.3%, TX Vref:21.8%,20.8%
DQ rds:h3 l0 h2 h4 l2 h4 l0 h1, h1 h4 h2 h4 h1 h2 h1 l1 

DQS rds:h1,l0 
CH2 RX Vref:32.2%, TX Vref:20.8%,20.8%
DQ rds:h3 l0 h5 h2 l0 h5 l0 h1, h1 h7 h3 h1 h1 h3 h5 h4 

DQS rds:h1,h1 
CH3 RX Vref:29.7%, TX Vref:22.8%,22.8%
DQ rds:h1 l0 l0 h3 h4 l0 h1 h1, l0 h3 h7 l0 l0 h3 h1 h4 

stride=0x2, ddr_config=0x4
hash ch_mask0-1 0x20 0x40, bank_mask0-3 0xa00 0x1400 0x2800 0x0, rank_mask0 0x401000
change to F1: 528MHz
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
change to F2: 1068MHz
ch0 ttot12
ch1 ttot12
ch2 ttot12
ch3 ttot12
change to F3: 1560MHz
ch0 ttot14
ch1 ttot14
ch2 ttot14
ch3 ttot14
change to F0: 2112MHz
ch0 ttot16
ch1 ttot16
ch2 ttot16
ch3 ttot16
out

U-Boot SPL 2026.04_armbian-2026.04-S88dc-P9ef2-H95ba-Va0a8-B138f-R448a (Apr 25 2026 - 16:56:23 +0000)
Trying to boot from SPI
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-868-g040d2de11:derrick.huang, fwver: v1.48
NOTICE:  BL31: Built : 15:02:44, Dec 19 2024
INFO:    spec: 0x13
INFO:    code: 0x88
INFO:    ext 32k is not valid
INFO:    ddr: stride-en 4CH
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0
INFO:    l3 cache partition cfg-0
INFO:    system boots from cpu-hwid-0
INFO:    disable memory repair
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 initialization. SMC`s destined for OPTEE K
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x800000
INFO:    SPSR = 0x3c9


U-Boot 2026.04_armbian-2026.04-S88dc-P9ef2-H95ba-Va0a8-B138f-R448a (Apr 25 2026 - 16:56:23 +0000)

Model: Xunlong Orange Pi 5
SoC:   RK3588S
DRAM:  8 GiB
Core:  726 devices, 33 uclasses, devicetree: separate
MMC:   mmc@fe2c0000: 0
Loading Environment from nowhere... OK
In:    serial@feb50000
Out:   serial@feb50000
Err:   serial@feb50000
Model: Xunlong Orange Pi 5
SoC:   RK3588S
Net:   eth0: ethernet@fe1c0000
Hit any key to stop autoboot: 0
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
Cannot persist EFI variables without system partition
  0  efi_mgr      ready   (none)       0  <NULL>                    
** Booting bootflow '<NULL>' with efi_mgr
Loading Boot0000 'mmc 0' failed
EFI boot manager: Cannot load any image
Boot failed (err=-14)
Scanning bootdev 'mmc@fe2c0000.bootdev':
  1  script       ready   mmc          1  mmc@fe2c0000.bootdev.part /boot/boot.scr
** Booting bootflow 'mmc@fe2c0000.bootdev.part_1' with script
Boot script loaded from mmc 0:1
244 bytes read in 5 ms (46.9 KiB/s)
31493216 bytes read in 2669 ms (11.3 MiB/s)
41200128 bytes read in 3487 ms (11.3 MiB/s)
165243 bytes read in 43 ms (3.7 MiB/s)
Working FDT set to 12000000
Trying kaslrseed command... Info: Unknown command can be safely ignored since kaslrseed does not apply to all boards.
Unknown command 'kaslrseed' - try 'help'
## Loading init Ramdisk from Legacy Image at 12180000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    31493152 Bytes = 30 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
Working FDT set to 12000000
   Loading Ramdisk to eadf7000, end ecbffc20 ... OK
   Loading Device Tree to 00000000ece04000, end 00000000ece94fff ... OK
Working FDT set to ece04000
[image_setup_libfdt] called
[image_setup_libfdt] calling fdt_fixup_ethernet
[fdt_fixup_ethernet] called
[fdt_fixup_ethernet] alias #0: name='gpio0', path='/pinctrl/gpio@fd8a0000'
[fdt_fixup_ethernet] alias #1: name='gpio1', path='/pinctrl/gpio@fec20000'
[fdt_fixup_ethernet] alias #2: name='gpio2', path='/pinctrl/gpio@fec30000'
[fdt_fixup_ethernet] alias #3: name='gpio3', path='/pinctrl/gpio@fec40000'
[fdt_fixup_ethernet] alias #4: name='gpio4', path='/pinctrl/gpio@fec50000'
[fdt_fixup_ethernet] alias #5: name='i2c0', path='/i2c@fd880000'
[fdt_fixup_ethernet] alias #6: name='i2c1', path='/i2c@fea90000'
[fdt_fixup_ethernet] alias #7: name='i2c2', path='/i2c@feaa0000'
[fdt_fixup_ethernet] alias #8: name='i2c3', path='/i2c@feab0000'
[fdt_fixup_ethernet] alias #9: name='i2c4', path='/i2c@feac0000'
[fdt_fixup_ethernet] alias #10: name='i2c5', path='/i2c@fead0000'
[fdt_fixup_ethernet] alias #11: name='i2c6', path='/i2c@fec80000'
[fdt_fixup_ethernet] alias #12: name='i2c7', path='/i2c@fec90000'
[fdt_fixup_ethernet] alias #13: name='i2c8', path='/i2c@feca0000'
[fdt_fixup_ethernet] alias #14: name='serial0', path='/serial@fd890000'
[fdt_fixup_ethernet] alias #15: name='serial1', path='/serial@feb40000'
[fdt_fixup_ethernet] alias #16: name='serial2', path='/serial@feb50000'
[fdt_fixup_ethernet] alias #17: name='serial3', path='/serial@feb60000'
[fdt_fixup_ethernet] alias #18: name='serial4', path='/serial@feb70000'
[fdt_fixup_ethernet] alias #19: name='serial5', path='/serial@feb80000'
[fdt_fixup_ethernet] alias #20: name='serial6', path='/serial@feb90000'
[fdt_fixup_ethernet] alias #21: name='serial7', path='/serial@feba0000'
[fdt_fixup_ethernet] alias #22: name='serial8', path='/serial@febb0000'
[fdt_fixup_ethernet] alias #23: name='serial9', path='/serial@febc0000'
[fdt_fixup_ethernet] alias #24: name='spi0', path='/spi@feb00000'
[fdt_fixup_ethernet] alias #25: name='spi1', path='/spi@feb10000'
[fdt_fixup_ethernet] alias #26: name='spi2', path='/spi@feb20000'
[fdt_fixup_ethernet] alias #27: name='spi3', path='/spi@feb30000'
[fdt_fixup_ethernet] alias #28: name='spi4', path='/spi@fecb0000'
[fdt_fixup_ethernet] alias #29: name='ethernet0', path='/ethernet@fe1c0000'
[fdt_fixup_ethernet] env var for alias 'ethernet0' is 'ethaddr', value='02:2a:1c:db:3c:a0'
[fdt_fixup_ethernet] Patching node '/ethernet@fe1c0000' (offset 40388) with MAC 02:2a:1c:db:3c:a0
[fdt_fixup_ethernet] alias #30: name='mmc0', path='/mmc@fe2c0000'
[fdt_fixup_ethernet] SUMMARY: aliases found=31, attempted=1, skipped=0, patched=1

Starting kernel ...

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines