How do I install mainline u-boot on Rock Pi 4?

  • How do I install mainline u-boot on microSD card?
    • Do I just need to configure it for Rock Pi 4, build it, and install it in the partition structure recommended by mainline u-boot? rockchip-bsp seems to insert idbloader and trust.img, too. I wonder mainline u-boot needs those files.
  • How do I install mainline u-boot on SPI flash?

Build mainline u-boot is the same for all arm64 Rockchip soc. You can refer:

http://opensource.rock-chips.com/wiki_U-Boot

1 Like

Hello Jack,

I want to boot ROCKPI4 with mainline u-boot (do not need linux).

From the given link,
http://opensource.rock-chips.com/wiki_U-Boot

I build the images( idbloader.img,u-boot.itb ) in the mainline u-boot code ( with rock-pi-4-rk3399 configuration).

At the link “http://opensource.rock-chips.com/wiki_Boot_option”,
Under the section " Boot from SD/TF Card" ,the commands to flash the images into sd card is mentioned as below.

dd if=idbloader.img of=sdb seek=64
dd if=u-boot.itb of=sdb seek=16384
dd if=boot.img of=sdb seek=32768
dd if=rootfs.img of=sdb seek=262144

should the sd-card device be formatted to a particular file-system type??
Should we also partition the sd card??
If yes,please mention their details.

Regards,
Adarsh

If you are loading boot image or a script from a file system, then yes. It has to be ext4 or fat.

Hi All,

My Host System Configuration is with Ubuntu Linux -16.04 LTS

Among the below commands:

dd if=idbloader.img of=sdb seek=64
dd if=u-boot.itb of=sdb seek=16384
dd if=boot.img of=sdb seek=32768
dd if=rootfs.img of=sdb seek=262144

I tried the first two and they needed modification.

Also, I had to initially prepare my sdhc card with all the mentioned partitions and then
execute the below commands.

dd if=idbloader.img of=/dev/sdb seek=64
dd if=u-boot.itb of=/dev/sdb seek=16384

or

dd if=idbloader.img of=/dev/sdb1
dd if=u-boot.itb of=/dev/sdb2

Regards,
Adarsh