U-boot compilation error

HI

Rockpi5b uboot from below link gives error
https://wiki.radxa.com/Rock5/guide/build-debian-from-debos-radxa

OBJCOPY u-boot-nodtb.bin
start=$(aarch64-none-linux-gnu-nm u-boot | grep __rel_dyn_start | cut -f 1 -d ’ '); end=$(aarch64-none-linux-gnu-nm u-boot | grep __rel_dyn_end | cut -f 1 -d ’ '); tools/relocate-rela u-boot-nodtb.bin 0x00200000 $start $end
./“arch/arm/mach-rockchip/make_fit_atf.sh”
arch/arm/dts/rk3588-rock-5b.dtb > u-boot.its
Traceback (most recent call last):
File “/root/rk3588-sdk2/u-boot/arch/arm/mach-rockchip/decode_bl31.py”, line 58, in
main()
File “/root/rk3588-sdk2/u-boot/arch/arm/mach-rockchip/decode_bl31.py”, line 55, in main
generate_atf_binary(bl31_elf);
File “/root/rk3588-sdk2/u-boot/arch/arm/mach-rockchip/decode_bl31.py”, line 38, in generate_atf_binary
for index, entry, paddr, data in unpack_elf(bl31_file_name):
File “/root/rk3588-sdk2/u-boot/arch/arm/mach-rockchip/decode_bl31.py”, line 18, in unpack_elf
with open(filename, ‘rb’) as file:
IOError: [Errno 2] No such file or directory: ‘…/rkbin/bin/rk35/rk3588_bl31_v1.47.elf’
ls: cannot access ‘bl31_0x*.bin’: No such file or directory
MKIMAGE u-boot.itb
./tools/mkimage: Can’t open …/rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin: No such file or directory
Error: SPL image is too large (size 0xffffffff than 0xff000)
Error: Bad parameters for image type
Usage: ./tools/mkimage -l image
-l ==> list image header information
./tools/mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file…] image
-A ==> set architecture to ‘arch’
-O ==> set operating system to ‘os’
-T ==> set image type to ‘type’
-C ==> set compression type ‘comp’
-a ==> set load address to ‘addr’ (hex)
-e ==> set entry point to ‘ep’ (hex)
-n ==> set image name to ‘name’
-d ==> use image data from ‘datafile’
-x ==> set XIP (execute in place)
./tools/mkimage [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b [-b ]] [-i <ramdisk.cpio.gz>] fit-image
file is used with -f auto, it may occur multiple times.
-D => set all options for device tree compiler
-f => input filename for FIT source
-i => input filename for ramdisk file
-v => set FIT image version in decimal
Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)
./tools/mkimage -V ==> print version information and exit
Use ‘-T list’ to see a list of available image types

It seems to be looking for files that are in branch “develop-v2024.10” of rkbin. Maybe you forgot to clone that repository, or the default branch remained a different one and you’ll have to checkout that one instead from the cloned repo.

this wiki is out of date, please refer to https://docs.radxa.com/en/rock5/rock5b/low-level-dev/u-boot

and we use rsdk to build our system now.

Why not also put this URL on the wiki, there are so many users that don’t realise it’s out of date.

Thanks for the heads up, we’re planning to migrate all the wiki content to docs.radxa.com, and then we’ll redirect the url to docs.radxa.com at wiki.radxa.com!

I know we’re getting off-topic, but be careful when doing this. This means you’ll break 100% of the links pointing to docs.radxa.com everywhere on the net (including in this forum and various articles from your site or docs), giving 404 to a wide range of visitors seeking info or even just discovering your products for the first time. Others having migrated their docs tend to avoid this by just placing a banner at the top of the old site saying “This version is outdated and proposed for archive purposes only, please check wiki.radxa.com”. Alternately you can redirect only the home page and keep the rest for archives. But spreading 404 everywhere is a really bad practice and extremely unpleasant experience for those trying to find info to fix a board.

1 Like

yeah, it’s a good idea!

OK i will check that
how do i get u-boot comand prompt on rockpi5b board. I dont get it using escape or enter.
I want to check and change u-boot command line arguments’ want to change the file system type.

It would be great help

Do you want to access theu u-boot console? You can use “ctrl + c” button to stop u-boot and access the u-boot console.

I have chcked on serial console , ctrl+c doesn’t work on rockpi5b board

rock 5b disabled the debug console, you need enable it, such as follows:

 cat /etc/kernel/cmdline 
console=ttyFIQ0,1500000n8 quiet splash loglevel=4 rw earlycon consoleblank=0 console=tty1 coherent_pool=2M irqchip.gicv3_pseudo_nmi=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

then excute it by cmd “sudo u-boot-update”, and reboot the system, then you can try stop the u-boot by “ctrl + c”.

I haven’t tried this, but how do you enable the U-Boot-console, with the kernel-parameters for the kernel-console? One would think you’d need a different build of U-Boot that has the U-Boot-console enabled.

But I do not know the source of u-boot-update, so maybe it does some magic here?

The above method i tried still the u-boot console is not obsrerved

And also i wanted to ask you that , can we change rootfile system to F2FS and boot the ROCKPi 5b Board. is it supports ?U-boot supports ?

If you use a separate boot partition, your root partition can be any that is supported (and buildin or included in initramfs) by your linux kernel.

Btrfs is supported by (mainline) U-Boot, not sure about the vendor U-Boot version. So if you do not want a separate boot partition, you could use btrfs.

U-boot console is always enabled, there’s no option for it. Normally at boot you should see the DDR training messages and u-boot. If you don’t, it’s likely an issue with USB-UART adapter. It needs to be set to 1.5 Mbps. Some do not support such speed. Your wires must be reasonably short (less than 20cm). Double-check your connections.

1 Like

They had it disabled for 5b with PD power bootloops, shortening boot time. Recently maybe not, I use my own build.

If I may suggest something, xfs is much more performant and better maintained than f2fs

They had it disabled for 5b with PD power bootloops, shortening boot time. Recently maybe not, I use my own build.

Huh ? A boot loader without console is basically what defines a bricked machine. Also at 1.5 Mbps, there’s zero perceptible boot time degradation. I don’t get the concept.

1 Like