[OE-core] [PATCH] image-live: multiconfig ISO generation
Joshua Watt
jpewhacker at gmail.com
Tue Mar 10 21:29:34 UTC 2020
On 3/9/20 5:55 PM, Rich Persaud wrote:
> 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.
Can you give an example? That might help with understanding what this is
supposed to do.
>
> 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 at 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')
Potentially, this could be simplified:
depends_type = 'mcdepends' if initrd_i.startswith('mc:') 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"
More information about the Openembedded-core
mailing list