]> code.ossystems Code Review - openembedded-core.git/commitdiff
image*.bbclass, bootimg.bbclass: add image type dependencies
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Tue, 18 Feb 2014 13:49:43 +0000 (15:49 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Feb 2014 14:28:04 +0000 (14:28 +0000)
The following dependencies were manually added in the image creation
code. However, in order to have an image dependency mechanism in place,
use a new variable, IMAGE_TYPEDEP, to declare that an image type depends
on another being already created.

The following dependencies are added by this commit:

elf -> cpio.gz
live -> ext3
vmdk -> ext3
iso -> ext3
hddimg -> ext3

This commit adds also another new variable: IMAGE_TYPES_MASKED. Currently,
masking out certain types from IMAGE_FSTYPES was hardcoded in the image
creation code.

[YOCTO #5830]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/bootimg.bbclass
meta/classes/image-live.bbclass
meta/classes/image-vmdk.bbclass
meta/classes/image_types.bbclass

index 395085d0ab8598085916ea3b32ef3b26b14d0d1b..c370bd6a10401effeeadd39c0ce6c9163e1bb24d 100644 (file)
@@ -232,4 +232,8 @@ python do_bootimg() {
     bb.build.exec_func('build_iso', d)
 }
 
+IMAGE_TYPEDEP_iso = "ext3"
+IMAGE_TYPEDEP_hddimg = "ext3"
+IMAGE_TYPES_MASKED += "iso hddimg"
+
 addtask bootimg before do_build
index bfb59f808baa95df4d3a9f38900250ba64800e33..c7e6937fa9e495ea599a43955c40f34d365bad83 100644 (file)
@@ -13,3 +13,6 @@ do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs"
 do_bootimg[depends] += "${PN}:do_rootfs"
 
 inherit bootimg
+
+IMAGE_TYPEDEP_live = "ext3"
+IMAGE_TYPES_MASKED += "live"
index 6983e5c8238602d534a22582e019e615d6a924e3..6a98f17b9ddd16ef65b7c5847b14c5516d478b4f 100644 (file)
@@ -16,6 +16,9 @@ ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
 #inherit image-live
 inherit boot-directdisk
 
+IMAGE_TYPEDEP_vmdk = "ext3"
+IMAGE_TYPES_MASKED += "vmdk"
+
 create_vmdk_image () {
        qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
        ln -sf ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
index 89749430bc0f253c7f771c13bf11319af389668d..9577b1f2ecea45753939ca8549ad67a0a1b69ced 100644 (file)
@@ -80,6 +80,7 @@ IMAGE_CMD_elf () {
        test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf
        mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
 }
+IMAGE_TYPEDEP_elf = "cpio.gz"
 
 UBI_VOLNAME ?= "${MACHINE}-rootfs"
 
@@ -146,3 +147,7 @@ DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso"
 
 # Use IMAGE_EXTENSION_xxx to map image type 'xxx' with real image file extension name(s) for Hob
 IMAGE_EXTENSION_live = "hddimg iso"
+
+# The IMAGE_TYPES_MASKED variable will be used to mask out from the IMAGE_FSTYPES,
+# images that will not be built at do_rootfs time: vmdk, hddimg, iso, etc.
+IMAGE_TYPES_MASKED ?= ""