* [PATCH_V2] HOB: split live into iso and hddimg
@ 2013-09-04 15:57 Valentin Popa
2013-09-04 16:10 ` Saul Wold
0 siblings, 1 reply; 5+ messages in thread
From: Valentin Popa @ 2013-09-04 15:57 UTC (permalink / raw)
To: openembedded-core
changes to split live into iso and hddimg without
adding a new image type class.
[YOCTO #3197]
---
meta/classes/image.bbclass | 11 ++++++++++-
meta/classes/image_types.bbclass | 11 +++++++----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index ea59c36..3f76d80 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -87,7 +87,16 @@ do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-nati
do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
do_rootfs[recrdeptask] += "do_packagedata"
-IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}'
+NOISO = '${@base_contains("IMAGE_FSTYPES", "iso", "0", "1", d)}'
+NOHDD = '${@base_contains("IMAGE_FSTYPES", "hddimg", "0", "1", d)}'
+
+def build_live(d):
+ if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0":
+ return "live"
+ else:
+ return "empty"
+
+IMAGE_TYPE_live = '${@build_live(d)}'
inherit image-${IMAGE_TYPE_live}
IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "vmdk", "empty", d)}'
inherit image-${IMAGE_TYPE_vmdk}
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index c168ed5..6af6499 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -43,12 +43,15 @@ def get_imagecmds(d):
if "ext3" not in alltypes:
alltypes.append("ext3")
types.remove("vmdk")
- if "live" in types:
+ if "iso" in types or "hddimg" in types:
if "ext3" not in types:
types.append("ext3")
if "ext3" not in alltypes:
alltypes.append("ext3")
- types.remove("live")
+ if "iso" in types:
+ types.remove("iso")
+ if "hddimg" in types:
+ types.remove("hddimg")
if d.getVar('IMAGE_LINK_NAME', True):
if d.getVar('RM_OLD_IMAGE', True) == "1":
@@ -115,7 +118,7 @@ def imagetypes_getdepends(d):
deps = []
ctypes = d.getVar('COMPRESSIONTYPES', True).split()
for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
- if type == "vmdk" or type == "live":
+ if type == "vmdk" or type == "iso" or type == "hddimg":
type = "ext3"
basetype = type
for ctype in ctypes:
@@ -230,7 +233,7 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"
IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
-IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf"
+IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf iso hddimg"
COMPRESSIONTYPES = "gz bz2 lzma xz"
COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH_V2] HOB: split live into iso and hddimg
2013-09-04 15:57 [PATCH_V2] HOB: split live into iso and hddimg Valentin Popa
@ 2013-09-04 16:10 ` Saul Wold
2013-09-05 0:38 ` Saul Wold
2013-09-05 11:52 ` Valentin Popa
0 siblings, 2 replies; 5+ messages in thread
From: Saul Wold @ 2013-09-04 16:10 UTC (permalink / raw)
To: Valentin Popa; +Cc: dvhart@linux.intel.com, openembedded-core
On 09/04/2013 08:57 AM, Valentin Popa wrote:
> changes to split live into iso and hddimg without
> adding a new image type class.
>
Will there be corresponding patches for the places that IMAGE_FSTYPES
use the "live" type?
There may also be some doc's changes that are needed.
Sau!
> [YOCTO #3197]
> ---
> meta/classes/image.bbclass | 11 ++++++++++-
> meta/classes/image_types.bbclass | 11 +++++++----
> 2 files changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index ea59c36..3f76d80 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -87,7 +87,16 @@ do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-nati
> do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
> do_rootfs[recrdeptask] += "do_packagedata"
>
> -IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}'
> +NOISO = '${@base_contains("IMAGE_FSTYPES", "iso", "0", "1", d)}'
> +NOHDD = '${@base_contains("IMAGE_FSTYPES", "hddimg", "0", "1", d)}'
> +
> +def build_live(d):
> + if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0":
> + return "live"
> + else:
> + return "empty"
> +
> +IMAGE_TYPE_live = '${@build_live(d)}'
> inherit image-${IMAGE_TYPE_live}
> IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "vmdk", "empty", d)}'
> inherit image-${IMAGE_TYPE_vmdk}
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index c168ed5..6af6499 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -43,12 +43,15 @@ def get_imagecmds(d):
> if "ext3" not in alltypes:
> alltypes.append("ext3")
> types.remove("vmdk")
> - if "live" in types:
> + if "iso" in types or "hddimg" in types:
> if "ext3" not in types:
> types.append("ext3")
> if "ext3" not in alltypes:
> alltypes.append("ext3")
> - types.remove("live")
> + if "iso" in types:
> + types.remove("iso")
> + if "hddimg" in types:
> + types.remove("hddimg")
>
> if d.getVar('IMAGE_LINK_NAME', True):
> if d.getVar('RM_OLD_IMAGE', True) == "1":
> @@ -115,7 +118,7 @@ def imagetypes_getdepends(d):
> deps = []
> ctypes = d.getVar('COMPRESSIONTYPES', True).split()
> for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
> - if type == "vmdk" or type == "live":
> + if type == "vmdk" or type == "iso" or type == "hddimg":
> type = "ext3"
> basetype = type
> for ctype in ctypes:
> @@ -230,7 +233,7 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"
> IMAGE_DEPENDS_ubifs = "mtd-utils-native"
>
> # This variable is available to request which values are suitable for IMAGE_FSTYPES
> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf"
> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf iso hddimg"
>
> COMPRESSIONTYPES = "gz bz2 lzma xz"
> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH_V2] HOB: split live into iso and hddimg
2013-09-04 16:10 ` Saul Wold
@ 2013-09-05 0:38 ` Saul Wold
2013-09-05 8:44 ` Richard Purdie
2013-09-05 11:52 ` Valentin Popa
1 sibling, 1 reply; 5+ messages in thread
From: Saul Wold @ 2013-09-05 0:38 UTC (permalink / raw)
Cc: dvhart@linux.intel.com, openembedded-core
Also the patch summary does not conform to your style, it should be
image*: split live into iso and hddimg for hob
tells us more that it's the image code, not hob code.
See additional comment below.
On 09/04/2013 09:10 AM, Saul Wold wrote:
> On 09/04/2013 08:57 AM, Valentin Popa wrote:
>> changes to split live into iso and hddimg without
>> adding a new image type class.
>>
>
> Will there be corresponding patches for the places that IMAGE_FSTYPES
> use the "live" type?
>
> There may also be some doc's changes that are needed.
>
> Sau!
>
>> [YOCTO #3197]
>> ---
>> meta/classes/image.bbclass | 11 ++++++++++-
>> meta/classes/image_types.bbclass | 11 +++++++----
>> 2 files changed, 17 insertions(+), 5 deletions(-)
>>
>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>> index ea59c36..3f76d80 100644
>> --- a/meta/classes/image.bbclass
>> +++ b/meta/classes/image.bbclass
>> @@ -87,7 +87,16 @@ do_rootfs[depends] +=
>> "makedevs-native:do_populate_sysroot virtual/fakeroot-nati
>> do_rootfs[depends] +=
>> "virtual/update-alternatives-native:do_populate_sysroot
>> update-rc.d-native:do_populate_sysroot"
>> do_rootfs[recrdeptask] += "do_packagedata"
>>
>> -IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live",
>> "empty", d)}'
>> +NOISO = '${@base_contains("IMAGE_FSTYPES", "iso", "0", "1", d)}'
>> +NOHDD = '${@base_contains("IMAGE_FSTYPES", "hddimg", "0", "1", d)}'
>> +
>> +def build_live(d):
>> + if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0":
>> + return "live"
>> + else:
>> + return "empty"
>> +
I think RP suggested a way to simplify this code.
Sau!
>> +IMAGE_TYPE_live = '${@build_live(d)}'
>> inherit image-${IMAGE_TYPE_live}
>> IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "vmdk",
>> "empty", d)}'
>> inherit image-${IMAGE_TYPE_vmdk}
>> diff --git a/meta/classes/image_types.bbclass
>> b/meta/classes/image_types.bbclass
>> index c168ed5..6af6499 100644
>> --- a/meta/classes/image_types.bbclass
>> +++ b/meta/classes/image_types.bbclass
>> @@ -43,12 +43,15 @@ def get_imagecmds(d):
>> if "ext3" not in alltypes:
>> alltypes.append("ext3")
>> types.remove("vmdk")
>> - if "live" in types:
>> + if "iso" in types or "hddimg" in types:
>> if "ext3" not in types:
>> types.append("ext3")
>> if "ext3" not in alltypes:
>> alltypes.append("ext3")
>> - types.remove("live")
>> + if "iso" in types:
>> + types.remove("iso")
>> + if "hddimg" in types:
>> + types.remove("hddimg")
>>
>> if d.getVar('IMAGE_LINK_NAME', True):
>> if d.getVar('RM_OLD_IMAGE', True) == "1":
>> @@ -115,7 +118,7 @@ def imagetypes_getdepends(d):
>> deps = []
>> ctypes = d.getVar('COMPRESSIONTYPES', True).split()
>> for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
>> - if type == "vmdk" or type == "live":
>> + if type == "vmdk" or type == "iso" or type == "hddimg":
>> type = "ext3"
>> basetype = type
>> for ctype in ctypes:
>> @@ -230,7 +233,7 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"
>> IMAGE_DEPENDS_ubifs = "mtd-utils-native"
>>
>> # This variable is available to request which values are suitable
>> for IMAGE_FSTYPES
>> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3
>> ext3.gz ext2.lzma btrfs live squashfs squashfs-xz ubi ubifs tar tar.gz
>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf"
>> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3
>> ext3.gz ext2.lzma btrfs squashfs squashfs-xz ubi ubifs tar tar.gz
>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf iso hddimg"
>>
>> COMPRESSIONTYPES = "gz bz2 lzma xz"
>> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
>>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH_V2] HOB: split live into iso and hddimg
2013-09-05 0:38 ` Saul Wold
@ 2013-09-05 8:44 ` Richard Purdie
0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2013-09-05 8:44 UTC (permalink / raw)
To: Saul Wold; +Cc: dvhart@linux.intel.com, openembedded-core
On Wed, 2013-09-04 at 17:38 -0700, Saul Wold wrote:
> Also the patch summary does not conform to your style, it should be
> image*: split live into iso and hddimg for hob
>
> tells us more that it's the image code, not hob code.
>
> See additional comment below.
>
> On 09/04/2013 09:10 AM, Saul Wold wrote:
> > On 09/04/2013 08:57 AM, Valentin Popa wrote:
> >> changes to split live into iso and hddimg without
> >> adding a new image type class.
> >>
> >
> > Will there be corresponding patches for the places that IMAGE_FSTYPES
> > use the "live" type?
> >
> > There may also be some doc's changes that are needed.
> >
> > Sau!
> >
> >> [YOCTO #3197]
> >> ---
> >> meta/classes/image.bbclass | 11 ++++++++++-
> >> meta/classes/image_types.bbclass | 11 +++++++----
> >> 2 files changed, 17 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> >> index ea59c36..3f76d80 100644
> >> --- a/meta/classes/image.bbclass
> >> +++ b/meta/classes/image.bbclass
> >> @@ -87,7 +87,16 @@ do_rootfs[depends] +=
> >> "makedevs-native:do_populate_sysroot virtual/fakeroot-nati
> >> do_rootfs[depends] +=
> >> "virtual/update-alternatives-native:do_populate_sysroot
> >> update-rc.d-native:do_populate_sysroot"
> >> do_rootfs[recrdeptask] += "do_packagedata"
> >>
> >> -IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live",
> >> "empty", d)}'
> >> +NOISO = '${@base_contains("IMAGE_FSTYPES", "iso", "0", "1", d)}'
> >> +NOHDD = '${@base_contains("IMAGE_FSTYPES", "hddimg", "0", "1", d)}'
> >> +
> >> +def build_live(d):
> >> + if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0":
> >> + return "live"
> >> + else:
> >> + return "empty"
> >> +
> I think RP suggested a way to simplify this code.
Its not clear from this patch but I think NOISO and NOHDD are used as
triggers elsewhere in the code so this is probably reasonable.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH_V2] HOB: split live into iso and hddimg
2013-09-04 16:10 ` Saul Wold
2013-09-05 0:38 ` Saul Wold
@ 2013-09-05 11:52 ` Valentin Popa
1 sibling, 0 replies; 5+ messages in thread
From: Valentin Popa @ 2013-09-05 11:52 UTC (permalink / raw)
To: Saul Wold; +Cc: dvhart@linux.intel.com, openembedded-core
Yes, this patch is more like a workaround.
On 09/04/2013 07:10 PM, Saul Wold wrote:
> On 09/04/2013 08:57 AM, Valentin Popa wrote:
>> changes to split live into iso and hddimg without
>> adding a new image type class.
>>
>
> Will there be corresponding patches for the places that IMAGE_FSTYPES
> use the "live" type?
>
> There may also be some doc's changes that are needed.
>
> Sau!
>
>> [YOCTO #3197]
>> ---
>> meta/classes/image.bbclass | 11 ++++++++++-
>> meta/classes/image_types.bbclass | 11 +++++++----
>> 2 files changed, 17 insertions(+), 5 deletions(-)
>>
>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>> index ea59c36..3f76d80 100644
>> --- a/meta/classes/image.bbclass
>> +++ b/meta/classes/image.bbclass
>> @@ -87,7 +87,16 @@ do_rootfs[depends] +=
>> "makedevs-native:do_populate_sysroot virtual/fakeroot-nati
>> do_rootfs[depends] +=
>> "virtual/update-alternatives-native:do_populate_sysroot
>> update-rc.d-native:do_populate_sysroot"
>> do_rootfs[recrdeptask] += "do_packagedata"
>>
>> -IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live",
>> "empty", d)}'
>> +NOISO = '${@base_contains("IMAGE_FSTYPES", "iso", "0", "1", d)}'
>> +NOHDD = '${@base_contains("IMAGE_FSTYPES", "hddimg", "0", "1", d)}'
>> +
>> +def build_live(d):
>> + if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) ==
>> "0":
>> + return "live"
>> + else:
>> + return "empty"
>> +
>> +IMAGE_TYPE_live = '${@build_live(d)}'
>> inherit image-${IMAGE_TYPE_live}
>> IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk",
>> "vmdk", "empty", d)}'
>> inherit image-${IMAGE_TYPE_vmdk}
>> diff --git a/meta/classes/image_types.bbclass
>> b/meta/classes/image_types.bbclass
>> index c168ed5..6af6499 100644
>> --- a/meta/classes/image_types.bbclass
>> +++ b/meta/classes/image_types.bbclass
>> @@ -43,12 +43,15 @@ def get_imagecmds(d):
>> if "ext3" not in alltypes:
>> alltypes.append("ext3")
>> types.remove("vmdk")
>> - if "live" in types:
>> + if "iso" in types or "hddimg" in types:
>> if "ext3" not in types:
>> types.append("ext3")
>> if "ext3" not in alltypes:
>> alltypes.append("ext3")
>> - types.remove("live")
>> + if "iso" in types:
>> + types.remove("iso")
>> + if "hddimg" in types:
>> + types.remove("hddimg")
>>
>> if d.getVar('IMAGE_LINK_NAME', True):
>> if d.getVar('RM_OLD_IMAGE', True) == "1":
>> @@ -115,7 +118,7 @@ def imagetypes_getdepends(d):
>> deps = []
>> ctypes = d.getVar('COMPRESSIONTYPES', True).split()
>> for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
>> - if type == "vmdk" or type == "live":
>> + if type == "vmdk" or type == "iso" or type == "hddimg":
>> type = "ext3"
>> basetype = type
>> for ctype in ctypes:
>> @@ -230,7 +233,7 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"
>> IMAGE_DEPENDS_ubifs = "mtd-utils-native"
>>
>> # This variable is available to request which values are suitable
>> for IMAGE_FSTYPES
>> -IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3
>> ext3.gz ext2.lzma btrfs live squashfs squashfs-xz ubi ubifs tar
>> tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf"
>> +IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3
>> ext3.gz ext2.lzma btrfs squashfs squashfs-xz ubi ubifs tar tar.gz
>> tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf iso hddimg"
>>
>> COMPRESSIONTYPES = "gz bz2 lzma xz"
>> COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-05 11:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 15:57 [PATCH_V2] HOB: split live into iso and hddimg Valentin Popa
2013-09-04 16:10 ` Saul Wold
2013-09-05 0:38 ` Saul Wold
2013-09-05 8:44 ` Richard Purdie
2013-09-05 11:52 ` Valentin Popa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox