diff --git a/config/boards/radxa-zero3.csc b/config/boards/radxa-zero3.csc index a6a79b8cc2..b743c421ed 100644 --- a/config/boards/radxa-zero3.csc +++ b/config/boards/radxa-zero3.csc @@ -57,6 +57,7 @@ function post_family_tweaks__enable_aic8800_bluetooth_service() { } function post_family_config__use_mainline_uboot() { + [[ "${BRANCH}" == "vendor" ]] && return 0 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 @@ -74,6 +75,21 @@ function post_family_config__use_mainline_uboot() { 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 + } +} + +# 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 }