4.26. Rockchip RK3188

4.26.1. Radxa Rock

Radxa Rock is a small SBC based on Rockchip RK3188 SoC. See http://radxa.com/Rock for additional information.

4.26.1.1. Building

make ARCH=arm radxa_rock_defconfig
make ARCH=arm

4.26.1.2. Creating bootable SD card

This will require a DRAM setup blob and additional utilities, see above.

Card layout (block == 0x200 bytes).

Block Number

Name

0x0000

DOS partition table

0x0040

RK bootinfo (BootROM check sector)

0x0044

DRAM setup routine

0x005C

Bootloader (barebox)

0x0400

Barebox environment

0x0800

Free space start

Instructions.

4.27. Rockchip RK356x

Barebox features support for the Rockchip RK3566 and RK3568 SoCs, where the RK3566 can be considered as reduced but largely identical version of the RK3568.

4.27.1. Supported Boards

  • Rockchip RK3568 EVB

  • Rockchip RK3568 Bananapi R2 Pro

  • Pine64 Quartz64 Model A

  • Radxa ROCK3 Model A

  • Radxa CM3 (RK3566) IO Board

  • Protonic MECSBC

The steps described in the following target the RK3568 and the RK3568 EVB but generally apply to both SoCs and all boards. Differences between the SoCs or boards are outlined where required.

4.27.2. Building

The build process needs three binary files which have to be copied from the rkbin https://github.com/rockchip-linux/rkbin repository to the barebox source tree:

cp $RKBIN/bin/rk35/rk3568_bl31_v1.34.elf firmware/rk3568-bl31.bin
cp $RKBIN/bin/rk35/rk3568_bl32_v2.08.bin firmware/rk3568-op-tee.bin
cp $RKBIN/bin/rk35/rk3568_ddr_1560MHz_v1.13.bin arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin

With these barebox can be compiled as:

make ARCH=arm rockchip_v8_defconfig
make ARCH=arm

NOTE I found the bl32 firmware non working for me as of 7d631e0d5b2d373b54d4533580d08fb9bd2eaad4 in the rkbin repository.

NOTE The RK3566 and RK3568 seem to share the bl31 and bl32 firmware files, whereas the memory initialization blob is different.

4.27.3. Creating a bootable SD card

A bootable SD card can be created with:

dd if=images/barebox-rk3568-evb.img of=/dev/sdx bs=1024 seek=32

The barebox image is written to the raw device, so make sure the partitioning doesn’t conflict with the are barebox is written to. Starting the first partition at offset 8MiB is a safe bet.

4.27.4. USB bootstrapping

The RK3568 can be bootstrapped via USB for which the rk-usb-loader tool in the barebox repository can be used. The tool takes the same images as written on SD cards:

./scripts/rk-usb-loader images/barebox-rk3568-evb.img

Note that the boot order of the RK3568 is not configurable. The SoC will only enter USB MaskROM mode when no other bootsource contains a valid bootloader. This means to use USB you have to make all other bootsources invalid by removing SD cards and shortcircuiting eMMCs. The RK3568 EVB has a pushbutton to disable the eMMC. On the Quartz64 boards, remove the eMMC module if present.