Skip to content

Commit 54e6189

Browse files
committed
rockchip64: fix errexit build failure on SPI boards (undefined hook)
Commit 944f2f9 added a board_uboot_spi_image_after_build hook using the idiom: declare -F board_uboot_spi_image_after_build >/dev/null && \ board_uboot_spi_image_after_build No board defines this hook, so 'declare -F' returns 1 and the && chain evaluates to exit status 1. As the last statement in the BOOT_SUPPORT_SPI branch it becomes the return value of uboot_custom_postprocess, and under the runner's 'set -e -o pipefail' that aborts the build: Error 1 occurred in main shell at lib/functions/compilation/uboot.sh:286 This broke every rockchip board with BOOT_SUPPORT_SPI=yes (e.g. orangepi5-ultra and other rk35xx SPI-boot boards); boards without SPI support were unaffected. Guard the optional hook with a proper 'if' so a missing hook no longer propagates a non-zero exit, matching the style of the sibling board_uboot_spl_blobs_postprocess hook. Signed-off-by: Igor Pecovnik <igor@armbian.com>
1 parent b5dd29a commit 54e6189

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

config/sources/families/include/rockchip64_common.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,9 @@ uboot_custom_postprocess() {
324324
# (e.g. for Maskrom recovery). Invoked after both rkspi_loader.img
325325
# build paths so the hook contract is consistent regardless of
326326
# BOOT_SPI_RKSPI_LOADER.
327-
declare -F board_uboot_spi_image_after_build >/dev/null && \
327+
if declare -F board_uboot_spi_image_after_build >/dev/null; then
328328
board_uboot_spi_image_after_build
329+
fi
329330
fi
330331
}
331332

0 commit comments

Comments
 (0)