public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name
@ 2024-03-28  7:54 nicusor.huhulea
  2024-03-28 16:28 ` Gylstorff Quirin
  2024-03-28 17:53 ` Gylstorff Quirin
  0 siblings, 2 replies; 9+ messages in thread
From: nicusor.huhulea @ 2024-03-28  7:54 UTC (permalink / raw)
  To: isar-users

This fixes the build failures detailed in the https://groups.google.com/g/isar-users/c/Va0Ue-ISYeA and
https://groups.google.com/g/isar-users/c/PSGU_AcdPZ8
This adds the MACHINE variable to WICVARS, hence the need to reflect this change in
cip-core/scripts/lib/wic/plugins/source/efibootguard-boot.py


    Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 73f1d52c..9b98719b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -377,16 +377,19 @@ do_copy_boot_files() {
         fi
     fi
 
-    for file in ${DTB_FILES}; do
-        dtb="$(find '${IMAGE_ROOTFS}/usr/lib' -type f \
-                    -iwholename '*linux-image-*/'${file} | head -1)"
-
-        if [ -z "$dtb" -o ! -e "$dtb" ]; then
-            die "${file} not found"
-        fi
+    if [ -n "${DTB_FILES}" ]; then
+        mkdir -p "${DEPLOYDIR}/${IMAGE_FULLNAME}.dtbs"
+        for file in ${DTB_FILES}; do
+            dtb="$(find '${IMAGE_ROOTFS}/usr/lib' -type f \
+                        -iwholename '*linux-image-*/'${file} | head -1)"
+
+            if [ -z "$dtb" -o ! -e "$dtb" ]; then
+                die "${file} not found"
+            fi
 
-        cp -f "$dtb" "${DEPLOYDIR}/"
-    done
+            cp -f "$dtb" "${DEPLOYDIR}/${IMAGE_FULLNAME}.dtbs"
+        done
+    fi
 }
 addtask copy_boot_files before do_rootfs_postprocess after do_rootfs_install
 
diff --git a/meta/classes/imagetypes_wic.bbclass b/meta/classes/imagetypes_wic.bbclass
index bce881ed..f0f1c438 100644
--- a/meta/classes/imagetypes_wic.bbclass
+++ b/meta/classes/imagetypes_wic.bbclass
@@ -107,7 +107,7 @@ WICVARS += "\
            ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS TRANSLATED_TARGET_ARCH"
 
 # Isar specific vars used in our plugins
-WICVARS += "DISTRO DISTRO_ARCH"
+WICVARS += "DISTRO DISTRO_ARCH MACHINE"
 
 python do_rootfs_wicenv () {
     wicvars = d.getVar('WICVARS')

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-15 13:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28  7:54 [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name nicusor.huhulea
2024-03-28 16:28 ` Gylstorff Quirin
2024-03-28 16:31   ` Gylstorff Quirin
2024-03-28 17:53 ` Gylstorff Quirin
2024-03-28 19:05   ` nicusor.huhulea
2024-04-08  8:12     ` Gylstorff Quirin
2024-04-12 14:11       ` nicusor.huhulea
2024-04-15 13:11         ` nicusor.huhulea
2024-04-15 13:19           ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox