From 3e3d725da47576d242d2b2d805fb9a9155218056 Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Thu, 23 Oct 2025 04:08:10 +0000 Subject: [PATCH] shift stuff around, enhance description --- config/boards/radxa-zero3.csc | 58 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/config/boards/radxa-zero3.csc b/config/boards/radxa-zero3.csc index 7f9a96eb58..1c46652820 100644 --- a/config/boards/radxa-zero3.csc +++ b/config/boards/radxa-zero3.csc @@ -1,4 +1,4 @@ -# Rockchip RK3566 quad core +# Rockchip RK3566 quad core 1/2/4/8GB RAM WiFi/BT or GBE HDMI USB-C BOARD_NAME="Radxa ZERO 3" BOARDFAMILY="rk35xx" BOARD_MAINTAINER="" @@ -17,6 +17,34 @@ PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools" AIC8800_TYPE="sdio" enable_extension "radxa-aic8800" +function post_family_config__use_mainline_uboot() { + + # boot.scr will use whatever u-boot detects and sets 'fdtfile' to. + # This however this doesn't work with Rockchip bsp based kernels since naming differs. + # So leave decision to u-boot ONLY when mainline kernel is used. + if [[ "${BRANCH}" != "vendor" ]]; then + unset BOOT_FDT_FILE + fi + + BOOTCONFIG="radxa-zero-3-rk3566_defconfig" + BOOTSOURCE="https://github.com/u-boot/u-boot" + BOOTBRANCH="tag:v2025.10" + BOOTPATCHDIR="v2025.10" + + UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin" + ## For binman-atf-mainline: setting BOOT_SCENARIO at the top would break branch=vendor, so we don't enable it globally. + # We cannot set BOOT_SOC=rk3566 due to side effects in Armbian scripts; ATF_TARGET_MAP is the safer override. + # ATF does not currently separate rk3566 from rk3568. + #ATF_TARGET_MAP="M0_CROSS_COMPILE=arm-linux-gnueabi- PLAT=rk3568 bl31;;build/rk3568/release/bl31/bl31.elf:bl31.elf" + #UBOOT_TARGET_MAP="BL31=bl31.elf ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin" + + unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd + + function write_uboot_platform() { + dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none + } +} + function post_family_tweaks_bsp__aic8800_wireless() { display_alert "$BOARD" "Installing AIC8800 Tweaks" "info" mkdir -p "${destination}"/etc/modprobe.d @@ -52,32 +80,4 @@ function post_family_tweaks__enable_aic8800_bluetooth_service() { else display_alert "$BOARD" "aic-bluetooth.service not found in image; skipping enable" "warn" fi -} - -function post_family_config__use_mainline_uboot() { - - # boot.scr will use whatever u-boot detects and sets 'fdtfile' to. - # This however this doesn't work with Rockchip bsp based kernels since naming differs. - # So leave decision to u-boot ONLY when mainline kernel is used. - if [[ "${BRANCH}" != "vendor" ]]; then - unset BOOT_FDT_FILE - fi - - BOOTCONFIG="radxa-zero-3-rk3566_defconfig" - BOOTSOURCE="https://github.com/u-boot/u-boot" - BOOTBRANCH="tag:v2025.10" - BOOTPATCHDIR="v2025.10" - - UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin" - ## For binman-atf-mainline: setting BOOT_SCENARIO at the top would break branch=vendor, so we don't enable it globally. - # We cannot set BOOT_SOC=rk3566 due to side effects in Armbian scripts; ATF_TARGET_MAP is the safer override. - # ATF does not currently separate rk3566 from rk3568. - #ATF_TARGET_MAP="M0_CROSS_COMPILE=arm-linux-gnueabi- PLAT=rk3568 bl31;;build/rk3568/release/bl31/bl31.elf:bl31.elf" - #UBOOT_TARGET_MAP="BL31=bl31.elf ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin" - - unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd - - function write_uboot_platform() { - dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none - } } \ No newline at end of file