Boot Issue WIth RockPI4C

I have what was a well-functioning RockPi4C (version 1.4) which, after a shutdown, fails to boot successfully. I connected to the console and captured the information during the boot. Although it’s supposed to boot from the micro SD card, it appears that it is trying to boot from across the network.

I’m not sure what to do at this point. Does anyone have any suggestions?

I’m attaching the output of the console during the boot:

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 15:51:39
Using character set conversion

Press CTRL-A Z for help on special keys

DDR Version 1.20 20190314
In
channel 0
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 400MHz 0,1
channel 0
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 800MHz 1,0
Channel 0: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x40
ch 1 ddrconfig = 0x101, ddrsize = 0x40
pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD
OUT
Boot1: 2019-03-14, version: 1.19
CPUId = 0x0
ChipType = 0x10, 248
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
SdmmcInit=2 1
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=119286MB
FwPartOffset=2000 , 0
StorageInit ok = 45549
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT part: 0, name: loader1, start:0x40, size:0x1f40
GPT part: 1, name: loader2, start:0x4000, size:0x2000
GPT part: 2, name: trust, start:0x6000, size:0x2000
GPT part: 3, name: boot, start:0x8000, size:0x100000
GPT part: 4, name: rootfs, start:0x108000, size:0xe7f2fdf
no find partition:uboot.
LoadTrust Addr:0x4000
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
hdr 0000000003380880 + 0x0:0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

Load OK, addr=0x200000, size=0xeea98
RunBL31 0x10000
NOTICE: BL31: v1.3(debug):0e7a845
NOTICE: BL31: Built : 16:13:46, Apr 17 2019
NOTICE: BL31: Rockchip release version: v1.1
INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
INFO: plat_rockchip_pmu_init(1181): pd status 3e
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 S
MC_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-02676-g4490220 (Jul 30 2019 - 17:52:33 +0800)

Model: Rockchip RK3399 rockpi4b Board
PreSerial: 2
DRAM: 3.9 GiB
Relocation Offset is: f5be0000
Sysmem: init
I2c speed: 400000Hz
PMIC: RK808
vdd-center init 950000 uV
MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0
Using default environment

Model: Rockchip RK3399 rockpi4b Board
Bootdev(atags): mmc 1
PartType: EFI
get part misc fail -1
boot mode: None
init_resource_list: failed to get resource part, ret=-1
Can’t find file:logo.bmp
failed to display uboot logo
CLK: (uboot. arml: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
CLK: (uboot. armb: enter 24000 KHz, init 24000 KHz, kernel 0N/A)
aplll 816000 KHz
apllb 24000 KHz
dpll 800000 KHz
cpll 24000 KHz
gpll 800000 KHz
npll 600000 KHz
vpll 24000 KHz
aclk_perihp 133333 KHz
hclk_perihp 66666 KHz
pclk_perihp 33333 KHz
aclk_perilp0 266666 KHz
hclk_perilp0 88888 KHz
pclk_perilp0 44444 KHz
hclk_perilp1 100000 KHz
pclk_perilp1 50000 KHz
Net: eth0: ethernet@fe300000
Hit key to stop autoboot(‘CTRL+C’): 0

Device 0: unknown device
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:4…
Card did not respond to voltage select!
mmc_init: -95, time 27
starting USB…
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
USB2: failed to get usb phy
Port not available.
USB3: failed to get usb phy
Port not available.
USB4: Can’t get the usbphy register address
probe failed, error -6
USB5: Can’t get the usbphy register address
probe failed, error -6
scanning bus 0 for devices… 1 USB Device(s) found
scanning bus 1 for devices… 1 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found

Device 0: unknown device
ethernet@fe300000 Waiting for PHY auto negotiation to complete… done
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.50.188 (256 ms)
*** Warning: no boot file name; using ‘C0A832BC.img’
Using ethernet@fe300000 device
TFTP from server 192.168.50.1; our IP address is 192.168.50.188
Filename ‘C0A832BC.img’.
Load address: 0x800800
Loading: T T T T T T

and it just goes on trying to boot from across the network indefinitely.

Argh! I now see the early messages about
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:x18000
mmc: ERROR Card did not respond to voltage select.
I will go and check whether my sdhc card has died.

I ran e2fsck on the fifth partition and it found/fixed lots of errors. Now it looks like there may be some problems in another partition. The console log now shows:

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 15:51:39

Press CTRL-A Z for help on special keys

DDR Version 1.13 20180801
In
Channel 0: LPDDR4,50MHz
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x4D
MR14=0x4D
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,50MHz
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x4D
MR14=0x4D
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
256B stride
channel 0
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 400MHz 0,1
channel 0
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 800MHz 1,0
ch 0 ddrconfig = 0x101, ddrsize = 0x40
ch 1 ddrconfig = 0x101, ddrsize = 0x40
pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD
OUT
Boot1: 2018-04-08, version: 1.12
CPUId = 0x0
ChipType = 0x10, 219
SdmmcInit=2 0
BootCapSize=100000
UserCapSize=59904MB
FwPartOffset=2000 , 100000
mmc0:cmd5,32
SdmmcInit=0 0
BootCapSize=0
UserCapSize=119286MB
FwPartOffset=2000 , 0
StorageInit ok = 205434
LoadTrustBL
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xeea98
RunBL31 0x10000
NOTICE: BL31: v1.3(debug):0e7a845
NOTICE: BL31: Built : 16:13:46, Apr 17 2019
NOTICE: BL31: Rockchip release version: v1.1
INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
INFO: plat_rockchip_pmu_init(1181): pd status 3e
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 K
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-02676-g4490220 (Jul 30 2019 - 17:52:33 +0800)

Model: Rockchip RK3399 rockpi4b Board
DRAM: 3.9 GiB
Relocation Offset is: f5be0000
Sysmem: init
I2c speed: 400000Hz
PMIC: RK808
vdd-center init 950000 uV
MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0
Using default environment

Model: Rockchip RK3399 rockpi4b Board
dcache off

Device 0: unknown device
dcache on
switch to partitions #0, OK
mmc1 is current device
do_rkimg_test found IDB in SDcard
Boot from SDcard
Bootdev: mmc 1
PartType: EFI
get part misc fail -1
boot mode: None
init_resource_list: failed to get resource part, ret=-1
Can’t find file:logo.bmp
failed to display uboot logo
CLK: (uboot. arml: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
CLK: (uboot. armb: enter 24000 KHz, init 24000 KHz, kernel 0N/A)
aplll 816000 KHz
apllb 24000 KHz
dpll 800000 KHz
cpll 24000 KHz
gpll 800000 KHz
npll 600000 KHz
vpll 24000 KHz
aclk_perihp 133333 KHz
hclk_perihp 66666 KHz
pclk_perihp 33333 KHz
aclk_perilp0 266666 KHz
hclk_perilp0 88888 KHz
pclk_perilp0 44444 KHz
hclk_perilp1 100000 KHz
pclk_perilp1 50000 KHz
Net: eth0: ethernet@fe300000
Hit key to stop autoboot(‘CTRL+C’): 0

Device 0: unknown device
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:4…
switch to partitions #0, OK
mmc0(part 0) is current device
Failed to mount ext2 filesystem…
** Unrecognized filesystem type **
starting USB…
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
USB2: failed to get usb phy
Port not available.
USB3: failed to get usb phy
Port not available.
USB4: Can’t get the usbphy register address
probe failed, error -6
USB5: Can’t get the usbphy register address
probe failed, error -6
scanning bus 0 for devices… 1 USB Device(s) found
scanning bus 1 for devices… 1 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found

Device 0: unknown device
ethernet@fe300000 Waiting for PHY auto negotiation to complete… done
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.50.188 (257 ms)
*** Warning: no boot file name; using ‘C0A832BC.img’
Using ethernet@fe300000 device
TFTP from server 192.168.50.1; our IP address is 192.168.50.188
Filename ‘C0A832BC.img’.
Load address: 0x800800
Loading: T T T T

The partitions 1, 2 and 3 are not ext4 partitions, so e2fsck won’t check/fix them. I may have to simply go back and re-install all of the OS software.

Or maybe I should set things up so that it boots from across the network. That might be more reliable than my SDHC card boot. Or, since I have an NVMe drive also installed, I might try to boot directly from the NVMe drive. Though then I’ll have to copy all of the files I’ve got stashed away on it to another place, re-partition/format it and then recover the files that are stored there.

I have two RockPi4C units, so I did a dd for the first three partitions from the one that booted to the one that wouldn’t boot, and now everything is operational again.

1 Like