Fix quote handling for wildcard pattern expansion in SPL and image copy loops
to properly handle filenames with spaces and glob patterns.

Also, add support for copying ti-sysfw, ti-dm, and ti-hsm directories needed
by binman builds for K3 u-boot

Signed-off-by: Telukula Jeevan Kumar Sahu <[email protected]>
---
 .../classes/tisdk-bundle.bbclass              | 37 +++++++++++++++++--
 1 file changed, 33 insertions(+), 4 deletions(-)

diff --git a/meta-arago-distro/classes/tisdk-bundle.bbclass 
b/meta-arago-distro/classes/tisdk-bundle.bbclass
index 24146529..4033f9a2 100644
--- a/meta-arago-distro/classes/tisdk-bundle.bbclass
+++ b/meta-arago-distro/classes/tisdk-bundle.bbclass
@@ -221,9 +221,10 @@ tisdk_image_build () {
     for spl_name in ${DEPLOY_SPL_NAME}
     do
         # Copy the SPL image if it exists
-        if [ -e ${DEPLOY_DIR_IMAGE}/$spl_name ]
+        set -- ${DEPLOY_DIR_IMAGE}/$spl_name
+        if [ -e "$1" ]
         then
-            cp ${DEPLOY_DIR_IMAGE}/$spl_name ${prebuilt_dir}/
+            cp "$@" ${prebuilt_dir}/
         else
             echo "Could not find the SPL image \"$spl_name\""
             return 1
@@ -232,9 +233,10 @@ tisdk_image_build () {
 
     for image_name in ${DEPLOY_IMAGES_NAME}
     do
-        if [ -e ${DEPLOY_DIR_IMAGE}/$image_name ]
+        set -- ${DEPLOY_DIR_IMAGE}/$image_name
+        if [ -e "$1" ]
         then
-            cp ${DEPLOY_DIR_IMAGE}/$image_name ${prebuilt_dir}/
+            cp "$@" ${prebuilt_dir}/
         else
             echo "Could not find image \"$image_name\""
             return 1
@@ -259,6 +261,33 @@ tisdk_image_build () {
         fi
     fi
 
+    # Copy ti-sysfw needed by binman builds for u-boot
+    if [ -d "${DEPLOY_DIR_IMAGE}/ti-sysfw" ] && [ -n "${SYSFW_BINARY}" ]
+    then
+        mkdir -p ${prebuilt_dir}/ti-sysfw/
+        for firmware_name in ${SYSFW_BINARY}
+        do
+            set -- ${DEPLOY_DIR_IMAGE}/ti-sysfw/$firmware_name
+            if [ -e "$1" ]
+            then
+                cp "$@" ${prebuilt_dir}/ti-sysfw/
+            fi
+        done
+    fi
+
+    # Copy ti-dm needed by binman builds for u-boot
+    if [ -d "${DEPLOY_DIR_IMAGE}/ti-dm" ]
+    then
+        cp -r ${DEPLOY_DIR_IMAGE}/ti-dm ${prebuilt_dir}/
+    fi
+
+    # Copy ti-hsm needed by binman builds for u-boot
+    if [ -d "${DEPLOY_DIR_IMAGE}/ti-hsm" ]
+    then
+        mkdir -p ${prebuilt_dir}/ti-hsm/
+        cp ${DEPLOY_DIR_IMAGE}/ti-hsm/* ${prebuilt_dir}/ti-hsm/
+    fi
+
     # Add the EXTRA_TISDK_FILES contents if they exist
     # Make sure EXTRA_TISDK_FILES is not empty so we don't accidentaly
     # copy the root directory.
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17418): 
https://lists.yoctoproject.org/g/meta-arago/message/17418
Mute This Topic: https://lists.yoctoproject.org/mt/118465046/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to