diff mbox series

[03/11] build-appliance-image: add support for qemu

Message ID 20230221204445.23931-4-twoerner@gmail.com
State New
Headers show
Series build-appliance-image revival | expand

Commit Message

Trevor Woerner Feb. 21, 2023, 8:44 p.m. UTC
Add ext4 explicitly to the list of IMAGE_FSTYPES so the build appliance can be
run with runqemu.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta/recipes-core/images/build-appliance-image_15.0.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Richard Purdie Feb. 24, 2023, 4:05 p.m. UTC | #1
On Tue, 2023-02-21 at 15:44 -0500, Trevor Woerner wrote:
> Add ext4 explicitly to the list of IMAGE_FSTYPES so the build appliance can be
> run with runqemu.
> 
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  meta/recipes-core/images/build-appliance-image_15.0.0.bb | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> index 064e7a1ed82f..e28096758b9b 100644
> --- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> +++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> @@ -1,5 +1,5 @@
>  SUMMARY = "An image containing the build system itself"
> -DESCRIPTION = "An image containing the build system that you can boot and run using either VirtualBox, VMware Player or VMware Workstation."
> +DESCRIPTION = "An image containing the build system that you can boot and run using any of qemu, VirtualBox, VMware Player or VMware Workstation."
>  HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
>  
>  LICENSE = "MIT"
> @@ -20,7 +20,7 @@ IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
>  APPEND += "rootfstype=ext4 quiet"
>  
>  DEPENDS = "zip-native python3-pip-native"
> -IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
> +IMAGE_FSTYPES = "ext4 wic.vmdk wic.vhd wic.vhdx"
>  
>  inherit core-image setuptools3
>  

I've held off this one since whilst it isn't wrong as such, the ext
images aren't exactly optimal. I think our hope was that we could use
the vmdk or vhdx images with qemu instead and then directly test the
ones we publicly share. Do you know if that could work? It may then
mean people don't need to handle multiple files too?

Cheers,

Richard
Richard Purdie Feb. 24, 2023, 5:26 p.m. UTC | #2
On Fri, 2023-02-24 at 16:05 +0000, Richard Purdie via
lists.openembedded.org wrote:
> On Tue, 2023-02-21 at 15:44 -0500, Trevor Woerner wrote:
> > Add ext4 explicitly to the list of IMAGE_FSTYPES so the build appliance can be
> > run with runqemu.
> > 
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> >  meta/recipes-core/images/build-appliance-image_15.0.0.bb | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> > index 064e7a1ed82f..e28096758b9b 100644
> > --- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> > +++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> > @@ -1,5 +1,5 @@
> >  SUMMARY = "An image containing the build system itself"
> > -DESCRIPTION = "An image containing the build system that you can boot and run using either VirtualBox, VMware Player or VMware Workstation."
> > +DESCRIPTION = "An image containing the build system that you can boot and run using any of qemu, VirtualBox, VMware Player or VMware Workstation."
> >  HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
> >  
> >  LICENSE = "MIT"
> > @@ -20,7 +20,7 @@ IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
> >  APPEND += "rootfstype=ext4 quiet"
> >  
> >  DEPENDS = "zip-native python3-pip-native"
> > -IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
> > +IMAGE_FSTYPES = "ext4 wic.vmdk wic.vhd wic.vhdx"
> >  
> >  inherit core-image setuptools3
> >  
> 
> I've held off this one since whilst it isn't wrong as such, the ext
> images aren't exactly optimal. I think our hope was that we could use
> the vmdk or vhdx images with qemu instead and then directly test the
> ones we publicly share. Do you know if that could work? It may then
> mean people don't need to handle multiple files too?

I quickly tried:

qemu-system-x86_64 tmp/deploy/images/qemux86-64/build-appliance-image-qemux86-64.wic.vmdk -enable-kvm

and it nearly works (splash screen displayed but then went blank) so I
suspect runqemu could likely learn to run these relatively easily.

Cheers,

Richard
Trevor Woerner Feb. 25, 2023, 1:17 p.m. UTC | #3
On Fri 2023-02-24 @ 04:05:22 PM, Richard Purdie wrote:
> On Tue, 2023-02-21 at 15:44 -0500, Trevor Woerner wrote:
> > Add ext4 explicitly to the list of IMAGE_FSTYPES so the build appliance can be
> > run with runqemu.
> > 
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> >  meta/recipes-core/images/build-appliance-image_15.0.0.bb | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> > index 064e7a1ed82f..e28096758b9b 100644
> > --- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> > +++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
> > @@ -1,5 +1,5 @@
> >  SUMMARY = "An image containing the build system itself"
> > -DESCRIPTION = "An image containing the build system that you can boot and run using either VirtualBox, VMware Player or VMware Workstation."
> > +DESCRIPTION = "An image containing the build system that you can boot and run using any of qemu, VirtualBox, VMware Player or VMware Workstation."
> >  HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
> >  
> >  LICENSE = "MIT"
> > @@ -20,7 +20,7 @@ IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
> >  APPEND += "rootfstype=ext4 quiet"
> >  
> >  DEPENDS = "zip-native python3-pip-native"
> > -IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
> > +IMAGE_FSTYPES = "ext4 wic.vmdk wic.vhd wic.vhdx"
> >  
> >  inherit core-image setuptools3
> >  
> 
> I've held off this one since whilst it isn't wrong as such, the ext
> images aren't exactly optimal. I think our hope was that we could use
> the vmdk or vhdx images with qemu instead and then directly test the
> ones we publicly share. Do you know if that could work? It may then
> mean people don't need to handle multiple files too?

Okay, I'll take a look.

I did try the vmdk image and was surprised it didn't work. Then I noticed this
piece of code in the recipe:

	IMAGE_CMD:ext4:append () {
		# We don't need to reserve much space for root, 0.5% is more than enough
		tune2fs -m 0.5 ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ext4
	}

	https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/images/build-appliance-image_15.0.0.bb#n39

and assumed ext4 was either an implicit or explicit artifact in the past.
diff mbox series

Patch

diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 064e7a1ed82f..e28096758b9b 100644
--- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -1,5 +1,5 @@ 
 SUMMARY = "An image containing the build system itself"
-DESCRIPTION = "An image containing the build system that you can boot and run using either VirtualBox, VMware Player or VMware Workstation."
+DESCRIPTION = "An image containing the build system that you can boot and run using any of qemu, VirtualBox, VMware Player or VMware Workstation."
 HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
 
 LICENSE = "MIT"
@@ -20,7 +20,7 @@  IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
 APPEND += "rootfstype=ext4 quiet"
 
 DEPENDS = "zip-native python3-pip-native"
-IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
+IMAGE_FSTYPES = "ext4 wic.vmdk wic.vhd wic.vhdx"
 
 inherit core-image setuptools3