From: Zhihang Wei <wzh@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v7 1/3] wic: Obtain real machine name in isoimage source plugin
Date: Thu, 26 Feb 2026 17:26:11 +0100 [thread overview]
Message-ID: <20260226162613.1954014-2-wzh@ilbers.de> (raw)
In-Reply-To: <20260226162613.1954014-1-wzh@ilbers.de>
From: Anton Mikanovich <amikan@ilbers.de>
The current implementation tries to obtain machine name from the deploy
directory name, which relies on hardcoded path format. Add MACHINE to
the WIC environment and read it in isoimage-isohybrid-isar.py to fix
that.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes-recipe/imagetypes_wic.bbclass | 2 +-
.../scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/imagetypes_wic.bbclass b/meta/classes-recipe/imagetypes_wic.bbclass
index 6b82add3..d50022ce 100644
--- a/meta/classes-recipe/imagetypes_wic.bbclass
+++ b/meta/classes-recipe/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 KERNEL_FILE"
+WICVARS += "DISTRO DISTRO_ARCH KERNEL_FILE MACHINE"
python do_rootfs_wicenv () {
wicvars = d.getVar('WICVARS')
diff --git a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
index fb6c6b39..0ed61fff 100644
--- a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
@@ -191,7 +191,9 @@ class IsoImagePlugin(SourcePlugin):
if not image_type:
raise WicError("Couldn't find INITRAMFS_FSTYPES, exiting.")
- machine = os.path.basename(initrd_dir)
+ machine = get_bitbake_var("MACHINE")
+ if not machine:
+ raise WicError("Couldn't find MACHINE, exiting.")
pattern = '%s/%s*%s.%s' % (initrd_dir, image_name, machine, image_type)
pattern = '%s/%s-%s-initrd.%s' % (initrd_dir, image_name, machine, image_type)
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260226162613.1954014-2-wzh%40ilbers.de.
next prev parent reply other threads:[~2026-02-26 16:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 16:26 Deploy DTBs and other image artifacts into subdirs to avoid conflicts Zhihang Wei
2026-02-26 16:26 ` Zhihang Wei [this message]
2026-02-26 16:26 ` [PATCH v7 2/3] testsuite: Add testcases to check dtb deployment Zhihang Wei
2026-02-26 16:26 ` [PATCH v7 3/3] meta: Deploy image build artifacts into distro- and image-specific subdirs Zhihang Wei
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=20260226162613.1954014-2-wzh@ilbers.de \
--to=wzh@ilbers.de \
--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