From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7351319485919264768 X-Forwarded-Encrypted: i=3; AJvYcCVVFg/B9wIf8fhcATgwuaK5au25KjoDtrZquoRkcWKXhTFicFJuRAm040b5WNSdO12p0Q7sJsH2lNrelOBSh3f4TNlgf6BIaxNxSlY= X-Received: by 2002:a05:6214:1411:b0:69b:542e:6adb with SMTP id pr17-20020a056214141100b0069b542e6adbmr9885553qvb.0.1713187179988; Mon, 15 Apr 2024 06:19:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6214:262b:b0:69b:4c5f:b8d4 with SMTP id gv11-20020a056214262b00b0069b4c5fb8d4ls5323692qvb.2.-pod-prod-09-us; Mon, 15 Apr 2024 06:19:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXAoEm2e0aTZIsbVWJK1IPAiQBddedfY0EM5fDhRE9rYbj1T+bl/opFEtYXRS+HIl5G1R0zTSEmObUzmRWrptflE8xOxowS1YonDeU= X-Google-Smtp-Source: AGHT+IFZAWAVCoOGUL3q4YwVy1gVlIMMSwy1Hxb4LyXPLV1tfhFu8z3S5+b8zJ+k1WKuo0lULhx8 X-Received: by 2002:a0c:fa92:0:b0:69b:1f05:bd86 with SMTP id o18-20020a0cfa92000000b0069b1f05bd86mr9107722qvn.58.1713187179017; Mon, 15 Apr 2024 06:19:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713187179; cv=pass; d=google.com; s=arc-20160816; b=SBRI7dZVm6dY4g8U9+ZQnFaRwTyQP5nND8fG+jctoFgDTm9t15I6XgW1jp9YsJPheQ ZydT0NBMu5gkpXvtKGevXslTe+2cRjAce7UfQug0ucwfFVEG9MxpREqyJ/aSmYdRmsqt Is+TG4ngShtavkGh/xRKd7jhW6+guJisPlz5RLItvS4OphA0TZ9wf2ixeNiAIVzLmEF8 P75/tq4lc3EL3QQIrJ366I+kjB3mzYXwVxzD0969ZMw6VeF5j4+yGb4mNl9iWnQYhLTK vfcGQlPSaIZQAF68LW40PUUHlp2ejcjIVW/xf5PFLKitfF2b5LjHNuRdgAds+7Vx3otm XmZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:in-reply-to:content-language :from:references:to:subject:user-agent:date:message-id :dkim-signature; bh=e+YEU0zeMd7K+YLMskWTK4pR8kWKl1uLRKUiiGubdEE=; fh=xUaZ6YTwg8PBlDnFzG87kovRG668UFKCMdDagCHBKH0=; b=MACl7nNEXnn2fMn6Iu7WtMt9ZGbb+snihPTXy4zBDIZ1nII2YuIE5x6ZFxHhZ4cx4z ZVuDQdxG8iiNgO1mqqLDJ2tFiFerqDNjfBbxrnMY6FRt8o1idiBOH/Zf4TPne1BKxTJW YncKHA+vNCFdUr3f8wSPT0SQgaVjlNJ4eZjhbFY9Z+nskI/xZGPpl6yPEIy9JZmmhB3n hQ86btG1rLvhuH5OJvgwwUmi6VUcxF7YrfxaZPMFDRnJd5+2ASZOTccyXRPzPau0aqTv vky+CZqEMAFW0WVlmAl34EhWN/s1uB4iGGfu7eBSF+Ublf1EKtpjImc9JDRT+V1VJIKV pAgg==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="I/osnn4p"; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f403:2606::601 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20601.outbound.protection.outlook.com. [2a01:111:f403:2606::601]) by gmr-mx.google.com with ESMTPS id m18-20020ad45052000000b0069926d30682si599511qvq.3.2024.04.15.06.19.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2024 06:19:38 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f403:2606::601 as permitted sender) client-ip=2a01:111:f403:2606::601; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="I/osnn4p"; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f403:2606::601 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GHNaIkX1531vegMnNq+K2Xw/DAkjarG1VkpZeV6nPcji5IIOMGzMxzii6GJ0AuaMYeaXZMz4f8U0pNwt3Ans5E4OP3bMC1EPF0qCsr/G0Kdf6G2rKyamisZRNNSQR9a/6lBJvwCFn0hGagA58JMm4r5Ko+XG/GW67OZKcC6zjjUSpD3KKK4z2ckUBFCnfXRu/w/zI6KWIks2+GI5GOAHULApgeLmsRHwpnHz8xAhh44KGAyWZZ1j7oyi+2SIEvrXB1RKl8JCsKsdeTtSYJ6AvjxKsvR3fnNnuDoAsYL4Pnn4n5PSTPapgnR9KeWNSSnf3DbsNyUztg8v7ssukkVeaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e+YEU0zeMd7K+YLMskWTK4pR8kWKl1uLRKUiiGubdEE=; b=IqedR+MZvK0zWqI3izu0RL+pxP67+wNnHF17HrGRLA0rzQIl3/YLNQWExe8bg+g6x0IgRjR+gXARi9ODz7bQOk1jGasCVwh9bJ4A1KGUOHR6c7Vl/JB+cuq7CVG5Lll8CbKOo++gs1nWKrsCan7L38mVUBhkbY42MbyitxQjOKhvpG0iEGFW+I9SqN4by3gdrs+zGmDrTVtyyI/qNGaZpGvUTsuGwZftVsBCWiyDrNRquEkd3NwlbQhfHT20hd6T0U8lljA3LWX1Dpje5IVsllDL3uBtrDo1Qu8DLrft5oga7WFCwnsWcxV6qK2E/J7CzmXbRPjI9JPdj2ZvdnO2Ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e+YEU0zeMd7K+YLMskWTK4pR8kWKl1uLRKUiiGubdEE=; b=I/osnn4pOd8+WszjqlWq5IQjBBz0y0zPlWrNMnVDGtYvMl9ACc10XF1IoTTm2mtoJjemexRKJ7marEMeL8NLRMWgo4jCxWgNp2XQ9hS9PSxBYJjO2PI7iXpebBNCeK5of0oNnxAPpePBwFpK8vAg4v5GZ3u0q3BkGqxef4J97G21H5tMfIu6nLOHRYFhh83E8ApXT0aWiHeh0j3hqADBPkTIAsfrQIB7xUuU/Ji6qXIzwOr2llXPpkxZ8R95hJqSHZaYIULDjo4pko4ne135PiH2tCU56X5JjGbfIRM5lrSLK+J1ZfEuNOhFjWpFTDKv200JSC0abHOlwUDu7JMq4w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by PAVPR10MB6915.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.43; Mon, 15 Apr 2024 13:19:36 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::4e33:3630:e08:77b9]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::4e33:3630:e08:77b9%4]) with mapi id 15.20.7452.049; Mon, 15 Apr 2024 13:19:36 +0000 Message-ID: <0987c442-1450-4101-bfb2-d500d2bf9258@siemens.com> Date: Mon, 15 Apr 2024 06:19:32 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name To: "nicusor.huhulea@siemens.com" , "quirin.gylstorff@siemens.com" , "isar-users@googlegroups.com" References: From: Jan Kiszka Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR04CA0076.namprd04.prod.outlook.com (2603:10b6:303:6b::21) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) Return-Path: jan.kiszka@siemens.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|PAVPR10MB6915:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f1c6ab9-7c7d-4959-ce7a-08dc5d4eb27f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9oKw9GmkXEK2QCQyFg0jgk4Izr25NXlwJ5Tp1XjaJzXRXQXtQnu+RBepqGXquHDgkfA35tqJYhdTNpchCT5F/JyltYA7a5LBlIf/LxDN748wsigrDQDkf4qGReisNjz/dpG3I+FRzbAfMC9YnJ5XiTPso8wVEhPTi/fAKI1HztXrisrE6w1SXdzZ5sTaNMkcPKy0wh4M5aLyEKndJRaLFIKuHuM/PdcTzmB1rvaQ2rD4WwNOwWDEJItyswcdn2nqW2zioao4ezLZyovz5gGK/oIki65CbhviRSlU0hhHbgIioNAsA47xKCGDdp8mgTkP71kxrYfLvB/gYRyftBq88gAoeikUDHshwHIqWigYeg5ccNr5XnKXuV8B4l/k/kBlp3f5IaXb8YTXb4gpgU4JalLXIBl/E3k7/F+og191cWidRpRaBxPq24fNxFfKx7Ee8mOjaJtwcRfmdbZwf/zf/cWAtqG6agGY3jZbQplupiPHwxc3fhZUQUYuqo79B08+kSqfQFpUdsuRn+ShMIySPyLvUZ3eoIXagzvPih6us+O7YzyrtfBbwzd44ns2Bsx7x5DUGsPXpviKX/KJ8tqSaj/bNpW182S14CqzOHISv6RXT5q5ezZ7l1OmTUSHHC2N X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a1lPbTZnbUNoeFBtQ2pSSythNnduTERpSkdPYU1aTDRxczFKZnVtRFR2U0Nz?= =?utf-8?B?aEtXN2RIQ3VKUi9rejdTL3lTOTh2RnZVSnNxRzFNakVmUmVwTDdGYkFjQTJ5?= =?utf-8?B?Y3hHUEEwaitTd1VkeHgwMzF0Mm5HT015S1pqNzZlckRjU2VJVndaL0pSbHVW?= =?utf-8?B?WWxWbDJpYkZRdWp0ZTRMQ2s2RGlMZ0E4L0RGTVR5WlAxaFFxNlQzTFNPR1JD?= =?utf-8?B?ZlVKQVNiNzZGMmdyMGlHYUNOUmlscHR4R25vRmpLYzY5dFhob3FYRHVLR1J6?= =?utf-8?B?ZldMRVB0STl2RlVOUjBXMkxBdVExTUhMdnZqS0ZxVko4TjRYNmRiVWt2MjRB?= =?utf-8?B?NE9YQXhtMUtjbCtYREl2ZjdRL3VhUVdEeXdRTDg5NDFwNFk4N1YvTkp4ci9s?= =?utf-8?B?TG9iOGFWb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: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 13:19:36.4300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: COOanz8l27H1pvQcgQoXy3IVZDDddXpxBKgqQnKhRavjpv12F1dmYIVjZC1udFUGuj8B2HGdKe7a91rrrhrI3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR10MB6915 X-TUID: 2nIXXEnGVpR+ Please use "git send-email" and start a new thread. Do not send patches as reply of previous postings. On 15.04.24 15:11, 'nicusor.huhulea@siemens.com' via isar-users wrote: > Tested this on all the isar and cip-core machines. > fix patch formatting too. > > * update the other areas in order to sync with the dtbs directory path > A git commit message first of all needs to explain WHY you are doing the change. If the change is complex or took one roat in favor of another, you can also explain the HOW. Just compare your patch to others sent here, specifically to patches by frequent contributors. Jan > Signed-off-by: Nicusor Huhulea > --- > meta/classes/image.bbclass | 21 +++++++++++-------- > meta/classes/imagetypes_wic.bbclass | 2 +- > .../wic/plugins/source/bootimg-efi-isar.py | 8 +++++-- > scripts/lib/wic/plugins/source/bootimg-efi.py | 8 +++++-- > .../wic/plugins/source/bootimg-partition.py | 10 ++++++++- > 5 files changed, 34 insertions(+), 15 deletions(-) > > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass > index 98741da0..e90f8fde 100644 > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -364,16 +364,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..adbde400 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 IMAGE_FULLNAME" > > python do_rootfs_wicenv () { > wicvars = d.getVar('WICVARS') > diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py > index 4bfb70a0..218a7fe7 100644 > --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py > +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py > @@ -57,7 +57,9 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > - cp_cmd = "cp %s/%s %s" % (bootimg_dir, dtb, hdddir) > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(bootimg_dir + "/" + image_fullname + ".dtbs") > + cp_cmd = "cp %s/%s %s" % (dtbs_dir, dtb, hdddir) > exec_cmd(cp_cmd, True) > > @classmethod > @@ -353,8 +355,10 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(deploy_dir + "/" + image_fullname + ".dtbs") > dtb_params = '--add-section .dtb=%s/%s --change-section-vma .dtb=0x40000' % \ > - (deploy_dir, dtb) > + (dtbs_dir, dtb) > else: > dtb_params = '' > > diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py > index 634a808d..07b177df 100644 > --- a/scripts/lib/wic/plugins/source/bootimg-efi.py > +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py > @@ -51,7 +51,9 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > - cp_cmd = "cp %s/%s %s" % (bootimg_dir, dtb, hdddir) > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(bootimg_dir + "/" + image_fullname + ".dtbs") > + cp_cmd = "cp %s/%s %s" % (dtbs_dir, dtb, hdddir) > exec_cmd(cp_cmd, True) > > @classmethod > @@ -334,8 +336,10 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(deploy_dir + "/" + image_fullname + ".dtbs") > dtb_params = '--add-section .dtb=%s/%s --change-section-vma .dtb=0x40000' % \ > - (deploy_dir, dtb) > + (dtbs_dir, dtb) > else: > dtb_params = '' > > diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py > index 5dbe2558..1ae6216f 100644 > --- a/scripts/lib/wic/plugins/source/bootimg-partition.py > +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py > @@ -180,10 +180,18 @@ class BootimgPartitionPlugin(SourcePlugin): > > logger.debug('Kernel dir: %s', bootimg_dir) > > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(kernel_dir + "/" + image_fullname + ".dtbs/") > > for task in cls.install_task: > src_path, dst_path = task > - logger.debug('Install %s as %s', src_path, dst_path) > + > + dtb_file = os.path.join(dtbs_dir + os.path.basename(src_path)) > + > + if os.path.exists(dtb_file): > + src_path = os.path.join(dtbs_dir + src_path) > + > + logger.debug('Install %s as %s', (src_path, dst_path)) > install_cmd = "install -m 0644 -D %s %s" \ > % (os.path.join(kernel_dir, src_path), > os.path.join(hdddir, dst_path)) > -- > 2.39.2 > > ________________________________________ > From: Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS) > Sent: Friday, April 12, 2024 5:11 PM > To: Gylstorff, Quirin (T CED OES-DE); isar-users@googlegroups.com > Subject: Re: [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name > > updated all the cases where the dtbs path needed to be changed > > > * update the other areas in order to sync with the dtbs directory path > > Signed-off-by: Nicusor Huhulea > > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass > index 98741da0..e90f8fde 100644 > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -364,16 +364,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..adbde400 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 IMAGE_FULLNAME" > > python do_rootfs_wicenv () { > wicvars = d.getVar('WICVARS') > diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py > index 4bfb70a0..218a7fe7 100644 > --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py > +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py > @@ -57,7 +57,9 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > - cp_cmd = "cp %s/%s %s" % (bootimg_dir, dtb, hdddir) > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(bootimg_dir + "/" + image_fullname + ".dtbs") > + cp_cmd = "cp %s/%s %s" % (dtbs_dir, dtb, hdddir) > exec_cmd(cp_cmd, True) > > @classmethod > @@ -353,8 +355,10 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(deploy_dir + "/" + image_fullname + ".dtbs") > dtb_params = '--add-section .dtb=%s/%s --change-section-vma .dtb=0x40000' % \ > - (deploy_dir, dtb) > + (dtbs_dir, dtb) > else: > dtb_params = '' > > diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py > index 634a808d..07b177df 100644 > --- a/scripts/lib/wic/plugins/source/bootimg-efi.py > +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py > @@ -51,7 +51,9 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > - cp_cmd = "cp %s/%s %s" % (bootimg_dir, dtb, hdddir) > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(bootimg_dir + "/" + image_fullname + ".dtbs") > + cp_cmd = "cp %s/%s %s" % (dtbs_dir, dtb, hdddir) > exec_cmd(cp_cmd, True) > > @classmethod > @@ -334,8 +336,10 @@ class BootimgEFIPlugin(SourcePlugin): > if dtb: > if ';' in dtb: > raise WicError("Only one DTB supported, exiting") > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(deploy_dir + "/" + image_fullname + ".dtbs") > dtb_params = '--add-section .dtb=%s/%s --change-section-vma .dtb=0x40000' % \ > - (deploy_dir, dtb) > + (dtbs_dir, dtb) > else: > dtb_params = '' > > diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py > index 5dbe2558..1ae6216f 100644 > --- a/scripts/lib/wic/plugins/source/bootimg-partition.py > +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py > @@ -180,10 +180,18 @@ class BootimgPartitionPlugin(SourcePlugin): > > logger.debug('Kernel dir: %s', bootimg_dir) > > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > + dtbs_dir = os.path.join(kernel_dir + "/" + image_fullname + ".dtbs/") > > for task in cls.install_task: > src_path, dst_path = task > - logger.debug('Install %s as %s', src_path, dst_path) > + > + dtb_file = os.path.join(dtbs_dir + os.path.basename(src_path)) > + > + if os.path.exists(dtb_file): > + src_path = os.path.join(dtbs_dir + src_path) > + > + logger.debug('Install %s as %s', (src_path, dst_path)) > install_cmd = "install -m 0644 -D %s %s" \ > % (os.path.join(kernel_dir, src_path), > os.path.join(hdddir, dst_path)) > > > ________________________________________ > From: Gylstorff, Quirin (T CED OES-DE) > Sent: Monday, April 8, 2024 11:12 AM > To: Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS); isar-users@googlegroups.com > Subject: Re: [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name > > > > On 3/28/24 8:05 PM, Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS) wrote: >> Yes, it will break it without patching it. I'm not sure where this bootimg-efi.py is being used here, as for testing usually I'm using https://github.com/siemens/meta-iot2050 > > It is used indirect with bootimg-efi-isar. > Quirin >> >> I guess that in this case the equivalent for bootimg-efi.py is https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/scripts/lib/wic/plugins/source/efibootguard-boot.py which is already patched. >> >> Nicu >> >> ________________________________________ >> From: Gylstorff, Quirin (T CED OES-DE) >> Sent: Thursday, March 28, 2024 7:53 PM >> To: Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS); isar-users@googlegroups.com >> Subject: Re: [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name >> >> >> >> On 3/28/24 8:54 AM, 'nicusor.huhulea@siemens.com' via isar-users wrote: >>> 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 >>> >>> 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" >> >> This will break scripts/lib/wic/plugins/source/bootimg-efi.py from >> bitbake[1]. >> >> [1]: >> https://github.com/openembedded/openembedded-core/blob/master/scripts/lib/wic/plugins/source/bootimg-efi.py >> >> Quirin >> >>> + 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') >>> > -- Siemens AG, Technology Linux Expert Center