How to install u-boot on uSD card?

Trying to follow https://wiki.radxa.com/Rock/U-Boot, I did the following:

  1. Got Linaro toolchain (7.5.0)
  2. Cloned radxa/rkbin repository
  3. Cloned radxa/u-boot repository
  4. In u-boot, switched to stable-4.4-rockpis branch
  5. Modified make.sh – set TOOLCHAIN_ARM64=PATH_TO_MY_LINARO_BINARIES
  6. ./make.sh rk3308

I got everything built:

  load addr is 0x600000!
pack input ./u-boot.bin 
pack file size: 611827 
crc = 0xb20c5c1d
uboot version: U-Boot 2017.09-02383-g233a23e3ed-dirty (Nov 18 2020 - 20:42:03)
pack uboot.img success! 
pack uboot okay! Input: ./u-boot.bin
out:rk3308_loader_uart0_m0_emmc_port_support_sd_20190717.bin
fix opt:rk3308_loader_uart0_m0_emmc_port_support_sd_20190717.bin
merge success(rk3308_loader_uart0_m0_emmc_port_support_sd_20190717.bin)
pack loader okay! Input: /rkbin/RKBOOT/RK3308MINIALL_UART0_SD_NAND.ini
/u-boot
out:trust.img
merge success(trust.img)
/u-boot
pack trust okay! Input: /rkbin/RKTRUST/RK3308TRUST.ini

Platform RK3308 is build OK, with new .config(make rk3308_defconfig)

But what to do next?
I tried writing uboot.img to SD as in the tutorial:

dd if=uboot.img of=/dev/sdb seek=64

But I only screwed my partition and u-boot didn’t load. How to do it properly?

Apart of that, I have a couple more questions:

  • What is trust.img?
  • How can I modify u-boot configuration (for example, the name of my kernel image or address where it should be loaded)?

The link you refer is for Radxa Rock, rk3188.

ROCK Pi S is RK3308, refer this:

https://wiki.radxa.com/RockpiS/dev/Debian

Hi, @eystur

If you want to build system for ROCK Pi S, I have one guide for you. https://wiki.radxa.com/RockpiS/dev/Debian.

And this is the Radxa ROCK Pi S system partition table, https://wiki.radxa.com/RockpiS/partitions.

Here are some examples for replacing idbloader.img, uboot.img or trust.img.

dd if=./idbloader.img of=/dev/sdc bs=512 seek=64
dd if=./uboot.img of=/dev/sdc bs=512 seek=16384
dd if=./trust.img of=/dev/sdc bs=512 seek=24576
sync

This helped a lot. Thanks!