From 879c3642ceeff76a5b3ec2bdcd5103d8c2f518cb Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Mon, 31 Mar 2025 08:33:38 +0200 Subject: [PATCH] Revert "rock-3a: remove duplicate code by combining functions" This reverts commit 0b450f287f9796073c5bedc6ecfaafa8eb47c365. --- config/boards/rock-3a.conf | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/config/boards/rock-3a.conf b/config/boards/rock-3a.conf index 18a82e638..9773ca1f2 100644 --- a/config/boards/rock-3a.conf +++ b/config/boards/rock-3a.conf @@ -5,7 +5,7 @@ BOARD_MAINTAINER="ZazaBR amazingfate catalinii vamzii" BOOTCONFIG="rock-3a-rk3568_defconfig" BOOTCONFIG_SATA="rock-3a-sata-rk3568_defconfig" KERNEL_TARGET="current,edge,vendor" -KERNEL_TEST_TARGET="current,vendor" +KERNEL_TEST_TARGET="current" FULL_DESKTOP="yes" BOOT_LOGO="desktop" BOOT_FDT_FILE="rockchip/rk3568-rock-3a.dtb" @@ -15,12 +15,29 @@ BOOT_SPI_RKSPI_LOADER="yes" IMAGE_PARTITION_TABLE="gpt" BOOTFS_TYPE="fat" -function post_family_config__rock-3a_use_mainline_uboot_except_vendor() { - # use mainline uboot for _current_ and _edge_ - if [[ "$BRANCH" != "current" && "$BRANCH" != "edge" ]]; then - return 0 - fi +function post_family_config_branch_edge__rock-3a_use_mainline_uboot() { + display_alert "$BOARD" "Mainline U-Boot overrides for $BOARD - $BRANCH" "info" + unset BOOTFS_TYPE # fixes armbian-install and unneeded for modern uboot anyway + declare -g BOOTCONFIG="rock-3a-rk3568_defconfig" + declare -g BOOTDELAY=1 + declare -g BOOTSOURCE="https://github.com/u-boot/u-boot" + declare -g BOOTBRANCH="tag:v2025.01" + declare -g BOOTPATCHDIR="v2025.01" + declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory + declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.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 status=none + } + + function write_uboot_platform_mtd() { + flashcp -v -p "$1/u-boot-rockchip-spi.bin" /dev/mtd0 + } +} + +function post_family_config_branch_current__rock-3a_use_mainline_uboot() { display_alert "$BOARD" "Mainline U-Boot overrides for $BOARD - $BRANCH" "info" unset BOOTFS_TYPE # fixes armbian-install and unneeded for modern uboot anyway declare -g BOOTCONFIG="rock-3a-rk3568_defconfig" @@ -51,6 +68,7 @@ function post_family_config__rock3a_uboot_add_sata_target() { } function post_uboot_custom_postprocess__create_sata_spi_image() { + display_alert "$BOARD" "Create rkspi_loader_sata.img" "info" dd if=/dev/zero of=rkspi_loader_sata.img bs=1M count=0 seek=16