public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] classes/images.bbclass: don't copy the dtbs if they exist already
@ 2024-02-09 14:17 nicusor.huhulea
  2024-02-11 12:58 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: nicusor.huhulea @ 2024-02-09 14:17 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 299 bytes --]

This usually reproduces when more than one image is being build and it uses the same files for boot e.g dtb
I can reproduce this using the upstream meta-iot2050(https://github.com/siemens/meta-iot2050) when trying
to build iot2050-image-example followed by a build on a iot2050-image-swu-example

[-- Attachment #1.2: Type: text/html, Size: 966 bytes --]

[-- Attachment #2: 0001-classes-images.bbclass-don-t-copy-the-dtbs-if-they-e.patch --]
[-- Type: application/octet-stream, Size: 1530 bytes --]

From 639ce9ecfb2d323a1798533884a53151bd74b202 Mon Sep 17 00:00:00 2001
From: Nicusor Huhulea <nicusor.huhulea@siemens.com>
Date: Fri, 9 Feb 2024 10:44:26 +0200
Subject: [PATCH] classes/images.bbclass: don't copy the dtbs if they exist
 already

 * with the introduction of do_copy_boot_files_setscene having the same
   file in the same location does not seems possible anymore, so copy those
   files only if they don't exist.
 * ERROR: development-image-1.0-r21 do_copy_boot_files_setscene: The recipe development-image is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
  /home/nhuhulea/indOs/next/build-ipc-edition/tmp/deploy/images/iot2050/k3-am6548-iot2050-advanced-sm.dtb
    (matched in manifest-arm64-service-stick-image.copy_boot_files)

Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
---
 meta/classes/image.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index d9fc04eb..070a14dd 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -393,7 +393,10 @@ do_copy_boot_files() {
             die "${file} not found"
         fi
 
-        cp -f "$dtb" "${DEPLOYDIR}/"
+        dtb_name=$(basename "${file}")
+        if [ ! -f "${DEPLOY_DIR_IMAGE}/${dtb_name}" ]; then
+            cp -f "$dtb" "${DEPLOYDIR}/"
+        fi
     done
 }
 addtask copy_boot_files before do_rootfs_postprocess after do_rootfs_install
-- 
2.39.2


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

end of thread, other threads:[~2024-02-12  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 14:17 [PATCH] classes/images.bbclass: don't copy the dtbs if they exist already nicusor.huhulea
2024-02-11 12:58 ` Jan Kiszka
2024-02-12  9:36   ` nicusor.huhulea

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