# Rockchip RK3566 quad core 2GB-8GB GBE eMMC NVMe USB3 WiFi BOARD_NAME="BigTreeTech CB2" BOARD_VENDOR="bigtreetech" BOARDFAMILY="rockchip64" BOARD_MAINTAINER="JohnTheCoolingFan" BOOTCONFIG="bigtreetech-cb2-rk3566_defconfig" BOOT_SOC="rk3566" KERNEL_TARGET="current,edge" KERNEL_TEST_TARGET="current" BOOT_FDT_FILE="rockchip/rk3566-bigtreetech-pi2.dtb" IMAGE_PARTITION_TABLE="gpt" BOOT_SCENARIO="spl-blobs" OVERLAY_PREFIX='rk3566' FULL_DESKTOP="yes" BOOT_LOGO="desktop" # TODO: replace with BOOT_SCENARIO=binman when it gets merged and in good shape function post_family_config__bigtreetech-cb2_uboot_overrides() { display_alert "$BOARD" "mainline u-boot overrides" "info" DDR_BLOB="rk35/rk3566_ddr_1056MHz_v1.21.bin" BL31_BLOB="rk35/rk3568_bl31_v1.44.elf" # NOT a typo, bl31 is shared across 68 and 66 declare -g BOOTDELAY=1 declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" declare -g BOOTBRANCH="tag:v2024.10" declare -g BOOTPATCHDIR="v2024.10/board_bigtreetech-cb2" declare -g 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 # disable stuff from rockchip64_common; we're using binman here which does all the work already # Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go function write_uboot_platform() { dd "if=${1}/u-boot-rockchip.bin" "of=${2}" bs=32k seek=1 conv=notrunc } function write_uboot_platform_mtd() { declare -a extra_opts_flashcp=("--verbose") if flashcp -h | grep -q -e '--partition'; then echo "Confirmed flashcp supports --partition -- read and write only changed blocks." >&2 extra_opts_flashcp+=("--partition") else echo "flashcp does not support --partition, will write full SPI flash blocks." >&2 fi flashcp "${extra_opts_flashcp[@]}" "${1}/u-boot-rockchip-spi.bin" /dev/mtd0 } }