From 70dd1de0bf33ec7cd7fb17d9b7397baab887be25 Mon Sep 17 00:00:00 2001 From: Garrett Giordano Date: Thu, 5 Oct 2023 11:36:29 -0700 Subject: uboot: Handle UBOOT_CONFIG for multiple R5 defconfigs Currently the do_compile step fails if we try to implement UBOOT_CONFIG in an attempt to build U-Boot with multiple R5 defconfigs. This commit adds a condition to handle linking the UBOOT_BINARY if UBOOT_CONFIG is used in place of UBOOT_MACHINE. Signed-off-by: Garrett Giordano Signed-off-by: Ryan Eatmon --- meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc') diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc index af7cb19d..4a6eada2 100644 --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc @@ -106,8 +106,26 @@ UBOOT_HS_2ND_IMAGE = "u-boot-spl_HS_2ND-${MACHINE}-${PV}-${PR}" UBOOT_HS_2ND_SYMLINK = "u-boot-spl_HS_2ND-${MACHINE}" do_compile:append:k3r5 () { - if ! [ -f ${B}/${UBOOT_BINARY} ]; then - ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY} + if [ -n "${UBOOT_CONFIG}" ]; + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ]; + then + if ! [ -L ${B}/${config}/${UBOOT_BINARY} ] && ! [ -f ${B}/${config}/${UBOOT_BINARY} ]; then + ln -s ${B}/${config}/spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${config}/${UBOOT_BINARY} + fi + fi + done + unset j + done + unset i + else + if ! [ -f ${B}/${UBOOT_BINARY} ]; then + ln -s spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${UBOOT_BINARY} + fi fi } -- cgit v1.2.3-54-g00ecf