image types: split live into iso and hddimg
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 +++++++---- meta/conf/machine/include/ia32-base.inc | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-)
meta/classes/image.bbclass +10 -1
@@ -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}
meta/classes/image_types.bbclass +7 -4
@@ -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}"
meta/conf/machine/include/ia32-base.inc +1 -1
@@ -10,7 +10,7 @@ MACHINE_FEATURES += "screen keyboard pci usbhost ext2 ext3 x86 \ MACHINE_EXTRA_RRECOMMENDS += "kernel-modules eee-acpi-scripts" -IMAGE_FSTYPES += "ext3 cpio.gz live" +IMAGE_FSTYPES += "ext3 cpio.gz iso hddimg" KERNEL_IMAGETYPE ?= "bzImage"
Signature · 1 line
1.8.1.2
Quoted 8 lines · Valentin Popa
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 +++++++---- meta/conf/machine/include/ia32-base.inc | 2 +-
This is one place, but I genericx86* use live also, although I am talking with Darren about merging his changes to meta-yocto-bsp with this some how, so I am going to hold this patch until we work that part out.
Sau!
Quoted 78 lines
3 files changed, 18 insertions(+), 6 deletions(-)meta/classes/image.bbclass +10
-1@@ -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}meta/classes/image_types.bbclass +7
-4@@ -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}"meta/conf/machine/include/ia32-base.inc +1
-1@@ -10,7 +10,7 @@ MACHINE_FEATURES += "screen keyboard pci usbhost ext2 ext3 x86 \ MACHINE_EXTRA_RRECOMMENDS += "kernel-modules eee-acpi-scripts" -IMAGE_FSTYPES += "ext3 cpio.gz live" +IMAGE_FSTYPES += "ext3 cpio.gz iso hddimg" KERNEL_IMAGETYPE ?= "bzImage"
Quoted 4 lines · Saul Wold
Quoted 3 lines · Valentin Popa
Changes to split live into iso and hddimg without
adding a new image type class.
Quoted 8 lines
Quoted 5 lines
[YOCTO #3197]
--- meta/classes/image.bbclass | 11 ++++++++++- meta/classes/image_types.bbclass | 11 +++++++---- meta/conf/machine/include/ia32-base.inc | 2 +-This is one place, but I genericx86* use live also, although I am talking with Darren about merging his changes to meta-yocto-bsp with this some how, so I am going to hold this patch until we work that part out.
This is likely what triggered the minnow failures on the autobuilder too.
Cheers,
Richard
Quoted 15 lines · Valentin Popa
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 +++++++---- meta/conf/machine/include/ia32-base.inc | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-)meta/classes/image.bbclass +0
-0
meta/classes/image.bbclass do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-nati · line 92
Quoted 7 lines
meta/classes/image.bbclass +3
-1@@ -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)}' +
So these are really overriding any value that might have been set by a .conf file.
This can be seen if you set NOISO in a conf (like minnow.conf does), you can use bitbake -e to easily check this and verify the values.
So the above 2 lines should really be ?= for a conditional setting if unset and live image time is passed in.
I am not sure that this still correctly handles the live FSTYPE incase it's still in use by other BSPs
I think we might need something like the following to ensure compatibility:
-IMAGE_TYPE_live = '${@build_live(d)}'
+IMAGE_TYPE_temp = '${@build_live(d)}'
+IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live", "${IMAGE_TYPE_temp}"
Thanks for working on this patch.
Sau!
Quoted 64 lines
meta/classes/image.bbclass +7
-0+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}meta/classes/image_types.bbclass +7
-4@@ -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}"meta/conf/machine/include/ia32-base.inc +1
-1@@ -10,7 +10,7 @@ MACHINE_FEATURES += "screen keyboard pci usbhost ext2 ext3 x86 \ MACHINE_EXTRA_RRECOMMENDS += "kernel-modules eee-acpi-scripts" -IMAGE_FSTYPES += "ext3 cpio.gz live" +IMAGE_FSTYPES += "ext3 cpio.gz iso hddimg" KERNEL_IMAGETYPE ?= "bzImage"