public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "nicusor.huhulea@siemens.com" <nicusor.huhulea@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: [PATCH] classes/images.bbclass: don't copy the dtbs if they exist already
Date: Fri, 9 Feb 2024 14:17:00 +0000	[thread overview]
Message-ID: <DB3PR10MB690861E70EB246FEF845E253E64B2@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM> (raw)


[-- 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


             reply	other threads:[~2024-02-10 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 14:17 nicusor.huhulea [this message]
2024-02-11 12:58 ` Jan Kiszka
2024-02-12  9:36   ` nicusor.huhulea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB3PR10MB690861E70EB246FEF845E253E64B2@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM \
    --to=nicusor.huhulea@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox