* [PATCH] Allow different filesystems to be used for VM images.
@ 2016-04-28 19:21 Ian Reinhart Geiser
2016-04-29 8:19 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Ian Reinhart Geiser @ 2016-04-28 19:21 UTC (permalink / raw)
To: openembedded-core
This allows for things like btrfs to be used vs just ext4.
The default value of ext4 is kept so there is no functional
change unless ROOTFS_TYPE is set in the inherting recipe.
Signed-off-by: Ian Reinhart Geiser <geiseri@geekcentral.pub>
---
meta/classes/image-vm.bbclass | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index 47f7326..50d93d5 100644
--- a/meta/classes/image-vm.bbclass
+++ b/meta/classes/image-vm.bbclass
@@ -23,16 +23,17 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
parted-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
- ${PN}:do_image_ext4 \
+ ${PN}:do_image_${ROOTFS_TYPE} \
"
-IMAGE_TYPEDEP_vmdk = "ext4"
-IMAGE_TYPEDEP_vdi = "ext4"
-IMAGE_TYPEDEP_qcow2 = "ext4"
-IMAGE_TYPEDEP_hdddirect = "ext4"
+IMAGE_TYPEDEP_vmdk = "${ROOTFS_TYPE}"
+IMAGE_TYPEDEP_vdi = "${ROOTFS_TYPE}"
+IMAGE_TYPEDEP_qcow2 = "${ROOTFS_TYPE}"
+IMAGE_TYPEDEP_hdddirect = "${ROOTFS_TYPE}"
IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect"
-ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
+ROOTFS_TYPE ?= "ext4"
+ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${ROOTFS_TYPE}"
# Used by bootloader
LABELS_VM ?= "boot"
--
2.8.0.rc3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Allow different filesystems to be used for VM images.
2016-04-28 19:21 [PATCH] Allow different filesystems to be used for VM images Ian Reinhart Geiser
@ 2016-04-29 8:19 ` Richard Purdie
2016-04-29 10:50 ` Ian Geiser
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2016-04-29 8:19 UTC (permalink / raw)
To: Ian Reinhart Geiser, openembedded-core
On Thu, 2016-04-28 at 15:21 -0400, Ian Reinhart Geiser wrote:
> This allows for things like btrfs to be used vs just ext4.
> The default value of ext4 is kept so there is no functional
> change unless ROOTFS_TYPE is set in the inherting recipe.
>
> Signed-off-by: Ian Reinhart Geiser <geiseri@geekcentral.pub>
> ---
> meta/classes/image-vm.bbclass | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
This seems reasonable but could I ask you to use a variable name with
"VM" in the name please?
I appreciate some of the existing ones don't do this but moving forward
we need to try and better namespace some of these class specific
variables and this seems like a good place to start.
VM_ROOTFS_TYPE would be better for example (or VMIMG_ROOTFS_TYPE).
Cheers,
Richard
> diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image
> -vm.bbclass
> index 47f7326..50d93d5 100644
> --- a/meta/classes/image-vm.bbclass
> +++ b/meta/classes/image-vm.bbclass
> @@ -23,16 +23,17 @@ do_bootdirectdisk[depends] += "dosfstools
> -native:do_populate_sysroot \
> syslinux-native:do_populate_sysroot \
> parted-native:do_populate_sysroot \
> mtools-native:do_populate_sysroot \
> - ${PN}:do_image_ext4 \
> + ${PN}:do_image_${ROOTFS_TYPE} \
> "
>
> -IMAGE_TYPEDEP_vmdk = "ext4"
> -IMAGE_TYPEDEP_vdi = "ext4"
> -IMAGE_TYPEDEP_qcow2 = "ext4"
> -IMAGE_TYPEDEP_hdddirect = "ext4"
> +IMAGE_TYPEDEP_vmdk = "${ROOTFS_TYPE}"
> +IMAGE_TYPEDEP_vdi = "${ROOTFS_TYPE}"
> +IMAGE_TYPEDEP_qcow2 = "${ROOTFS_TYPE}"
> +IMAGE_TYPEDEP_hdddirect = "${ROOTFS_TYPE}"
> IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect"
>
> -ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
> +ROOTFS_TYPE ?= "ext4"
> +ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${ROOTFS_TYPE}"
>
> # Used by bootloader
> LABELS_VM ?= "boot"
> --
> 2.8.0.rc3
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Allow different filesystems to be used for VM images.
2016-04-29 8:19 ` Richard Purdie
@ 2016-04-29 10:50 ` Ian Geiser
2016-04-29 11:10 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Ian Geiser @ 2016-04-29 10:50 UTC (permalink / raw)
To: Richard Purdie; +Cc: <openembedded-core@lists.openembedded.org>
---- On Fri, 29 Apr 2016 04:19:00 -0400 Richard Purdie <richard.purdie@linuxfoundation.org> wrote ----
> On Thu, 2016-04-28 at 15:21 -0400, Ian Reinhart Geiser wrote:
> > This allows for things like btrfs to be used vs just ext4.
> > The default value of ext4 is kept so there is no functional
> > change unless ROOTFS_TYPE is set in the inherting recipe.
> >
> > Signed-off-by: Ian Reinhart Geiser <geiseri@geekcentral.pub>
> > ---
> > meta/classes/image-vm.bbclass | 13 +++++++------
> > 1 file changed, 7 insertions(+), 6 deletions(-)
>
>
> This seems reasonable but could I ask you to use a variable name with
> "VM" in the name please?
>
> I appreciate some of the existing ones don't do this but moving forward
> we need to try and better namespace some of these class specific
> variables and this seems like a good place to start.
>
> VM_ROOTFS_TYPE would be better for example (or VMIMG_ROOTFS_TYPE).
>
The other ones have foo_VM in the name. Would ROOTFS_TYPE_VM be acceptable?
> Cheers,
>
> Richard
>
> > diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image
> > -vm.bbclass
> > index 47f7326..50d93d5 100644
> > --- a/meta/classes/image-vm.bbclass
> > +++ b/meta/classes/image-vm.bbclass
> > @@ -23,16 +23,17 @@ do_bootdirectdisk[depends] += "dosfstools
> > -native:do_populate_sysroot \
> > syslinux-native:do_populate_sysroot \
> > parted-native:do_populate_sysroot \
> > mtools-native:do_populate_sysroot \
> > - ${PN}:do_image_ext4 \
> > + ${PN}:do_image_${ROOTFS_TYPE} \
> > "
> >
> > -IMAGE_TYPEDEP_vmdk = "ext4"
> > -IMAGE_TYPEDEP_vdi = "ext4"
> > -IMAGE_TYPEDEP_qcow2 = "ext4"
> > -IMAGE_TYPEDEP_hdddirect = "ext4"
> > +IMAGE_TYPEDEP_vmdk = "${ROOTFS_TYPE}"
> > +IMAGE_TYPEDEP_vdi = "${ROOTFS_TYPE}"
> > +IMAGE_TYPEDEP_qcow2 = "${ROOTFS_TYPE}"
> > +IMAGE_TYPEDEP_hdddirect = "${ROOTFS_TYPE}"
> > IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect"
> >
> > -ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
> > +ROOTFS_TYPE ?= "ext4"
> > +ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${ROOTFS_TYPE}"
> >
> > # Used by bootloader
> > LABELS_VM ?= "boot"
> > --
> > 2.8.0.rc3
> >
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Allow different filesystems to be used for VM images.
2016-04-29 10:50 ` Ian Geiser
@ 2016-04-29 11:10 ` Richard Purdie
0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2016-04-29 11:10 UTC (permalink / raw)
To: Ian Geiser; +Cc: <openembedded-core@lists.openembedded.org>
On Fri, 2016-04-29 at 06:50 -0400, Ian Geiser wrote:
> ---- On Fri, 29 Apr 2016 04:19:00 -0400 Richard Purdie <
> richard.purdie@linuxfoundation.org> wrote ----
> > On Thu, 2016-04-28 at 15:21 -0400, Ian Reinhart Geiser wrote:
> > > This allows for things like btrfs to be used vs just ext4.
> > > The default value of ext4 is kept so there is no functional
> > > change unless ROOTFS_TYPE is set in the inherting recipe.
> > >
> > > Signed-off-by: Ian Reinhart Geiser <geiseri@geekcentral.pub>
> > > ---
> > > meta/classes/image-vm.bbclass | 13 +++++++------
> > > 1 file changed, 7 insertions(+), 6 deletions(-)
> >
> >
> > This seems reasonable but could I ask you to use a variable name
> with
> > "VM" in the name please?
> >
> > I appreciate some of the existing ones don't do this but moving
> forward
> > we need to try and better namespace some of these class specific
> > variables and this seems like a good place to start.
> >
> > VM_ROOTFS_TYPE would be better for example (or VMIMG_ROOTFS_TYPE).
> >
> The other ones have foo_VM in the name. Would ROOTFS_TYPE_VM be
> acceptable?
I'd really prefer to try and use a prefix since otherwise its harder to
know this is from the VM class rather than the rootfs classes which
already heavily use ROOTFS_*...
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-29 11:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 19:21 [PATCH] Allow different filesystems to be used for VM images Ian Reinhart Geiser
2016-04-29 8:19 ` Richard Purdie
2016-04-29 10:50 ` Ian Geiser
2016-04-29 11:10 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox