Skip to contentSkip to conversation

u-boot-ti: Clean up config looping code

PATCH In review Ryan Eatmon 2 participants 2 messages Dec 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot-ti: Clean up config looping code

Cleanup a few incorrect issues with the current file naming under the config looping code.

1) Since binman is creating the tiboot3 files and signing them, when we are trying to create the named version of the files, we do not want to link against the spl/uboot-spl.bin file. We need to figure out what the tiboot3.bin is pointing at and make this named version point at the same thing.

2) When deploying the tiboot3 files, if we are deploying something that is a link, then we should point the deployed link to the same named target. This should help with figuring out what all of the links actually point to from the build dir instead of running into .bin file that has lost the audit trail.

---
 meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 44 ++++++++++++++------
 1 file changed, 32 insertions(+), 12 deletions(-)
meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc +32 -12
index 92ec5ca8..04a784d5 100644
@@ -150,13 +150,17 @@ uboot_compile_config_copy_binary:k3r5 () {
 
     builddir="${builddir}"
 
-    if ! [ -L ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ] && ! [ -f ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ]; then
-        ln -s ${B}/${builddir}/spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
-    fi
-
     if ! [ -L ${B}/${builddir}/${binary} ] && ! [ -f ${B}/${builddir}/${binary} ]; then
         ln -s ${B}/${builddir}/spl/u-boot-spl.${UBOOT_SUFFIX} ${B}/${builddir}/${binary}
     fi
+
+    if ! [ -L ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ] && ! [ -f ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ]; then
+        tgt="${B}/${builddir}/${binary}"
+        if [ -L ${B}/${builddir}/${binary} ]; then
+            tgt=$(realpath ${B}/${builddir}/${binary})
+        fi
+        ln -s ${tgt} ${B}/${builddir}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
+    fi
 }
 
 uboot_install_config:append () {
@@ -230,18 +234,32 @@ do_deploy:append:k3r5 () {
 
 uboot_deploy_config:append:k3r5 () {
 	for f in ${B}/${builddir}/tiboot3-*.bin; do
-		if [ -f "$f" ]; then
+		if [ -L "$f" ]; then
 			f_base=$(basename $f)
-			install -m 644 $f ${DEPLOYDIR}/${f_base}-${type}
-			ln -sf ${f_base}-${type} ${DEPLOYDIR}/${f_base}
+			tgt=$(realpath $f)
+			tgt_base=$(basename $tgt)
+			ln -sf ${tgt_base}-${type} ${DEPLOYDIR}/${f_base}-${type}
+		else
+			if [ -f "$f" ]; then
+				f_base=$(basename $f)
+				install -m 644 $f ${DEPLOYDIR}/${f_base}-${type}
+				ln -sf ${f_base}-${type} ${DEPLOYDIR}/${f_base}
+			fi
 		fi
 	done
 
 	for f in ${B}/${builddir}/sysfw*.itb; do
-		if [ -f "$f" ]; then
+		if [ -L "$f" ]; then
 			f_base=$(basename $f)
-			install -m 644 $f ${DEPLOYDIR}/${f_base}-${type}
-			ln -sf ${f_base}-${type} ${DEPLOYDIR}/${f_base}
+			tgt=$(realpath $f)
+			tgt_base=$(basename $tgt)
+			ln -sf ${tgt_base}-${type} ${DEPLOYDIR}/${f_base}-${type}
+		else
+			if [ -f "$f" ]; then
+				f_base=$(basename $f)
+				install -m 644 $f ${DEPLOYDIR}/${f_base}-${type}
+				ln -sf ${f_base}-${type} ${DEPLOYDIR}/${f_base}
+			fi
 		fi
 	done
 }
@@ -259,13 +277,15 @@ uboot_deploy_config:append:am62lxx () {
 uboot_deploy:append:k3r5 () {
     for f in ${B}/tiboot3-*.bin; do
 		if [ -f "$f" ]; then
-			install -m 644 $f ${DEPLOYDIR}/
+			f_base=$(basename $f)
+			install -m 644 $f ${DEPLOYDIR}/${f_base}
 		fi
 	done
 
 	for f in ${B}/sysfw*.itb; do
 		if [ -f "$f" ]; then
-			install -m 644 $f ${DEPLOYDIR}/
+			f_base=$(basename $f)
+			install -m 644 $f ${DEPLOYDIR}/${f_base}
 		fi
 	done
 }
Signature · 1 line
2.43.0
#1 lore raw

meta-ti / na / 20251220002034.2254417-1-reatmon

PRC Results: PASS

=========================================================
check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed

=========================================================
apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-ti][master][PATCH] u-boot-ti: Clean up config looping code
- Submitter: From: Ryan Eatmon <[email protected]>
- Date: Date: Fri, 19 Dec 2025 18:20:34 -0600
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 4ab914dd8287015202cd09a9a4b917900837436c

Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: master-next
- Commit Author: LCPD Automation Script <[email protected]>
- Commit Subject: CI/CD Auto-Merger: cicd.master.202512191404
- Commit SHA: 8050c16e485b4cf8c3532db43e34ed3609311b30

Patches
----------------------------------------
All patches applied

=========================================================
check-yocto-repo: PASS
=========================================================
master
=====================
PASS

=========================================================
yocto-check-layers: PASS
=========================================================
master - PASS
=====================
All checks passed