Skip to content

Commit 16742ea

Browse files
committed
Rock5B+: Use upstream u-boot for vendor branch too
1 parent b3912bb commit 16742ea

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

config/boards/rock-5b-plus.conf

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,30 @@ function post_family_tweaks__rock5b_naming_audios() {
2828
}
2929

3030
# Mainline u-boot tree
31-
# see rock-5b.conf and https://github.com/armbian/build/pull/7135
31+
# Vendor:
32+
function post_family_config_branch_vendor__rock-5b_use_mainline_uboot() {
33+
display_alert "$BOARD" "vendor u-boot overrides for $BOARD / $BRANCH" "info"
34+
35+
declare -g BOOTCONFIG="rock5b-rk3588_defconfig" # override the default for the board/family
36+
declare -g BOOTDELAY=1 # Wait for UART interrupt to enter UMS/RockUSB mode etc
37+
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" # We ❤️ Mainline tree
38+
declare -g BOOTBRANCH="branch:master" #
39+
declare -g BOOTPATCHDIR="master" # empty; defconfig changes are done in hook below
40+
declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
41+
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"
42+
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
43+
44+
# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
45+
function write_uboot_platform() {
46+
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
47+
}
48+
49+
function write_uboot_platform_mtd() {
50+
flashcp -v -p "$1/u-boot-rockchip-spi.bin" /dev/mtd0
51+
}
52+
}
53+
54+
# Edge:
3255
function post_family_config_branch_edge__rock-5b_use_mainline_uboot() {
3356
display_alert "$BOARD" "mainline (next branch) u-boot overrides for $BOARD / $BRANCH" "info"
3457

@@ -38,8 +61,8 @@ function post_family_config_branch_edge__rock-5b_use_mainline_uboot() {
3861
declare -g BOOTCONFIG="rock5b-rk3588_defconfig" # override the default for the board/family
3962
declare -g BOOTDELAY=1 # Wait for UART interrupt to enter UMS/RockUSB mode etc
4063
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" # We ❤️ Mainline tree
41-
declare -g BOOTBRANCH="tag:v2025.04" #
42-
declare -g BOOTPATCHDIR="v2025.04" # empty; defconfig changes are done in hook below
64+
declare -g BOOTBRANCH="branch:master" #
65+
declare -g BOOTPATCHDIR="master" # empty; defconfig changes are done in hook below
4366
declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
4467
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"
4568
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
@@ -55,8 +78,6 @@ function post_family_config_branch_edge__rock-5b_use_mainline_uboot() {
5578
}
5679

5780
function post_config_uboot_target__extra_configs_for_rock5b_mainline_environment_in_spi() {
58-
[[ "${BRANCH}" != "edge" ]] && return 0
59-
6081
display_alert "$BOARD" "u-boot configs for ${BOOTBRANCH} u-boot config BRANCH=${BRANCH}" "info"
6182
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_NOWHERE "n"
6283
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_IN_SPI_FLASH "y"

0 commit comments

Comments
 (0)