From fa5a2f95fbb77e7fff308474a3d9ae6aa0289f58 Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Thu, 23 Oct 2025 03:53:34 +0000 Subject: [PATCH 1/3] abandon vendor uboot --- config/boards/radxa-zero3.csc | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/config/boards/radxa-zero3.csc b/config/boards/radxa-zero3.csc index b743c421ed8c..4624c28d8d44 100644 --- a/config/boards/radxa-zero3.csc +++ b/config/boards/radxa-zero3.csc @@ -56,8 +56,7 @@ function post_family_tweaks__enable_aic8800_bluetooth_service() { fi } -function post_family_config__use_mainline_uboot() { - [[ "${BRANCH}" == "vendor" ]] && return 0 +function post_family_config__1_use_mainline_uboot() { unset BOOT_FDT_FILE # boot.scr will use whatever u-boot detects and sets 'fdtfile' to unset BOOTFS_TYPE # mainline u-boot can boot ext4 directly @@ -80,17 +79,7 @@ function post_family_config__use_mainline_uboot() { } } -# Override family config for this board; let's avoid conditionals in family config. -function post_family_config_branch_vendor__radxa-zero3_use_vendor_uboot() { - BOOTSOURCE='https://github.com/radxa/u-boot.git' - BOOTBRANCH='branch:rk35xx-2024.01' - BOOTPATCHDIR="u-boot-radxa-latest" - - UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB 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_config_branch_vendor__2_zero3_different_dtb_for_vendor() { + declare -g BOOT_FDT_FILE="rockchip/rk3566-radxa-zero3.dtb" + display_alert "$BOARD" "Using ${BOOT_FDT_FILE} for ${BRANCH}" "warn" } \ No newline at end of file From c57755769d408475de469a45b4207bdd5f5f5fbd Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Thu, 23 Oct 2025 04:03:19 +0000 Subject: [PATCH 2/3] make it nicer, remove unneeded stuff, enable `current` test target --- config/boards/radxa-zero3.csc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/config/boards/radxa-zero3.csc b/config/boards/radxa-zero3.csc index 4624c28d8d44..7f9a96eb58f7 100644 --- a/config/boards/radxa-zero3.csc +++ b/config/boards/radxa-zero3.csc @@ -4,14 +4,12 @@ BOARDFAMILY="rk35xx" BOARD_MAINTAINER="" BOOTCONFIG="radxa-zero3-rk3566_defconfig" KERNEL_TARGET="vendor,current,edge" -KERNEL_TEST_TARGET="vendor" +KERNEL_TEST_TARGET="vendor,current" FULL_DESKTOP="yes" BOOT_LOGO="desktop" BOOT_FDT_FILE="rockchip/rk3566-radxa-zero3.dtb" IMAGE_PARTITION_TABLE="gpt" BOOT_SCENARIO="spl-blobs" -BOOTFS_TYPE="fat" # Only for vendor/legacy - PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools" # add for OBEX file transfer: @@ -56,10 +54,15 @@ function post_family_tweaks__enable_aic8800_bluetooth_service() { fi } -function post_family_config__1_use_mainline_uboot() { +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 - unset BOOT_FDT_FILE # boot.scr will use whatever u-boot detects and sets 'fdtfile' to - unset BOOTFS_TYPE # mainline u-boot can boot ext4 directly BOOTCONFIG="radxa-zero-3-rk3566_defconfig" BOOTSOURCE="https://github.com/u-boot/u-boot" BOOTBRANCH="tag:v2025.10" @@ -77,9 +80,4 @@ function post_family_config__1_use_mainline_uboot() { function write_uboot_platform() { dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none } -} - -function post_family_config_branch_vendor__2_zero3_different_dtb_for_vendor() { - declare -g BOOT_FDT_FILE="rockchip/rk3566-radxa-zero3.dtb" - display_alert "$BOARD" "Using ${BOOT_FDT_FILE} for ${BRANCH}" "warn" } \ No newline at end of file From e1563d995ec30d6331dda19e9660dd40f1badb63 Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Thu, 23 Oct 2025 04:08:10 +0000 Subject: [PATCH 3/3] 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 7f9a96eb58f7..1c466528209a 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