Issue Updating to Mainline U-Boot on Rock Pi 4C+ (RK3399)

Hi everyone,

I’m trying to update my U-Boot to the mainline version following the official documentation:
https://docs.u-boot.org/en/latest/board/rockchip/rockchip.html#about-this

I’m using a Rock Pi 4C+ (RK3399) and facing some issues during the boot process. Here are my logs:

atags_set_bootdev: ret:(0)
GPT part: 0, name: loader1, start:0x40, size:0x1f40
GPT part: 1, name: reserved1, start:0x1f80, size:0x80
GPT part: 2, name: uboot, start:0x2000, size:0x2000
GPT part: 3, name: trust, start:0x4000, size:0x2000
GPT part: 4, name: atf, start:0x6000, size:0x2000
GPT part: 5, name: boot, start:0x8000, size:0x38000
GPT part: 6, name: rootfs, start:0x40000, size:0x1d1efdf
find part:uboot OK. first_lba:0x2000.
find part:trust OK. first_lba:0x4000.
LoadTrust Addr:0x4000
No find bl30.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x60000000, size=0xe43f0
RunBL31 0x40000
NOTICE: BL31: v1.3(release):8f40012ab
NOTICE: BL31: Built : 14:20:53, Feb 16 2023
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(1203): pd status 3e
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
INF [0x0] TEE-CORE:init_primary_helper:337: Initializing (1.1.0-294-g369edd59c #hisping.lin #2 Tue Apr 16 06:28:00 UTC 2024 aarch64, fwver: v2.12 )
INF [0x0] TEE-CORE:init_primary_helper:338: Release version: 1.2
INF [0x0] TEE-CORE:init_primary_helper:339: OP-TEE memory: TEEOS 0x200000 TA 0x1800000 SHM 0x400000
INF [0x0] TEE-CORE:init_teecore:83: teecore inits done
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x60000000
INFO: SPSR = 0x3c9

Here is my parameter_gpt.txt
FIRMWARE_VER: 6.0.0
MACHINE_MODEL: RK3399
MACHINE_ID: 007
MANUFACTURER: RK3399
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 3399
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
#KERNEL_IMG: 0x00280000
#FDT_NAME: rk-kernel.dtb
#RECOVER_KEY: 1,1,0,20,0
#in section; per section 512(0x200) bytes
CMDLINE: mtdparts=rk29xxnand:0x00001f40@0x00000040(loader1),0x00000080@0x00001f80(reserved1),0x00002000@0x00002000(uboot),0x00002000@0x00004000(trust),0x00002000@0x00006000(atf),0x00038000@0x00008000(boot:bootable),-@0x0040000(rootfs)

It seems that bl30.bin is missing , but I’m not sure if it’s needed for mainline U-Boot on Rockchip. Also, after BL31, the boot process doesn’t proceed.

Has anyone successfully installed mainline U-Boot on a Rock Pi 4C+ ? Any suggestions on what might be going wrong?

Thanks in advance!

I did not tried that with radxa images, but as far as I remember armbian edge comes with mainline u-boot for this board, so You may have such example.

Thanks @dominik

I am able to solve this issue and able to load the uboot .

U-Boot TPL 2025.04-rc5-gc17f03a7e93d-dirty (Apr 09 2025 - 16:14:26)
lpddr4_set_rate: change freq to 400MHz 0, 1
Channel 0: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 800MHz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM…

U-Boot SPL 2025.04-rc5-gc17f03a7e93d-dirty (Apr 09 2025 - 16:14:26 +0530)
Trying to boot from MMC1

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

Checking hash(es) for Image atf-4 … sha256+ OK

load_simple_fit: Skip load ‘atf-5’: image size is 0!
NOTICE: BL31: v2.12.0(release):314aa18
NOTICE: BL31: Built : 16:05:38, Apr 7 2025

U-Boot 2025.04-rc5-gc17f03a7e93d-dirty (Apr 09 2025 - 16:14:26 +0530)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK 4C+
DRAM: 4 GiB (effective 3.9 GiB)
PMIC: RK809 (on=0x40, off=0x00)
Core: 303 devices, 32 uclasses, devicetree: separate
MMC: mmc@fe310000: 2, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC… Reading from MMC(0)… OK
In: serial,usbkbd
Out: serial,vidconsole
Err: serial,vidconsole
Model: Radxa ROCK 4C+
Card did not respond to voltage select! : -110
Unable to get mmc desc
Net: eth0: ethernet@fe300000

Hit any key to stop autoboot: 0

1 Like