[BPI-R2 Pro] mainline uboot support


good news:

after mainline uboot was broken for r2pro/rk35xx in 2022.07+, a new patch series brings support back in 2023.04 (when merged to it but i think mergewindow is closed for this, else in my repo).

https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

edit: added changes to new 2023-04-bpi branch too and build uboot including a basic sd image with github actions. done this for r2 (mt7623 too) to have all binaries and sdcard image templates there now.

regards Frank

1 Like

There are some pending patches on the TF-A sources to support rk3568 instead of the rkbin binaries https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16952

have you got it working with it? my last information was that patches were incomplete

I haven’t tried yet, recently bought a rk3568 board and I’ve been reading how is build in openwrt, as they use a dedicated fork https://github.com/atf-builds/atf

This repo seems not having rk356x target

But a git is linked…


We need to figure out how to build…maybe similar to the other targets

I created a AT release with the patch applied https://github.com/antnyfls/arm-trusted-firmware/releases , I’m trying to add it to the build.sh script https://github.com/antnyfls/atf/blob/master/build.sh It failed to build https://github.com/antnyfls/atf/actions/runs/4337086109/jobs/7572849275

In file included from plat/rockchip/common/include/plat_private.h:16,
                 from plat/rockchip/common/aarch64/platform_common.c:18:
include/lib/xlat_tables/xlat_tables_v2.h:30: error: "MAP_REGION" redefined [-Werror]
   30 | #define MAP_REGION(_pa, _va, _sz, _attr) \
In file included from include/lib/xlat_tables/xlat_tables_compat.h:13,
                 from plat/rockchip/common/aarch64/platform_common.c:16:

You should include xlat_tables.h or xlat_tables_v2.h,but not both,but it seem patch does this…importing compat from platform_common.c and v2 from plat_private.h

You can try building the linked git and then compare this with your version

Problem is the script, that build all target, I fixed removing all less rk3568 https://github.com/antnyfls/atf/actions/runs/4337973271/jobs/7574338691

1 Like

Nice…so we can get bl31,but tpl/ram-init is missing…and i saw a comment that some clocks are missing

i combined the 2 repos and made the build-script a bit smaller (need to tidy up some parts)

it seems the same issue is preventing merge of the patchset…

Seems v7 is adressing the issue


Seems now all is handled by xlat_tables_v2 header. But spdx header still says 2022 which will prevent the merge :frowning:

Atf is on v11 and the most issues were fixed. No information yet for scmi and ddr init. updated rk-atf branch in my uboot-repo to v11

For uboot itself there is a patch series which drops distro boot and i plan to unify my u-boot/kernel repo to use fit and builtin env like for r64/r3

https://patchwork.ozlabs.org/project/uboot/patch/2023040[email protected]/

Have manually booted fit image but need to add/change environment to use this by default.

1 Like