Radxa Debian distribution on a Rock 5B bricked with "root=" complaint on boot after "aptitude upgrade"

Hi all!

The Rock 5B had the SPI boot loader flashed (https://wiki.radxa.com/Rock5/install/spi) and Radxa’s Debian distribution installed on an NVMe SSD, and it worked fine.

For reference, before “aptitude upgrade” the file /etc/default/u-boot had this content:

## /etc/default/u-boot - configuration file for u-boot-update(8)

#U_BOOT_UPDATE="true"

#U_BOOT_ALTERNATIVES="default recovery"
#U_BOOT_DEFAULT="l0"
#U_BOOT_ENTRIES="all"
#U_BOOT_MENU_LABEL="Debian GNU/Linux"
#U_BOOT_PARAMETERS="ro quiet"
#U_BOOT_ROOT=""
#U_BOOT_TIMEOUT="50"
#U_BOOT_FDT=""
#U_BOOT_FDT_DIR="/usr/lib/linux-image-"
#U_BOOT_FDT_OVERLAYS=""
#U_BOOT_FDT_OVERLAYS_DIR="/boot/dtbo/"

U_BOOT_TIMEOUT="10"
U_BOOT_PARAMETERS="$(cat /etc/kernel/cmdline)"
U_BOOT_FDT_DIR="/usr/lib/linux-image-"

After “aptitude upgrade”, the last three lines had been removed.

I rebooted the Rock 5B and got this output on the console:

DDR Version V1.08 20220617
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
Manufacturer ID:0x6
CH0 RX Vref:27.7%, TX Vref:24.8%,24.8%
CH1 RX Vref:29.7%, TX Vref:24.8%,24.8%
CH2 RX Vref:30.7%, TX Vref:24.8%,25.8%
CH3 RX Vref:27.7%, TX Vref:24.8%,25.8%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
U-Boot SPL board init
U-Boot SPL 2017.09-gbf47e8171f4-220414-dirty #stephen (Jun 07 2023 - 17:56:02)
Trying to boot from MMC2
MMC: no card present
mmc_init: -123, time 0
spl: mmc init failed with error: -123
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 14
spl: mmc init failed with error: -95
Trying to boot from MTD2
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(bb1bbbc832...) + OK
## Checking uboot 0x00200000 ... sha256(59a5130fc0...) + OK
## Checking fdt 0x0031b2c0 ... sha256(e05417ddb3...) + OK
## Checking atf-2 0x000f0000 ... sha256(30812190d0...) + OK
## Checking atf-3 0xff100000 ... sha256(cb7bdbec2b...) + OK
Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00040000)
Total: 500.360 ms

INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-499-ge63a16361:derrick.huang
NOTICE:  BL31: Built : 10:58:38, Jan 10 2023
INFO:    spec: 0x1
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:    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 initialization. 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


U-Boot 2017.09-gbf47e8171f4-220414-dirty #stephen (Jun 07 2023 - 17:56:02 +0800)

Model: Radxa ROCK 5B
PreSerial: 2, raw, 0xfeb50000
DRAM:  15.7 GiB
Sysmem: init
Relocation Offset: eda42000
Relocation fdt: eb9f9f98 - eb9fecd8
CR: M/C/I
Using default environment

SF: Detected sfc_nor with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Bootdev(atags): mtd 2
PartType: EFI
DM: v2
No misc partition
boot mode: None
FIT: No boot partition
No resource partition
No resource partition
Failed to load DTB, ret=-19
No find valid DTB, ret=-22
Failed to get kernel dtb, ret=-22
Model: Radxa ROCK 5B
CLK: (sync kernel. arm: enter 1008000 KHz, init 1008000 KHz, kernel 0N/A)
  b0pll 24000 KHz
  b1pll 24000 KHz
  lpll 24000 KHz
  v0pll 24000 KHz
  aupll 24000 KHz
  cpll 1500000 KHz
  gpll 1188000 KHz
  npll 24000 KHz
  ppll 1100000 KHz
  aclk_center_root 702000 KHz
  pclk_center_root 100000 KHz
  hclk_center_root 396000 KHz
  aclk_center_low_root 500000 KHz
  aclk_top_root 750000 KHz
  pclk_top_root 100000 KHz
  aclk_low_top_root 396000 KHz
Net:   No ethernet found.
Hit key to stop autoboot('CTRL+C'):  0
pcie@fe150000: PCIe Linking... LTSSM is 0x0
pcie@fe150000: PCIe Linking... LTSSM is 0x210022
pcie@fe150000: PCIe Linking... LTSSM is 0x210023
pcie@fe150000: PCIe Link up, LTSSM is 0x230011
pcie@fe150000: PCIE-0: Link up (Gen3-x4, Bus0)
pcie@fe150000: invalid flags type!

Device 0: Vendor: 0x2646 Rev: SBM02103 Prod: 50026B7785732955
            Type: Hard Disk
            Capacity: **redacted** MB = **redacted** GB (**redacted** x 512)
... is now current device
Scanning nvme 0:2...
Scanning nvme 0:3...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
4989 bytes read in 0 ms
U-Boot menu
1:      Debian GNU/Linux 11 (bullseye) 5.10.110-38-rockchip
2:      Debian GNU/Linux 11 (bullseye) 5.10.110-38-rockchip (rescue target)
3:      Debian GNU/Linux 11 (bullseye) 5.10.110-20-rockchip
4:      Debian GNU/Linux 11 (bullseye) 5.10.110-20-rockchip (rescue target)
5:      Debian GNU/Linux 11 (bullseye) 5.10.110-15-rockchip
6:      Debian GNU/Linux 11 (bullseye) 5.10.110-15-rockchip (rescue target)
Enter choice: 1:        Debian GNU/Linux 11 (bullseye) 5.10.110-38-rockchip
Retrieving file: /boot/initrd.img-5.10.110-38-rockchip
18344731 bytes read in 19 ms (920.8 MiB/s)
Retrieving file: /boot/vmlinuz-5.10.110-38-rockchip
28314112 bytes read in 29 ms (931.1 MiB/s)
append: quiet splash loglevel=4 rw earlycon consoleblank=0 console=tty0 console=ttyFIQ0,1500000n8 console=ttyAML0,115200n8 console=ttyS2,1500000n8 console=ttyS0,1500000n8 coherent_pool=2M irqchip.gicv3_pseudo_nmi=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 quiet splash loglevel=4 rw earlycon consoleblank=0 console=tty0 console=ttyFIQ0,1500000n8 console=ttyAML0,115200n8 console=ttyS2,1500000n8 console=ttyS0,1500000n8 coherent_pool=2M irqchip.gicv3_pseudo_nmi=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1
Retrieving file: /usr/lib/linux-image-5.10.110-38-rockchip/rockchip/rk3588-rock-5b.dtb
252169 bytes read in 10 ms (24 MiB/s)
Fdt Ramdisk skip relocation
No misc partition
## Flattened Device Tree blob at 0x08300000
   Booting using the fdt blob at 0x08300000
  'reserved-memory' cma: addr=10000000 size=10000000
  'reserved-memory' ramoops@110000: addr=110000 size=f0000
   Using Device Tree in place at 0000000008300000, end 0000000008340908
Adding bank: 0x00200000 - 0xf0000000 (size: 0xefe00000)
Adding bank: 0x100000000 - 0x3fc000000 (size: 0x2fc000000)
Adding bank: 0x3fc500000 - 0x3fff00000 (size: 0x03a00000)
Total: 6521.644 ms

Starting kernel ...

[    8.274136] fiq_debugger fiq_debugger.0: IRQ fiq not found
[    8.274150] fiq_debugger fiq_debugger.0: IRQ wakeup not found
[    8.274156] fiq_debugger_probe: could not install nmi irq handler
[    9.107357] mpp-iep2 fdbb0000.iep: allocate roi buffer failed
[    9.107994] rk-pcie fe170000.pcie: IRQ msi not found
[    9.108018] rk-pcie fe170000.pcie: Missing *config* reg space
[    9.108149] rk-pcie fe170000.pcie: Missing *config* reg space
[    9.108310] rk-pcie fe170000.pcie: invalid resource
[    9.108416] rk-pcie fe150000.pcie: IRQ msi not found
[    9.108441] rk-pcie fe150000.pcie: Missing *config* reg space
[    9.108563] rk-pcie fe150000.pcie: Missing *config* reg space
[    9.108604] rk-pcie fe150000.pcie: invalid resource
[    9.109000] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_a is not found!
[    9.109009] rkvdec2_init:1008: No niu aclk reset resource define
[    9.109015] mpp_rkvdec2 fdc38100.rkvdec-core: shared_niu_h is not found!
[    9.109021] rkvdec2_init:1011: No niu hclk reset resource define
[    9.109652] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_a is not found!
[    9.109659] rkvdec2_init:1008: No niu aclk reset resource define
[    9.109666] mpp_rkvdec2 fdc48100.rkvdec-core: shared_niu_h is not found!
[    9.109671] rkvdec2_init:1011: No niu hclk reset resource define
[    9.177107] rk806 spi2.0: no sleep-setting state
[    9.177126] rk806 spi2.0: no reset-setting pinctrl state
[    9.177133] rk806 spi2.0: no dvs-setting pinctrl state
[    9.497997] arm-scmi firmware:scmi: Failed. SCMI protocol 17 not active.
[    9.503612] rksfc_base v1.1 2016-01-08
[    9.534139] rockchip-dmc dmc: failed to get vop bandwidth to dmc rate
[    9.534173] rockchip-dmc dmc: failed to get vop pn to msch rl
[    9.534922] rockchip-dmc dmc: could not find power_model node
[    9.547875] rk-pcie fe190000.pcie: IRQ msi not found
[    9.547965] rk-pcie fe190000.pcie: Missing *config* reg space
[    9.548357] rk-pcie fe190000.pcie: Missing *config* reg space
[    9.548443] rk-pcie fe190000.pcie: invalid resource
[    9.551045] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdab0000-0xfdabffff]
[    9.551089] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdac0000-0xfdacffff]
[    9.551113] RKNPU fdab0000.npu: can't request region for resource [mem 0xfdad0000-0xfdadffff]
[    9.555684] debugfs: Directory 'fdab0000.npu-rknpu' with parent 'vdd_npu_s0' already present!
[    9.581434] RKNPU fdab0000.npu: failed to find power_model node
[    9.581516] RKNPU fdab0000.npu: RKNPU: failed to initialize power model
[    9.581545] RKNPU fdab0000.npu: RKNPU: failed to get dynamic-coefficient
**No root device specified. Boot arguments must include a root= parameter.**
[   11.446828] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_cancel_cpu_limit_freq freq qos nod add

As you see, the Rock 5B is bricked right now, by this “aptitude update; aptitude upgrade”.

What happened, and do you have any suggestion how to fix it?

Can it be fixed from the u-boot console, or must I boot it separately from an eMMC or SD memory card, and do what?

Thanks!

@jack

OK I fixed it:

I booted the Rock 5B from a separate device (eMMC, SD memory card).

I then booted the NVMe partition: mount /dev/nvme0n1p3 /mnt

I then ran “blkid” and copied out the UUID value from the row “/dev/nvme0n1p3: LABEL=“rootfs” UUID=”…".

I then did vim /mnt/boot/extlinux/extlinux.conf , and to each of the “append …” lines, at the end I added " root=UUID=" and then the UUID value copied from above.

This made the machine boot. I am not clear why “aptitude upgrade” broke this. Some Radxa package’s upgrade had not worked as it should.

Make a backup of that file and run sudo u-boot-update. Check if the generated extlinux.conf is correct.

Here is how the code determines the rootfs: https://salsa.debian.org/debian/u-boot-menu/-/blob/debian/master/u-boot-update?ref_type=heads#L64

1 Like