From 870d3dcd2e4e6ac554906eb3486bc7b96edfe08f Mon Sep 17 00:00:00 2001 From: Jakub Duchniewicz Date: Wed, 22 Oct 2025 16:18:49 +1100 Subject: [PATCH 1/3] Add support for rock3b Signed-off-by: Jakub Duchniewicz --- build_sdk.py | 9 +++++++++ docs/manual.md | 14 ++++++++++++++ loader/src/uart.c | 12 ++++++++++++ 3 files changed, 35 insertions(+) diff --git a/build_sdk.py b/build_sdk.py index 346932f86..9591cc802 100644 --- a/build_sdk.py +++ b/build_sdk.py @@ -317,6 +317,15 @@ class ConfigInfo: "KernelPlatform": "rockpro64", } | DEFAULT_KERNEL_OPTIONS_AARCH64, ), + BoardInfo( + name="rock3b", + arch=KernelArch.AARCH64, + gcc_cpu="cortex-a55", + loader_link_address=0x30000000, + kernel_options={ + "KernelPlatform": "rk3568", + } | DEFAULT_KERNEL_OPTIONS_AARCH64, + ), BoardInfo( name="hifive_p550", arch=KernelArch.RISCV64, diff --git a/docs/manual.md b/docs/manual.md index 29551c559..28d67bc9c 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -1140,6 +1140,7 @@ The currently supported platforms are: * qemu_virt_aarch64 * qemu_virt_riscv64 * rockpro64 +* rock3b * rpi4b_1gb * rpi4b_2gb * rpi4b_4gb @@ -1379,6 +1380,19 @@ Microkit will produce a raw binary file by default, so when using U-Boot run the => go 0x30000000 +## Radxa Rock3b {#rock3b} + +Support is available for the Radxa Rock3b platform which is based on the Rockchip rk3568 SoC. + +Since the platform relies on some closed-source binary blobs for first stage bootloader and then ARM's TrustZone A, we need to compile the U-Boot including these images. Detailed instructions on how to do that are avalilable [here](https://docs.sel4.systems/Hardware/rock3b.html). + +Once the proper U-Boot image is in place, you can simply load the `loader.img` on the board and run it like that (this is assuming you have the TFTP server set up): + + => tftp 0x02000000 loader.img + => go 0x02000000 + +For more booting options, please refer to the seL4 [board setup guide](https://docs.sel4.systems/Hardware/rock3b.html). + ## Pine64 Star64 {#star64} Support is available for the Pine64 Star64 platform which is based on the diff --git a/loader/src/uart.c b/loader/src/uart.c index fa3bbad9d..c2964fb04 100644 --- a/loader/src/uart.c +++ b/loader/src/uart.c @@ -169,7 +169,19 @@ void putc(uint8_t ch) while ((*UART_REG(ULSR) & ULSR_THRE) == 0); *UART_REG(UTHR) = ch; } +#elif defined(CONFIG_PLAT_RK3568) +#define UART_BASE 0xfe660000 +#define UTHR 0x0 +#define ULSR 0x14 +#define ULSR_THRE (1 << 5) + +void uart_init(void) {} +void putc(uint8_t ch) +{ + while ((*UART_REG(ULSR) & ULSR_THRE) == 0); + *UART_REG(UTHR) = ch; +} #elif defined(CONFIG_ARCH_RISCV64) #include "riscv/sbi.h" From 389ace92d88fff4b42dd0478c730763a5c4fc856 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Fri, 13 Feb 2026 12:52:55 +1100 Subject: [PATCH 2/3] platforms.yml: add rock3b Signed-off-by: Ivan Velickovic --- platforms.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platforms.yml b/platforms.yml index d6ab88e2a..f72f69566 100644 --- a/platforms.yml +++ b/platforms.yml @@ -14,6 +14,9 @@ # This list is ordered based on the order in what the platforms were added # in. platforms: + - name: rock3b + cmake_plat: rk3568 + since: dev - name: serengeti cmake_plat: cheshire since: 2.1.0 From aad542c0bca04c808c9037a02f50fbf150f39167 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Fri, 13 Feb 2026 12:53:23 +1100 Subject: [PATCH 3/3] manual: change rock3b loader address Signed-off-by: Ivan Velickovic --- docs/manual.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manual.md b/docs/manual.md index 28d67bc9c..d5717ed75 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -1388,8 +1388,8 @@ Since the platform relies on some closed-source binary blobs for first stage boo Once the proper U-Boot image is in place, you can simply load the `loader.img` on the board and run it like that (this is assuming you have the TFTP server set up): - => tftp 0x02000000 loader.img - => go 0x02000000 + => tftp 0x30000000 loader.img + => go 0x30000000 For more booting options, please refer to the seL4 [board setup guide](https://docs.sel4.systems/Hardware/rock3b.html).