Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Rich Persaud <rp@stacktrust.org>
To: openembedded-core@lists.openembedded.org
Cc: Rich Persaud <rp@stacktrust.org>
Subject: [PATCH] image-live: multiconfig ISO generation
Date: Mon,  9 Mar 2020 18:55:07 -0400	[thread overview]
Message-ID: <20200309225507.29578-1-rp@stacktrust.org> (raw)

When a target is specified for INITRD_IMAGE_LIVE, a task dependency is
added for do_image_complete. At present, image-live initrd will not
accept multiconfig dependency targets.

If BBMULTICONFIG is non-empty and INITRD_IMAGE_LIVE is a multiconfig
target, use mcdepends instead of depends. The packaging recipe must
also override machine-specific path construction of INITRD_LIVE.

Required to build an ISO with mixed machine types, a primary use case
for multiconfig. This is a minimal fix to make multiconfig ISOs
possible.

Signed-off-by: Rich Persaud <rp@stacktrust.org>
---
 meta/classes/image-live.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index 54058b350d..1afd48005a 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -50,11 +50,14 @@ IMAGE_TYPES_MASKED += "live hddimg iso"
 python() {
     image_b = d.getVar('IMAGE_BASENAME')
     initrd_i = d.getVar('INITRD_IMAGE_LIVE')
+    depends_type = ('mcdepends' if (d.getVar('BBMULTICONFIG')
+                                    and initrd_i.count(':') == 3)
+                                else 'depends')
     if image_b == initrd_i:
         bb.error('INITRD_IMAGE_LIVE %s cannot use image live, hddimg or iso.' % initrd_i)
         bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.')
     elif initrd_i:
-        d.appendVarFlag('do_bootimg', 'depends', ' %s:do_image_complete' % initrd_i)
+        d.appendVarFlag('do_bootimg', depends_type, ' %s:do_image_complete' % initrd_i)
 }
 
 HDDDIR = "${S}/hddimg"
-- 
2.20.1



             reply	other threads:[~2020-03-09 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 22:55 Rich Persaud [this message]
2020-03-10 21:29 ` [PATCH] image-live: multiconfig ISO generation Joshua Watt
2020-03-11  0:24   ` Rich Persaud

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=20200309225507.29578-1-rp@stacktrust.org \
    --to=rp@stacktrust.org \
    --cc=openembedded-core@lists.openembedded.org \
    /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