[Orange Pi 5B] Fresh image fails to boot (but official OrangePi Debian works)

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | ??
  • Distro version | ??
  • Kernel version | ??
  • Architecture | arm64
  • SBC model | Orange Pi 5B
  • Power supply used | Ugreeen 65W
  • SD card used | SanDisk Ultra 64GB

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

Honestly not sure, but…

  1. Flash DietPi on SD card using Balena Etcher.
  2. Try to boot

Expected behaviour

  • It should boot

Actual behaviour

  • It doesn’t boot, the dietpisetup partition is not touched, the red power LED is on, the blinking green LED does not come on.

Extra details

Honestly I don’t know where I went wrong, but:

  1. Tried to move my DietPi install from SD to eMMC
  2. When shrinking my partition with GParted Live it encountered an error
  3. I thought, no big deal, let’s try again, and it succeeded.
  4. Tried booting it to move to eMMC, booted to an old install of DietPi I had forgotten was on the eMMC.
  5. Booted a live Ubuntu USB to check the SD card
  6. Ran e2fsck -f -y multiple times. It fixed loads of errors but kept finding more and more every time I ran it.
  7. Checked block/sector math (tune2fs -l vs fdisk). Boundaries matched perfectly.
  8. Wrote a file (test.txt), power cycled, and it persisted. The SD card flash memory is 100% healthy in my opinion.
  9. Disabled/re-enabled the ext4 journal (tune2fs -O ^has_journal). Did not break the fsck loop.
  10. Restored from backup superblock (e2fsck -b 32768). No progress there.
  11. Checked U-Boot: Ran hexdump -C on Sector 64. Found RKNS signature.

After that, I tried to evacuate the data that was intact from the SD by using tar to to back up the entire OS to an exFAT USB drive. Successfully extracted a 28.6GB archive (with some orphaned files ending up in lost+found).

Next attempted a fresh DietPi install:

  1. Flashed a new image I got from the DietPi website to the SD card via BalenaEtcher and failed to boot (black screen, no green LED)
  2. Added fdtfile=rockchip/rk3588s-orangepi-5b.dtb to /boot/dietpiEnv.txt in hopes of fixing something. Still failed to boot. Previously it would boot without this fix but wouldn’t see the eMMC.
  3. Randomized the ext4 root partition UUID (tune2fs -U random) and updated fstab/dietpiEnv.txt to ensure the old eMMC OS wasn’t hijacking the mount process. Still failed to boot.
  4. Flashed the official Orange Pi Android and Orange Pi Debian images. Both official images booted flawlessly from both the SD card and the eMMC.
  5. Attempted to use RKDevTool to EraseAll the eMMC, but encountered a “check ddr” error
  6. Booted Orange Pi Debian from the SD card and manually wiped the eMMC bootloader
  7. With the eMMC blank, put the fresh DietPi SD card back in. Still failed to boot.
  8. Installed working Orange Pi Debian natively on the eMMC. Ran the DietPi conversion script to hijack the working vendor kernel/U-Boot. dpkg error on orangepi-firmware (conflicting over /lib/firmware/brcm/BCM4345C0.hcd); dpkg error on linux-u-boot-orangepi5b-current (conflicting over /usr/lib/u-boot/LICENSE) Dropped to subshell, purged vendor packages with dpkg -P --force-all, ran apt-get --fix-broken install, and resumed the script.
  9. Before the final reboot, copied dietpiEnv.txt to orangepiEnv.txt to appease the vendor U-Boot. System halted on reboot. Completely unbootable.

I’m at a loss on what to try next. My biggest question is why, when I flash a fresh install of DietPi on my SD card, it just refuses to boot. Orange Pi provided Debian boots from the SD.

Would be good to get UART debug logs, to see why it is not booting. Everything else is just guessing.

Finally got the time to get the UART log:

DDR 9fa84341ce typ 24/09/06-09:51:11,fwver: v1.18
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
ch0 ttot16
LPDDR4X, 2112MHz
chtt6el[0] BW=16 Col=10 Bk=8 CSRw1S o6C2DB=6ie0M
     channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 =DeW ie08
ch3 tto12] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16S2D W6ie08     ch2 tto1
DQS rds:h1,h2 l[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=1C=  W6Se08
CH0 RX Vref:27.5%, TX Vref:21.8%,20.8%
DQ rds:l0 l0 l1 h1 h1 h1 l2 h3, h1 l0 l0 h2 l0 1h 0
DQS rds:l0,l0
CH1 RX Vref:30.6%, TX Vref:20.8%,20.8%
DQ rds:h5 l0 h2 h2 h3 h1 h4 h2, h1 l0 h6 l1 h3h 1h
DQS rds:h1,h1
CH2 RX Vref:31.8%, TX Vref:20.8%,20.8%
DQ rds:h3 l0 h1 h3 h3 h1 h3 h6, l0 l0 h2 h3 h2h  h
DQS rds:h1,h1
CH3 RX Vref:29.7%, TX Vref:20.8%,20.8%
DQ rds:h3 h6 h3 h4 l0 h6 l0 h1, h1 h3 h1 l0 h1 h 1h
stride=0x2, ddr_config=0x4
change to F1: 528MHz 0x akak x004 x800rnmk 40
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-rc3_armbian-2026.04-rc3-S4f70Pc-c281Be-8 A  2  ::800
                                                                       Trying to                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             spl: mmc init failed with error: -95
Error: -95
:Uupre o v!
           P adt o malo vcs# RR#PeeEEteod#

which image do you use? Best to my knowledge we don’t have an Orange Pi 5 B image?

I use the image listed as Orange Pi 5/5B on the site. It worked fine in the past; the only thing is it didn’t recognize the eMMC and Wi-Fi if I didn’t add the correct dtb file to dietpiEnv.txt.

I ask @MichaIng for support

I’m implementing support for dedicated Orange Pi 5B images now: Orange Pi 5B: add support for dedicated images by MichaIng · Pull Request #8112 · MichaIng/DietPi · GitHub
Seems the (newer) mainline U-Boot for Orange Pi 5 does not support the 5B model anymore on a very basic level.

Build triggered (EDIT: done): DietPi-Build · MichaIng/DietPi@df60b6f · GitHub
Once done, you can find it here: Index of /downloads/images/testing

It uses a dedicated orangepi5b branch. So you might want to switch that back to DEV_GITBRANCH=master in dietpi.txt if it works, so it migrates back with next DietPi release automatically.

Just for shits and giggles, I borrowed an SD card from a friend and each SD card produces a different error. This is with the new image you provided.
My 64GB:

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[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16S2eB=Sz24Mch2 ttot6
DQS rds:h1,h1 16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16C i =6z=0M         channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16= eW1Sz28Bch3 ttot
CH0 RX Vref:27.1%, TX Vref:21.8%,21.8%
DQ rds:l0 l0 l1 l0 l0 l0 l2 h1, h1 l0 l0 h1 l0 h1hl0
DQS rds:l0,l0
CH1 RX Vref:30.2%, TX Vref:20.8%,20.8%
DQ rds:h4 l0 h1 h1 h2 l0 h3 h1, l0 l1 h5 l1 h2 50h1
DQS rds:h1,h1
CH2 RX Vref:31.4%, TX Vref:20.8%,20.8%
DQ rds:h3 l0 h1 h3 h3 h1 h3 h6, l0 l0 h2 h4 h2  2h

DQS rds:h1,h1
CH3 RX Vref:29.7%, TX Vref:20.8%,21.8%
DQ rds:h3 h6 h3 h3 l0 h7 l0 h1, h1 h3 h1 l0 h1 h 12
stride=0x2, ddr_config=0x4
change to F1: 528MHz 04,n_s0 a0x0 200,rn_s x1
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

spl: mmc init failed with error: -9504-rc3-S4f70-Pc3e2V811e-4 Ar0 6-2:8+00Trying to boot fmMC
Error: -95
S:UsptdotDc!
            L idootrmlbodvs
                           # RO # esETt ad#

256GB from a friend:

DDR 9fa84341ce typ 24/09/06-09:51:11,fwver: v1.18
ch0 ttot10
ch1 ttot10
ch2 ttot10
ch3 ttot10
ch0 ttot16
LPDDR4X, 2112MHz
ch3 tto62] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16= eW1Se24Mch2 ttot
        channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16S iB1 z=0B
DQS rds:h1,h1                                                       nfce Dx
CH0 RX Vref:27.5%, TX Vref:20.8%,21.8%
DQ rds:l0 l0 l1 l0 h1 h1 l2 h3, h2 l0 l0 h2 h1 h1h71

DQS rds:l0,l0
CH1 RX Vref:30.6%, TX Vref:20.8%,19.8%
DQ rds:h5 l0 h2 h1 h2 h1 h4 h1, h1 l0 h6 l1 h3 h 0h
DQS rds:h1,h1
CH2 RX Vref:31.8%, TX Vref:20.8%,20.8%
DQ rds:h2 l0 h1 h3 h4 h1 h3 h6, l0 l0 h2 h3 h2 hh

DQS rds:h1,h1
CH3 RX Vref:29.7%, TX Vref:20.8%,21.8%
DQ rds:h2 h7 h3 h4 l0 h6 l0 h1, h1 h3 h1 l0 h1 h  3
stride=0x2, ddr_config=0x4
change to F1: 528MHz 04,aks03x0x4 2000 aka0x1
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-rc3_armbian-2026.04-rc3-S4f70-Pc-e2-811eR4a(r906-14: 00)Trying to boot frmM1## Checking hash(es) for config conf ... OK
## Checking hash(es) for Image atf-1 ... sha256 error!
Bad hash value for 'hash' hash node in 'atf1 aeoe
                                                 modia_wsco m l edeo
                                                                    ro:8
SLfie obo oa o vc                                                       P:Usprdo ve
                 #RO #Pa E h ad#

Hi, did you find a solution ?

@pinkfloydlsd
Did you test the new image?

@voidvisor
Since the Orange Pi 5B image/bootloader package ships vendor U-Boot v2017.09, while your log shows v2026.04-rc3 (the Orange Pi 5 mainline U-Boot version), your system seems to try booting from eMMC. Please try to press the MaskROM button during boot, to force booting from SD card.

Bad boot target priority, but this is at a hardware-level we cannot change.