1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-01-12 01:20:20 +00:00

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.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
This commit is contained in:
Ryan Eatmon
2025-12-19 18:12:08 -06:00
parent 3b7aad2f15
commit bdc389b794

View File

@@ -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,34 @@ 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}
ln -sf ${tgt_base}-${type} ${DEPLOYDIR}/${f_base}
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}
ln -sf ${tgt_base}-${type} ${DEPLOYDIR}/${f_base}
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 +279,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
}