* [RFC-WIP 0/3] Live Image Type - Please Review
@ 2011-07-26 8:24 Saul Wold
2011-07-26 8:24 ` [RFC-WIP 1/3] classes/image*: Revamp creation of live images Saul Wold
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Saul Wold @ 2011-07-26 8:24 UTC (permalink / raw)
To: openembedded-core
This patch set removes the -directdisk and -live recipes in favor
of having a "live" image part of IMAGE_FSTYPES. This is a first
pass and is not 100% (currently missing the correct incantion to
create the initrd file, it creates the initramfs.ext3 but missing
a step).
Thanks
Sau!
The following changes since commit f10a3457cdfbb4a94978da998d178d4254632fa7:
Move architecture specific TARGET_OS mangling into tune files (2011-07-25 14:19:54 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib sgw/live
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/live
Saul Wold (3):
classes/image*: Revamp creation of live images
Remove -live.bb recipes
Remove -directdisk.bb recipes
meta-rt/images/core-image-minimal-rt-directdisk.bb | 15 --------------
.../{bootimg.bbclass => image-live.bbclass} | 11 ++++++++++
meta/classes/image.bbclass | 3 ++
meta/classes/image_types.bbclass | 20 +++++++++++++++++-
meta/recipes-core/images/core-image-directdisk.inc | 11 ----------
meta/recipes-core/images/core-image-live.inc | 21 --------------------
.../images/core-image-minimal-directdisk.bb | 11 ----------
.../recipes-core/images/core-image-minimal-live.bb | 11 ----------
.../recipes-extended/images/core-image-lsb-live.bb | 11 ----------
.../images/core-image-lsb-sdk-live.bb | 11 ----------
.../images/core-image-sato-directdisk.bb | 9 --------
meta/recipes-sato/images/core-image-sato-live.bb | 11 ----------
.../images/core-image-sato-sdk-directdisk.bb | 9 --------
.../images/core-image-sato-sdk-live.bb | 11 ----------
14 files changed, 32 insertions(+), 133 deletions(-)
delete mode 100644 meta-rt/images/core-image-minimal-rt-directdisk.bb
create mode 100644 meta/classes/image-empty.bbclass
rename meta/classes/{bootimg.bbclass => image-live.bbclass} (91%)
delete mode 100644 meta/recipes-core/images/core-image-directdisk.inc
delete mode 100644 meta/recipes-core/images/core-image-live.inc
delete mode 100644 meta/recipes-core/images/core-image-minimal-directdisk.bb
delete mode 100644 meta/recipes-core/images/core-image-minimal-live.bb
delete mode 100644 meta/recipes-extended/images/core-image-lsb-live.bb
delete mode 100644 meta/recipes-extended/images/core-image-lsb-sdk-live.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-directdisk.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-live.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-sdk-directdisk.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-sdk-live.bb
--
1.7.3.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFC-WIP 1/3] classes/image*: Revamp creation of live images
2011-07-26 8:24 [RFC-WIP 0/3] Live Image Type - Please Review Saul Wold
@ 2011-07-26 8:24 ` Saul Wold
2011-07-26 14:36 ` Richard Purdie
2011-07-26 8:24 ` [RFC-WIP 2/3] Remove -live.bb recipes Saul Wold
2011-07-26 8:24 ` [RFC-WIP 3/3] Remove -directdisk.bb recipes Saul Wold
2 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2011-07-26 8:24 UTC (permalink / raw)
To: openembedded-core
This creates a live image as an IMAGE_FSTYPES, thus removing the
need to have additional -live.bb recipes. To create a live image
one just needs to add live to the IMAGE_FSTYPES list
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
.../{bootimg.bbclass => image-live.bbclass} | 11 +++++++++++
meta/classes/image.bbclass | 3 +++
meta/classes/image_types.bbclass | 20 ++++++++++++++++++--
3 files changed, 32 insertions(+), 2 deletions(-)
create mode 100644 meta/classes/image-empty.bbclass
rename meta/classes/{bootimg.bbclass => image-live.bbclass} (91%)
diff --git a/meta/classes/image-empty.bbclass b/meta/classes/image-empty.bbclass
new file mode 100644
index 0000000..e69de29
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/image-live.bbclass
similarity index 91%
rename from meta/classes/bootimg.bbclass
rename to meta/classes/image-live.bbclass
index 49ee85e..c9cd524 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -25,6 +25,17 @@
# ${APPEND} - an override list of append strings for each label
# ${SYSLINUX_OPTS} - additional options to add to the syslinux file ';' delimited
+AUTO_SYSLINUXCFG = "1"
+INITRD = "${DEPLOY_DIR_IMAGE}/core-image-minimal-initramfs-${MACHINE}.cpio.gz"
+APPEND += "root=/dev/ram0 "
+TIMEOUT = "10"
+LABELS += "boot install"
+
+ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
+
+do_bootimg[depends] += "core-image-minimal-initramfs:do_rootfs"
+do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs"
+
do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
syslinux:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index edfb2d6..79a56f0 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -29,6 +29,9 @@ LDCONFIGDEPEND_libc-uclibc = ""
do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
+IMAGE_TYPE = ${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}
+inherit image-${IMAGE_TYPE}
+
python () {
deps = bb.data.getVarFlag('do_rootfs', 'depends', d) or ""
for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split():
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 1108802..1efdf06 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -1,7 +1,23 @@
+
def get_imagecmds(d):
cmds = "\n"
old_overrides = bb.data.getVar('OVERRIDES', d, 0)
- for type in bb.data.getVar('IMAGE_FSTYPES', d, True).split():
+
+ types = bb.data.getVar('IMAGE_FSTYPES', d, True).split()
+ try:
+ live_pos = types.index("live")
+ try:
+ ext3_pos = types.index("ext3")
+ except ValueError:
+ types.insert(live_pos, "ext3")
+ else:
+ if ext3_pos > live_pos:
+ types.pop(live_pos)
+ #types.append("live")
+ except ValueError:
+ pass
+
+ for type in types:
localdata = bb.data.createCopy(d)
localdata.setVar('OVERRIDES', '%s:%s' % (type, old_overrides))
bb.data.update_data(localdata)
@@ -103,4 +119,4 @@ 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 cramfs ext2 ext2.gz ext3 ext3.gz squashfs squashfs-lzma ubi"
+IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext3 ext3.gz live squashfs squashfs-lzma ubi"
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC-WIP 2/3] Remove -live.bb recipes
2011-07-26 8:24 [RFC-WIP 0/3] Live Image Type - Please Review Saul Wold
2011-07-26 8:24 ` [RFC-WIP 1/3] classes/image*: Revamp creation of live images Saul Wold
@ 2011-07-26 8:24 ` Saul Wold
2011-07-26 8:24 ` [RFC-WIP 3/3] Remove -directdisk.bb recipes Saul Wold
2 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2011-07-26 8:24 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta/recipes-core/images/core-image-live.inc | 21 --------------------
.../recipes-core/images/core-image-minimal-live.bb | 11 ----------
.../recipes-extended/images/core-image-lsb-live.bb | 11 ----------
.../images/core-image-lsb-sdk-live.bb | 11 ----------
meta/recipes-sato/images/core-image-sato-live.bb | 11 ----------
.../images/core-image-sato-sdk-live.bb | 11 ----------
6 files changed, 0 insertions(+), 76 deletions(-)
delete mode 100644 meta/recipes-core/images/core-image-live.inc
delete mode 100644 meta/recipes-core/images/core-image-minimal-live.bb
delete mode 100644 meta/recipes-extended/images/core-image-lsb-live.bb
delete mode 100644 meta/recipes-extended/images/core-image-lsb-sdk-live.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-live.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-sdk-live.bb
diff --git a/meta/recipes-core/images/core-image-live.inc b/meta/recipes-core/images/core-image-live.inc
deleted file mode 100644
index 2c9b3fb..0000000
--- a/meta/recipes-core/images/core-image-live.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-AUTO_SYSLINUXCFG = "1"
-INITRD = "${DEPLOY_DIR_IMAGE}/core-image-minimal-initramfs-${MACHINE}.cpio.gz"
-APPEND += "root=/dev/ram0 "
-TIMEOUT = "10"
-
-EXCLUDE_FROM_WORLD = "1"
-
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-do_bootimg[depends] += "core-image-minimal-initramfs:do_rootfs"
-
-inherit bootimg
-
-do_bootimg_prepend () {
- import bb
- fstypes = bb.data.getVar('IMAGE_FSTYPES', d, True)
- if 'ext3' not in fstypes:
- bb.msg.fatal(bb.msg.domain.Build, "ext3 not in IMAGE_FSTYPES")
-}
-
diff --git a/meta/recipes-core/images/core-image-minimal-live.bb b/meta/recipes-core/images/core-image-minimal-live.bb
deleted file mode 100644
index 0ce2afb..0000000
--- a/meta/recipes-core/images/core-image-minimal-live.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-DESCRIPTION = "Minimal Bootable Live Image"
-
-require core-image-live.inc
-
-LABELS += "boot install"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.ext3"
-
-LICENSE = "MIT"
-
-do_bootimg[depends] += "core-image-minimal:do_rootfs"
diff --git a/meta/recipes-extended/images/core-image-lsb-live.bb b/meta/recipes-extended/images/core-image-lsb-live.bb
deleted file mode 100644
index 72f10f7..0000000
--- a/meta/recipes-extended/images/core-image-lsb-live.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-DESCRIPTION = "LSB Bootable Live Image"
-
-require recipes-core/images/core-image-live.inc
-
-LABELS += "boot install"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-lsb-${MACHINE}.ext3"
-
-LICENSE = "MIT"
-
-do_bootimg[depends] += "core-image-lsb:do_rootfs"
diff --git a/meta/recipes-extended/images/core-image-lsb-sdk-live.bb b/meta/recipes-extended/images/core-image-lsb-sdk-live.bb
deleted file mode 100644
index b01ae06..0000000
--- a/meta/recipes-extended/images/core-image-lsb-sdk-live.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-DESCRIPTION = "LSB SDK Bootable Live Image"
-
-require recipes-core/images/core-image-live.inc
-
-LABELS += "boot install"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-lsb-sdk-${MACHINE}.ext3"
-
-LICENSE = "MIT"
-
-do_bootimg[depends] += "core-image-lsb-sdk:do_rootfs"
diff --git a/meta/recipes-sato/images/core-image-sato-live.bb b/meta/recipes-sato/images/core-image-sato-live.bb
deleted file mode 100644
index 9511ca6..0000000
--- a/meta/recipes-sato/images/core-image-sato-live.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-DESCRIPTION = "Sato Bootable Live Image"
-
-require recipes-core/images/core-image-live.inc
-
-LABELS += "boot install"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-sato-${MACHINE}.ext3"
-
-LICENSE = "MIT"
-
-do_bootimg[depends] += "core-image-sato:do_rootfs"
diff --git a/meta/recipes-sato/images/core-image-sato-sdk-live.bb b/meta/recipes-sato/images/core-image-sato-sdk-live.bb
deleted file mode 100644
index f11d895..0000000
--- a/meta/recipes-sato/images/core-image-sato-sdk-live.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-DESCRIPTION = "Bootable Live Sato SDK Image"
-
-require recipes-core/images/core-image-live.inc
-
-LABELS += "boot install"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-sato-sdk-${MACHINE}.ext3"
-
-LICENSE = "MIT"
-
-do_bootimg[depends] += "core-image-sato-sdk:do_rootfs"
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC-WIP 3/3] Remove -directdisk.bb recipes
2011-07-26 8:24 [RFC-WIP 0/3] Live Image Type - Please Review Saul Wold
2011-07-26 8:24 ` [RFC-WIP 1/3] classes/image*: Revamp creation of live images Saul Wold
2011-07-26 8:24 ` [RFC-WIP 2/3] Remove -live.bb recipes Saul Wold
@ 2011-07-26 8:24 ` Saul Wold
2 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2011-07-26 8:24 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta-rt/images/core-image-minimal-rt-directdisk.bb | 15 ---------------
meta/recipes-core/images/core-image-directdisk.inc | 11 -----------
.../images/core-image-minimal-directdisk.bb | 11 -----------
.../images/core-image-sato-directdisk.bb | 9 ---------
.../images/core-image-sato-sdk-directdisk.bb | 9 ---------
5 files changed, 0 insertions(+), 55 deletions(-)
delete mode 100644 meta-rt/images/core-image-minimal-rt-directdisk.bb
delete mode 100644 meta/recipes-core/images/core-image-directdisk.inc
delete mode 100644 meta/recipes-core/images/core-image-minimal-directdisk.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-directdisk.bb
delete mode 100644 meta/recipes-sato/images/core-image-sato-sdk-directdisk.bb
diff --git a/meta-rt/images/core-image-minimal-rt-directdisk.bb b/meta-rt/images/core-image-minimal-rt-directdisk.bb
deleted file mode 100644
index b3f3523..0000000
--- a/meta-rt/images/core-image-minimal-rt-directdisk.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2010 Intel Corporation.
-#
-
-require recipes-core/images/core-image-directdisk.inc
-
-DESCRIPTION = "Bootable Minimal Real-Time Direct Disk Image"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-minimal-rt-${MACHINE}.ext3"
-
-LICENSE = "MIT"
-
-do_bootdirectdisk[depends] += "core-image-minimal-rt:do_rootfs"
-
-
diff --git a/meta/recipes-core/images/core-image-directdisk.inc b/meta/recipes-core/images/core-image-directdisk.inc
deleted file mode 100644
index ef9e72d..0000000
--- a/meta/recipes-core/images/core-image-directdisk.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-inherit boot-directdisk
-
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-do_bootdirectdisk_prepend () {
- import bb
- fstypes = bb.data.getVar('IMAGE_FSTYPES', d, True)
- if 'ext3' not in fstypes:
- bb.msg.fatal(bb.msg.domain.Build, "ext3 not in IMAGE_FSTYPES")
-}
\ No newline at end of file
diff --git a/meta/recipes-core/images/core-image-minimal-directdisk.bb b/meta/recipes-core/images/core-image-minimal-directdisk.bb
deleted file mode 100644
index ed23e45..0000000
--- a/meta/recipes-core/images/core-image-minimal-directdisk.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require core-image-directdisk.inc
-
-DESCRIPTION = "Minimal Bootable Direct Disk Image"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.ext3"
-
-LICENSE = "MIT"
-
-do_bootdirectdisk[depends] += "core-image-minimal:do_rootfs"
-
-
diff --git a/meta/recipes-sato/images/core-image-sato-directdisk.bb b/meta/recipes-sato/images/core-image-sato-directdisk.bb
deleted file mode 100644
index 1e6aa66..0000000
--- a/meta/recipes-sato/images/core-image-sato-directdisk.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require recipes-core/images/core-image-directdisk.inc
-
-DESCRIPTION = "Sato Direct Disk Image"
-
-LICENSE = "MIT"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-sato-${MACHINE}.ext3"
-
-do_bootdirectdisk[depends] += "core-image-sato:do_rootfs"
diff --git a/meta/recipes-sato/images/core-image-sato-sdk-directdisk.bb b/meta/recipes-sato/images/core-image-sato-sdk-directdisk.bb
deleted file mode 100644
index 4c1535a..0000000
--- a/meta/recipes-sato/images/core-image-sato-sdk-directdisk.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require recipes-core/images/core-image-directdisk.inc
-
-DESCRIPTION = "Sato SDK Direct Disk Image"
-
-LICENSE = "MIT"
-
-ROOTFS = "${DEPLOY_DIR_IMAGE}/core-image-sato-sdk-${MACHINE}.ext3"
-
-do_bootdirectdisk[depends] += "core-image-sato-sdk:do_rootfs"
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC-WIP 1/3] classes/image*: Revamp creation of live images
2011-07-26 8:24 ` [RFC-WIP 1/3] classes/image*: Revamp creation of live images Saul Wold
@ 2011-07-26 14:36 ` Richard Purdie
0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2011-07-26 14:36 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-07-26 at 01:24 -0700, Saul Wold wrote:
> This creates a live image as an IMAGE_FSTYPES, thus removing the
> need to have additional -live.bb recipes. To create a live image
> one just needs to add live to the IMAGE_FSTYPES list
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> .../{bootimg.bbclass => image-live.bbclass} | 11 +++++++++++
> meta/classes/image.bbclass | 3 +++
> meta/classes/image_types.bbclass | 20 ++++++++++++++++++--
> 3 files changed, 32 insertions(+), 2 deletions(-)
> create mode 100644 meta/classes/image-empty.bbclass
> rename meta/classes/{bootimg.bbclass => image-live.bbclass} (91%)
>
> diff --git a/meta/classes/image-empty.bbclass b/meta/classes/image-empty.bbclass
> new file mode 100644
> index 0000000..e69de29
> diff --git a/meta/classes/bootimg.bbclass b/meta/classes/image-live.bbclass
> similarity index 91%
> rename from meta/classes/bootimg.bbclass
> rename to meta/classes/image-live.bbclass
> index 49ee85e..c9cd524 100644
> --- a/meta/classes/bootimg.bbclass
> +++ b/meta/classes/image-live.bbclass
> @@ -25,6 +25,17 @@
> # ${APPEND} - an override list of append strings for each label
> # ${SYSLINUX_OPTS} - additional options to add to the syslinux file ';' delimited
>
> +AUTO_SYSLINUXCFG = "1"
> +INITRD = "${DEPLOY_DIR_IMAGE}/core-image-minimal-initramfs-${MACHINE}.cpio.gz"
> +APPEND += "root=/dev/ram0 "
> +TIMEOUT = "10"
> +LABELS += "boot install"
> +
> +ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
> +
> +do_bootimg[depends] += "core-image-minimal-initramfs:do_rootfs"
> +do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs"
> +
> do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
> syslinux:do_populate_sysroot \
> syslinux-native:do_populate_sysroot \
It might be an idea to leave bootimg.bbclass as is for anyone using it
as it currently stands and make this image-xxx.bbclass inherit it?
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index edfb2d6..79a56f0 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -29,6 +29,9 @@ LDCONFIGDEPEND_libc-uclibc = ""
> do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
> do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
>
> +IMAGE_TYPE = ${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}
> +inherit image-${IMAGE_TYPE}
> +
> python () {
> deps = bb.data.getVarFlag('do_rootfs', 'depends', d) or ""
> for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split():
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 1108802..1efdf06 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -1,7 +1,23 @@
> +
> def get_imagecmds(d):
> cmds = "\n"
> old_overrides = bb.data.getVar('OVERRIDES', d, 0)
> - for type in bb.data.getVar('IMAGE_FSTYPES', d, True).split():
> +
> + types = bb.data.getVar('IMAGE_FSTYPES', d, True).split()
Er, how about:
if "live" in types:
# For live images, ensure they get processed last
# live images also depend on ext3 so ensure its present
types.remove("live")
if "ext3" not in types:
types.append("ext3")
types.append("live")
> + try:
> + live_pos = types.index("live")
> + try:
> + ext3_pos = types.index("ext3")
> + except ValueError:
> + types.insert(live_pos, "ext3")
> + else:
> + if ext3_pos > live_pos:
> + types.pop(live_pos)
> + #types.append("live")
> + except ValueError:
> + pass
> +
> + for type in types:
> localdata = bb.data.createCopy(d)
> localdata.setVar('OVERRIDES', '%s:%s' % (type, old_overrides))
> bb.data.update_data(localdata)
> @@ -103,4 +119,4 @@ 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 cramfs ext2 ext2.gz ext3 ext3.gz squashfs squashfs-lzma ubi"
> +IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext3 ext3.gz live squashfs squashfs-lzma ubi"
Otherwise looks good :)
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-26 14:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-26 8:24 [RFC-WIP 0/3] Live Image Type - Please Review Saul Wold
2011-07-26 8:24 ` [RFC-WIP 1/3] classes/image*: Revamp creation of live images Saul Wold
2011-07-26 14:36 ` Richard Purdie
2011-07-26 8:24 ` [RFC-WIP 2/3] Remove -live.bb recipes Saul Wold
2011-07-26 8:24 ` [RFC-WIP 3/3] Remove -directdisk.bb recipes Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox