Create vmdk image creation class
cover Create vmdk image creation class
Richard,
Here is the re-work of the vmdk image creation class, this integrates in as a class since it needs to happen after the hddimg (live) is created.
Sau!
The following changes since commit 8054497b393d40a2ed8c802c74a02e92a3001297:
image_types_uboot: Update to work after recent image_types changes (2012-02-29 18:23:04 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib sgw/self
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/self
Saul Wold (3):
image-live: Allow LABELS to be modified
image-vmdk: Create image_vmdk class and setup image and image_types
to use it
self-hosted-image: Create a VMDK image with correct SYSLINUX_*
settings
Zhai Edwin (1):
self-hosted: Fix multiple libx11 error
meta/classes/image-live.bbclass | 5 +++-- meta/classes/image-vmdk.bbclass | 22 ++++++++++++++++++++++ meta/classes/image.bbclass | 6 ++++-- meta/classes/image_types.bbclass | 15 +++++++++------ meta/recipes-core/images/self-hosted-image.bb | 16 ++++++++++++++-- meta/recipes-core/tasks/task-self-hosted.bb | 4 ++-- 6 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 meta/classes/image-vmdk.bbclass
Signature · 1 line
1.7.7.6
PATCH 1/4 self-hosted: Fix multiple libx11 error
From: Zhai Edwin <[email protected]>
Self-hosted needs package libx11-dev, which is ambiguous as virtual/libx11 is provided by libx11 or libx11-trim. This patch explictly set the perferred one, libx11-trim-dev, to avoid this.
--- meta/recipes-core/tasks/task-self-hosted.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/tasks/task-self-hosted.bb +2 -2
@@ -3,7 +3,7 @@ # DESCRIPTION = "Create Basic Image Tasks" -PR = "r6" +PR = "r7" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -189,6 +189,6 @@ RDEPENDS_task-self-hosted-graphics = "\ libglu-dev \ libsdl \ libsdl-dev \ - libx11-dev \ + libx11-trim-dev \ python-pygtk \ "
Signature · 1 line
1.7.7.6
Re: [PATCH 1/4] self-hosted: Fix multiple libx11 error
Op 1 mrt. 2012, om 08:46 heeft Saul Wold het volgende geschreven:
Quoted 5 lines
From: Zhai Edwin <[email protected]>
Self-hosted needs package libx11-dev, which is ambiguous as virtual/libx11 is provided by libx11 or libx11-trim. This patch explictly set the perferred one, libx11-trim-dev, to avoid this.
I don't like this patch, it now forces a distro decision on a task on oe-core, which is bad.
regards,
Koen
PATCH 1/1 libx11-trim/diet: Add RPROVIDES for libx11-dev
We have things that depend on libx11-dev, this patch ensures the -trim and -diet versions provide it. This resolves some multiple providers warnings.
---
Koen/Saul: This is how I think we should be fixing the libx11 issues...
meta/recipes-graphics/xorg-lib/libx11-diet_1.4.4.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI += "file://x11_disable_makekeys.patch \ file://fix-utf8-wrong-define.patch \ " +RPROVIDES_${PN}-dev = "libx11-dev" SRC_URI[md5sum] = "ed7c382cbf8c13425b6a66bcac0ca5d9" SRC_URI[sha256sum] = "7fe62180f08ef5f0a0062fb444591e349cae2ab5af6ad834599f5c654e6c840d"
meta/recipes-graphics/xorg-lib/libx11-trim_1.4.4.bb +2 -1
@@ -5,7 +5,7 @@ DESCRIPTION += " Support for XCMS is disabled in this version." LICENSE = "MIT & MIT-style & BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7" -PR = "r0" +PR = "r1" DEPENDS += "libxcb xproto xextproto xtrans libxau kbproto inputproto xf86bigfontproto xproto-native"
@@ -13,6 +13,7 @@ SRC_URI += "file://x11_disable_makekeys.patch \ file://keysymdef_include.patch \ file://makekeys_crosscompile.patch" +RPROVIDES_${PN}-dev = "libx11-dev" SRC_URI[md5sum] = "ed7c382cbf8c13425b6a66bcac0ca5d9" SRC_URI[sha256sum] = "7fe62180f08ef5f0a0062fb444591e349cae2ab5af6ad834599f5c654e6c840d"
Re: [PATCH] libx11-trim/diet: Add RPROVIDES for libx11-dev
Quoted 5 lines · Richard Purdie
We have things that depend on libx11-dev, this patch ensures the -trim and -diet versions provide it. This resolves some multiple providers warnings.
Signed-off-by Richard Purdie <[email protected]>
It's probably fine now as only libx11_1.4.4.bb has BBCLASSEXTENDS = "nativesdk native"
but can we use RPROVIDES_${BPN}-dev = "libx11-dev" ?
Cheers,
Quoted 45 lines
---
Koen/Saul: This is how I think we should be fixing the libx11 issues...
meta/recipes-graphics/xorg-lib/libx11-diet_1.4.4.bb +1
-0@@ -14,6 +14,7 @@ SRC_URI += "file://x11_disable_makekeys.patch \ file://fix-utf8-wrong-define.patch \ " +RPROVIDES_${PN}-dev = "libx11-dev" SRC_URI[md5sum] = "ed7c382cbf8c13425b6a66bcac0ca5d9" SRC_URI[sha256sum] = "7fe62180f08ef5f0a0062fb444591e349cae2ab5af6ad834599f5c654e6c840d"meta/recipes-graphics/xorg-lib/libx11-trim_1.4.4.bb +2
-1@@ -5,7 +5,7 @@ DESCRIPTION += " Support for XCMS is disabled in this version." LICENSE = "MIT & MIT-style & BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7" -PR = "r0" +PR = "r1" DEPENDS += "libxcb xproto xextproto xtrans libxau kbproto inputproto xf86bigfontproto xproto-native"@@ -13,6 +13,7 @@ SRC_URI += "file://x11_disable_makekeys.patch \ file://keysymdef_include.patch \ file://makekeys_crosscompile.patch" +RPROVIDES_${PN}-dev = "libx11-dev" SRC_URI[md5sum] = "ed7c382cbf8c13425b6a66bcac0ca5d9" SRC_URI[sha256sum] = "7fe62180f08ef5f0a0062fb444591e349cae2ab5af6ad834599f5c654e6c840d"_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH] libx11-trim/diet: Add RPROVIDES for libx11-dev
In reply to Richard PurdieOp 1 mrt. 2012, om 12:55 heeft Richard Purdie het volgende geschreven:
Quoted 8 lines
We have things that depend on libx11-dev, this patch ensures the -trim and -diet versions provide it. This resolves some multiple providers warnings.
Signed-off-by Richard Purdie <[email protected]>---
Koen/Saul: This is how I think we should be fixing the libx11 issues...
I'm going to say something shockingly out of character: I think the trim/diet/normal seperation should be done with DISTRO_FEATURES + PACKAGECONFIG. Due to shlib naming the 3 recipes cannot coexist in the feeds anyway.
regards,
Koen
Re: [PATCH] libx11-trim/diet: Add RPROVIDES for libx11-dev
Quoted 9 lines · Koen Kooi
Op 1 mrt. 2012, om 12:55 heeft Richard Purdie het volgende geschreven:
Quoted 7 lines
We have things that depend on libx11-dev, this patch ensures the -trim and -diet versions provide it. This resolves some multiple providers warnings.
Signed-off-by Richard Purdie <[email protected]>---
Quoted 6 lines
Quoted 1 line
Koen/Saul: This is how I think we should be fixing the libx11 issues...
I'm going to say something shockingly out of character: I think the trim/diet/normal seperation should be done with
DISTRO_FEATURES+ PACKAGECONFIG. Due to shlib naming the 3 recipes cannot coexist in the feeds anyway.
I agree although in this case, PACKAGECONFIG should be enough.
I propose we fix the immediate problem as per the patch and then look at converting to PACKAGECONFIG.
Cheers,
Richard
Re: [PATCH] libx11-trim/diet: Add RPROVIDES for libx11-dev
Op 1 mrt. 2012, om 13:50 heeft Richard Purdie het volgende geschreven:
Quoted 17 lines · Koen Kooi
Quoted 9 lines
Op 1 mrt. 2012, om 12:55 heeft Richard Purdie het volgende geschreven:
Quoted 7 lines
We have things that depend on libx11-dev, this patch ensures the -trim and -diet versions provide it. This resolves some multiple providers warnings.
Signed-off-by Richard Purdie <[email protected]>---
Quoted 6 lines
Quoted 1 line
Koen/Saul: This is how I think we should be fixing the libx11 issues...
I'm going to say something shockingly out of character: I think the trim/diet/normal seperation should be done with
DISTRO_FEATURES+ PACKAGECONFIG. Due to shlib naming the 3 recipes cannot coexist in the feeds anyway.
Quoted 4 lines
I agree although in this case, PACKAGECONFIG should be enough.
I propose we fix the immediate problem as per the patch and then look at converting to PACKAGECONFIG.
Agreed.
regards,
Koen
PATCH 2/4 image-live: Allow LABELS to be modified
In reply to Saul WoldThis is to allow other image types to set the syslinux labels
--- meta/classes/image-live.bbclass | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
meta/classes/image-live.bbclass +3 -2
@@ -3,8 +3,9 @@ AUTO_SYSLINUXCFG = "1" INITRD_IMAGE ?= "core-image-minimal-initramfs" INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz" SYSLINUX_ROOT = "root=/dev/ram0 " -SYSLINUX_TIMEOUT = "10" -LABELS += "boot install" +SYSLINUX_TIMEOUT ?= "10" +SYSLINUX_LABELS ?= "boot install" +LABELS_append = " ${SYSLINUX_LABELS} " ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
Signature · 1 line
1.7.7.6
PATCH 3/4 image-vmdk: Create image_vmdk class and setup image and image_types to use it
In reply to Saul WoldThis creates a new image_vmdk class similar to live. The image_vmdk class needs to have a hddimg created by the image-live class, so it inherits it directly.
The changes to image_types is to ensure that both live and vmdk images get the ext3 tools and dependencies.
--- meta/classes/image-vmdk.bbclass | 22 ++++++++++++++++++++++ meta/classes/image.bbclass | 6 ++++-- meta/classes/image_types.bbclass | 15 +++++++++------ 3 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 meta/classes/image-vmdk.bbclass
meta/classes/image-vmdk.bbclass new file +22 -0
@@ -0,0 +1,22 @@ + +SYSLINUX_PROMPT = "0" +SYSLINUX_TIMEOUT = "1" +SYSLINUX_LABELS = "boot" + +# creating VMDK relies on having a live hddimg so ensure we +# inherit it here. +inherit image-live + +create_vmdk_image () { + qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk +} + +python do_vmdkimg() { + bb.build.exec_func('create_vmdk_image', d) +} + +addtask vmdkimg after do_bootimg before do_build +do_vmdkimg[nostamp] = "1" + +do_vmdkimg[depends] += "qemu-native:do_populate_sysroot" +
meta/classes/image.bbclass +4 -2
@@ -70,8 +70,10 @@ 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} +IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}' +inherit image-${IMAGE_TYPE_live} +IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "vmdk", "empty", d)}' +inherit image-${IMAGE_TYPE_vmdk} python () { deps = d.getVarFlag('do_rootfs', 'depends') or ""
meta/classes/image_types.bbclass +9 -6
@@ -18,9 +18,13 @@ def get_imagecmds(d): cimages[basetype].append(ctype) break - # Live images will be processed via inheriting bbclass and - # does not get processed here. - # live images also depend on ext3 so ensure its present + # Live and VMDK images will be processed via inheriting + # bbclass and does not get processed here. + # vmdk depend on live images also depend on ext3 so ensure its present + if "vmdk" in types: + if "ext3" not in types: + types.append("ext3") + types.remove("vmdk") if "live" in types: if "ext3" not in types: types.append("ext3")
@@ -75,6 +79,8 @@ 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": + type = "ext3" basetype = type for ctype in ctypes: if type.endswith("." + ctype):
@@ -160,8 +166,6 @@ IMAGE_CMD_ubi () { } IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}" -IMAGE_CMD_vmdk = "qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk" - EXTRA_IMAGECMD = "" EXTRA_IMAGECMD_jffs2 ?= "--pad --little-endian --eraseblock=0x40000" # Change these if you want default genext2fs behavior (i.e. create minimal inode number)
@@ -181,7 +185,6 @@ IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" IMAGE_DEPENDS_ubi = "mtd-utils-native" IMAGE_DEPENDS_ubifs = "mtd-utils-native" -IMAGE_DEPENDS_vmdk = "qemu-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-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk"
Signature · 1 line
1.7.7.6
PATCH 4/4 self-hosted-image: Create a VMDK image with correct SYSLINUX_* settings
In reply to Saul Wold--- meta/recipes-core/images/self-hosted-image.bb | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
meta/recipes-core/images/self-hosted-image.bb +14 -2
@@ -1,11 +1,23 @@ IMAGE_INSTALL = "task-core-boot task-core-apps-console task-core-ssh-openssh task-self-hosted" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +PR = "r5" + CORE_IMAGE_EXTRA_INSTALL = "\ task-self-hosted \ " IMAGE_FEATURES += "x11-mini package-management" -inherit core-image +# Ensure there's enough space to do a core-image-minimal build, with rm_work enabled +IMAGE_ROOTFS_EXTRA_SPACE = "2621440" -PR = "r2" +# Do a quiet boot with limited console messages +APPEND += "quiet" + +IMAGE_FSTYPES = "vmdk" + +inherit core-image
Signature · 1 line
1.7.7.6
Re: [PATCH 4/4] self-hosted-image: Create a VMDK image with correct SYSLINUX_* settings
Op 1 mrt. 2012, om 08:46 heeft Saul Wold het volgende geschreven:
Quoted 12 lines
Signed-off-by Saul Wold <[email protected]>---
meta/recipes-core/images/self-hosted-image.bb | 16 ++++++++++++++--1 files changed, 14 insertions(+), 2 deletions(-)meta/recipes-core/images/self-hosted-image.bb +0
-0@@ -1,11 +1,23 @@
IMAGE_INSTALL= "task-core-boot task-core-apps-console task-core-ssh-openssh task-self-hosted"
meta/recipes-core/images/self-hosted-image.bb line 7
Quoted 5 lines
meta/recipes-core/images/self-hosted-image.bb +5
-0+LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +PR = "r5"
AFAICT PR in images does nothing, since they are nostamp.
regards,
Koen
Re: [PATCH 4/4] self-hosted-image: Create a VMDK image with correct SYSLINUX_* settings
Quoted 14 lines · Koen Kooi
Op 1 mrt. 2012, om 08:46 heeft Saul Wold het volgende geschreven:
Quoted 12 lines
Signed-off-by Saul Wold <[email protected]>---
meta/recipes-core/images/self-hosted-image.bb | 16 ++++++++++++++--1 files changed, 14 insertions(+), 2 deletions(-)meta/recipes-core/images/self-hosted-image.bb +0
-0@@ -1,11 +1,23 @@
IMAGE_INSTALL= "task-core-boot task-core-apps-console task-core-ssh-openssh task-self-hosted"
Quoted 7 lines
meta/recipes-core/images/self-hosted-image.bb line 7
Quoted 5 lines
meta/recipes-core/images/self-hosted-image.bb +5
-0+LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +PR = "r5"AFAICT PR in images does nothing
PR doesn't do anything
Quoted 1 line
, since they are nostamp.
although with BasicHash, we could change that :)
Cheers,
Richard