enhance boot-directdisk.bbclass to generate .vmdk image
v2 cover enhance boot-directdisk.bbclass to generate .vmdk image
Please review the following changes for suitability for inclusion. If you have any objections or suggestions for improvement, please respond to the patches. If you agree with the changes, please provide your Acked-by.
The following changes since commit 468998cddbe1a803096c9b357e1b5daa3b7e8c2e:
command.py: add parseConfigurationFiles API (2012-01-06 16:01:44 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dcui/self-hosted-v7
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/self-hosted-v7
Dexuan Cui (1):
self-hosted-image: generate the .hdddirect and .vmdk image files
meta/classes/boot-directdisk.bbclass | 8 ++++++++ meta/conf/machine/include/qemu.inc | 2 ++ meta/recipes-core/images/self-hosted-image.bb | 11 +++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.6
RFC PATCH v2 1/1 self-hosted-image: generate the .hdddirect and .vmdk image files
The self-hosted-image work needs a live-bootable and r/w-able image format. The existing .iso isn't ok since it's readonly.
The existing .hddimg is not a good choice, since it has a two-option(boot, install) syslinux function that we don't need: we don't hope a user to be potentially able to "install", and I think it may be not suitble to hack build_hddimg to hide the "install"? Moreever, .hddimg is not that compatibible with some devices and we hope to have the most compatibility.
So I think the .hdddirect format is a good choice and I made this patch to adopt it and also enhanced boot-directdisk.bbclass to generate .vmdk image so we can run it on vmware, too.
BTW, currently self-hosted-image is the only user of boot-directdisk.bbclass; with the adoption of .hdddirect and .vmdk formats, a user can still use "IMAGE_FSTYPES += 'live'" to generate the .iso and .hddimg format.
--- meta/classes/boot-directdisk.bbclass | 8 ++++++++ meta/conf/machine/include/qemu.inc | 2 ++ meta/recipes-core/images/self-hosted-image.bb | 11 +++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-)
meta/classes/boot-directdisk.bbclass +8 -0
@@ -24,6 +24,7 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \ syslinux-native:do_populate_sysroot \ parted-native:do_populate_sysroot \ mtools-native:do_populate_sysroot " +do_bootdirectdisk[depends] += "qemu-native:do_populate_sysroot" PACKAGES = " " EXCLUDE_FROM_WORLD = "1"
@@ -50,6 +51,7 @@ build_boot_dd() { install -d ${HDDDIR} install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage ${HDDDIR}/vmlinuz + install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
@@ -83,6 +85,12 @@ build_boot_dd() { cd ${DEPLOY_DIR_IMAGE} rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ln -s ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect + + if [ "${NOVMDK}" != "1" ] ; then + ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk + fi } python do_bootdirectdisk() {
meta/conf/machine/include/qemu.inc +2 -0
@@ -5,6 +5,8 @@ MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" IMAGE_FSTYPES ?= "tar.bz2 ext3" +APPEND_${MACHINE} = "root=/dev/hda2" + ROOT_FLASH_SIZE = "280" # Don't include kernels in standard images
meta/recipes-core/images/self-hosted-image.bb +9 -2
@@ -6,6 +6,13 @@ POKY_EXTRA_INSTALL = "\ IMAGE_FEATURES += "x11-mini" -inherit core-image +# Needed by boot-directdisk +ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3" -PR = "r2" +inherit core-image boot-directdisk + +do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs" +do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs" +do_bootdirectdisk[depends] += "${PN}:do_rootfs" + +PR = "r3"
Signature · 1 line
1.7.6
Re: [RFC PATCH 1/1][v2] self-hosted-image: generate the .hdddirect and .vmdk image files
Quoted 8 lines · Dexuan Cui
The self-hosted-image work needs a live-bootable and r/w-able image format. The existing .iso isn't ok since it's readonly.
The existing .hddimg is not a good choice, since it has a two-option(boot, install) syslinux function that we don't need: we don't hope a user to be potentially able to "install", and I think it may be not suitble to hackbuild_hddimgto hide the "install"? Moreever, .hddimg is not that compatibible with some devices and we hope to have the most compatibility.
Please use a spell checker here
suitable
Moreover
compatible
Quoted 35 lines
So I think the .hdddirect format is a good choice and I made this patch to adopt it and also enhanced boot-directdisk.bbclass to generate .vmdk image so we can run it on vmware, too.
BTW, currently self-hosted-image is the only user of boot-directdisk.bbclass; with the adoption of .hdddirect and .vmdk formats, a user can still use "IMAGE_FSTYPES+= 'live'" to generate the .iso and .hddimg format.Signed-off-by Dexuan Cui<[email protected]>--- meta/classes/boot-directdisk.bbclass | 8 ++++++++ meta/conf/machine/include/qemu.inc | 2 ++ meta/recipes-core/images/self-hosted-image.bb | 11 +++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-)meta/classes/boot-directdisk.bbclass +2
-0@@ -24,6 +24,7 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \ syslinux-native:do_populate_sysroot \ parted-native:do_populate_sysroot \ mtools-native:do_populate_sysroot " +do_bootdirectdisk[depends] += "qemu-native:do_populate_sysroot" PACKAGES = " " EXCLUDE_FROM_WORLD = "1"@@ -50,6 +51,7 @@ build_boot_dd() { install -d ${HDDDIR} install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage ${HDDDIR}/vmlinuz + install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
meta/classes/boot-directdisk.bbclass build_boot_dd() { · line 89
Quoted 5 lines
meta/classes/boot-directdisk.bbclass +2
-0@@ -83,6 +85,12 @@ build_boot_dd() { cd ${DEPLOY_DIR_IMAGE} rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ln -s ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect + + if [ "${NOVMDK}" != "1" ] ; then
Why make this a "double negative", Why not have a CREATE_VMDK check?
Quoted 12 lines
meta/classes/boot-directdisk.bbclass +4
-0+ ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk + fi } python do_bootdirectdisk() {meta/conf/machine/include/qemu.inc +0
-0
meta/conf/machine/include/qemu.inc MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" · line 9
Quoted 5 lines
meta/conf/machine/include/qemu.inc +2
-0@@ -5,6 +5,8 @@ MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" IMAGE_FSTYPES ?= "tar.bz2 ext3" +APPEND_${MACHINE} = "root=/dev/hda2" +
I thought this was to become ?=
Quoted 23 lines
meta/conf/machine/include/qemu.inc +0
-0ROOT_FLASH_SIZE = "280" # Don't include kernels in standard imagesmeta/recipes-core/images/self-hosted-image.bb +9
-2@@ -6,6 +6,13 @@ POKY_EXTRA_INSTALL = "\ IMAGE_FEATURES += "x11-mini" -inherit core-image +# Needed by boot-directdisk +ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3" -PR = "r2" +inherit core-image boot-directdisk + +do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs" +do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs" +do_bootdirectdisk[depends] += "${PN}:do_rootfs" + +PR = "r3"
Re: [RFC PATCH 1/1][v2] self-hosted-image: generate the .hdddirect and .vmdk image files
Saul Wold wrote on 2012-01-19:
Quoted 10 lines · Dexuan Cui
Quoted 9 lines
The self-hosted-image work needs a live-bootable and r/w-able image format. The existing .iso isn't ok since it's readonly. The existing .hddimg is not a good choice, since it has a two-option(boot, install) syslinux function that we don't need: we don't hope a user to be potentially able to "install", and I think it may be not suitble to hack
build_hddimgto hide the "install"? Moreever, .hddimg is not that compatibible with some devices and we hope to have the most compatibility.
Quoted 4 lines
Please use a spell checker here
suitable
Moreover
compatible
I'm very sorry about this... I'll be more careful in future. :-)
Quoted 59 lines
Quoted 42 lines
So I think the .hdddirect format is a good choice and I made this patch to adopt it and also enhanced boot-directdisk.bbclass to generate .vmdk image so we can run it on vmware, too. BTW, currently self-hosted-image is the only user of boot-directdisk.bbclass; with the adoption of .hdddirect and .vmdk formats, a user can still use "
IMAGE_FSTYPES+= 'live'" to generate the .iso and .hddimg format.Signed-off-by Dexuan Cui<[email protected]>--- meta/classes/boot-directdisk.bbclass | 8 ++++++++ meta/conf/machine/include/qemu.inc | 2 ++ meta/recipes-core/images/self-hosted-image.bb | 11 +++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/meta/classes/boot-directdisk.bbclass index 8879ba8..7f14225 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass @@ -24,6 +24,7 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
parted-native:do_populate_sysroot \
mtools-native:do_populate_sysroot " +do_bootdirectdisk[depends] += "qemu-native:do_populate_sysroot"
PACKAGES = " "
EXCLUDE_FROM_WORLD= "1"meta/classes/boot-directdisk.bbclass +0
-0@@ -50,6 +51,7 @@ build_boot_dd() { install -d ${HDDDIR} install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage${HDDDIR}/vmlinuz
(quoted diff) +1
-0+ install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys${HDDDIR}/ldlinux.sys
BLOCKS=
du -bks ${HDDDIR} | cut -f 1@@ -83,6 +85,12 @@
build_boot_dd(){ cd ${DEPLOY_DIR_IMAGE} rm -f
${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ln -s
${IMAGE_NAME}.hdddirect
${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirectmeta/classes/boot-directdisk.bbclass build_boot_dd() { · line 89
Quoted 2 lines
meta/classes/boot-directdisk.bbclass +2
-0+ + if [ "${NOVMDK}" != "1" ] ; thenWhy make this a "double negative", Why not have a
CREATE_VMDKcheck?Quoted 13 lines
meta/classes/boot-directdisk.bbclass +4
-0+ ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk + fi } python do_bootdirectdisk() {(quoted diff) +0
-0b/meta/conf/machine/include/qemu.inc index 3cebfab..a5b563b 100644 --- a/meta/conf/machine/include/qemu.inc +++ b/meta/conf/machine/include/qemu.inc @@ -5,6 +5,8 @@
MACHINE_FEATURES= "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen"
Quoted 4 lines
meta/conf/machine/include/qemu.inc MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" · line 9
Quoted 3 lines
IMAGE_FSTYPES?= "tar.bz2 ext3"meta/conf/machine/include/qemu.inc +2
-0+APPEND_${MACHINE} = "root=/dev/hda2" +I thought this was to become ?=
There is some side effort with ?=.
Darren expressed his concern in a later mail. I have to think more about this.
Quoted 14 lines
Quoted 14 lines
ROOT_FLASH_SIZE= "280"# Don't include kernels in standard images diff --git
a/meta/recipes-core/images/self-hosted-image.bb b/meta/recipes-core/images/self-hosted-image.bb index 111c057..df6c81f 100644meta/recipes-core/images/self-hosted-image.bb +0
-1@@ -6,6 +6,13 @@ POKY_EXTRA_INSTALL = "\ IMAGE_FEATURES += "x11-mini" -inherit core-image +# Needed by boot-directdisk +ROOTFS ?="${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
Quoted 8 lines
meta/recipes-core/images/self-hosted-image.bb POKY_EXTRA_INSTALL = "\ · line 18
Quoted 8 lines
meta/recipes-core/images/self-hosted-image.bb +7
-1-PR = "r2" +inherit core-image boot-directdisk + +do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs" +do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs" +do_bootdirectdisk[depends] += "${PN}:do_rootfs" + +PR = "r3"
Thanks,
-- Dexuan
Re: [RFC PATCH 1/1][v2] self-hosted-image: generate the .hdddirect and .vmdk image files
In reply to Saul WoldSaul Wold wrote on 2012-01-19:
Quoted 8 lines
meta/classes/boot-directdisk.bbclass build_boot_dd() { · line 89
Quoted 1 line
meta/classes/boot-directdisk.bbclass +1
-0+ if [ "${NOVMDK}" != "1" ] ; thenWhy make this a "double negative", Why not have a
CREATE_VMDKcheck?meta/classes/boot-directdisk.bbclass build_boot_dd() { · line 94
Quoted 5 lines
meta/classes/boot-directdisk.bbclass +4
-0+ ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk + fi }
Hi Saul,
I thought it's better to create .vmdk by default.
So do you think this is better?
if [ "${CREATE_VMDK}" == "1" ] ; then
#create the .vmdk image.
fi
In this way we don't create .vmdk by default and I'll define CREATE_VMDK = "1"
in self-hosted-image.bb to generate the .vmdk.
Thanks,
-- Dexuan
Re: [RFC PATCH 1/1][v2] self-hosted-image: generate the .hdddirect and .vmdk image files
In reply to Dexuan CuiQuoted 6 lines · Dexuan Cui
The self-hosted-image work needs a live-bootable and r/w-able image format. The existing .iso isn't ok since it's readonly.
The existing .hddimg is not a good choice, since it has a two-option(boot, install) syslinux function that we don't need: we don't hope a user to be potentially able to "install", and I think it may be not suitble to hackbuild_hddimgto hide the "install"?
bootimg.bbclass should probably be renamed liveimg.bbclass to keep it's meaning clear.
Quoted 22 lines
Moreever, .hddimg is not that
compatibible with some devices and we hope to have the most compatibility.So I think the .hdddirect format is a good choice and I made this patch to adopt it and also enhanced boot-directdisk.bbclass to generate .vmdk image so we can run it on vmware, too.
BTW, currently self-hosted-image is the only user of boot-directdisk.bbclass; with the adoption of .hdddirect and .vmdk formats, a user can still use "IMAGE_FSTYPES+= 'live'" to generate the .iso and .hddimg format.Signed-off-by Dexuan Cui <[email protected]>--- meta/classes/boot-directdisk.bbclass | 8 ++++++++ meta/conf/machine/include/qemu.inc | 2 ++ meta/recipes-core/images/self-hosted-image.bb | 11 +++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-)meta/classes/boot-directdisk.bbclass +0
-0
meta/classes/boot-directdisk.bbclass do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \ · line 27
Quoted 4 lines
meta/classes/boot-directdisk.bbclass +1
-0@@ -24,6 +24,7 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \ syslinux-native:do_populate_sysroot \ parted-native:do_populate_sysroot \ mtools-native:do_populate_sysroot " +do_bootdirectdisk[depends] += "qemu-native:do_populate_sysroot"
As a point of style, just add the new dependencies to the preceding assignment rather than creating a new assignment.
Quoted 29 lines
meta/classes/boot-directdisk.bbclass +7
-0PACKAGES = " " EXCLUDE_FROM_WORLD = "1"@@ -50,6 +51,7 @@ build_boot_dd() { install -d ${HDDDIR} install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage ${HDDDIR}/vmlinuz + install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys BLOCKS=`du -bks ${HDDDIR} | cut -f 1`@@ -83,6 +85,12 @@ build_boot_dd() { cd ${DEPLOY_DIR_IMAGE} rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ln -s ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect + + if [ "${NOVMDK}" != "1" ] ; then + ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk + fi } python do_bootdirectdisk() {meta/conf/machine/include/qemu.inc +0
-0
meta/conf/machine/include/qemu.inc MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" · line 9
Quoted 5 lines
meta/conf/machine/include/qemu.inc +2
-0@@ -5,6 +5,8 @@ MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" IMAGE_FSTYPES ?= "tar.bz2 ext3" +APPEND_${MACHINE} = "root=/dev/hda2" +
This concerns me. How does this interact with other recipes and configs that may set this? What happens if the machine config adds a console parameter to the APPEND? For example, the meta-intel n450 does the following:
APPEND += "console=ttyS0,115200 console=tty0"
If I understand correctly, your assignment above will override this.
Quoted 23 lines
meta/conf/machine/include/qemu.inc +0
-0ROOT_FLASH_SIZE = "280" # Don't include kernels in standard imagesmeta/recipes-core/images/self-hosted-image.bb +9
-2@@ -6,6 +6,13 @@ POKY_EXTRA_INSTALL = "\ IMAGE_FEATURES += "x11-mini" -inherit core-image +# Needed by boot-directdisk +ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3" -PR = "r2" +inherit core-image boot-directdisk + +do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs" +do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs" +do_bootdirectdisk[depends] += "${PN}:do_rootfs" + +PR = "r3"
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Re: [RFC PATCH 1/1][v2] self-hosted-image: generate the .hdddirect and .vmdk image files
Darren Hart wrote on 2012-01-19:
Quoted 10 lines · Dexuan Cui
Quoted 6 lines
The self-hosted-image work needs a live-bootable and r/w-able image format. The existing .iso isn't ok since it's readonly. The existing .hddimg is not a good choice, since it has a two-option(boot, install) syslinux function that we don't need: we don't hope a user to be potentially able to "install", and I think it may be not suitble to hack
build_hddimgto hide the "install"?bootimg.bbclass should probably be renamed liveimg.bbclass to keep it's meaning clear.
Good suggestion.
Quoted 24 lines
Quoted 24 lines
Moreever, .hddimg is not that compatibible with some devices and we hope to have the most compatibility.
So I think the .hdddirect format is a good choice and I made this patch to adopt it and also enhanced boot-directdisk.bbclass to generate .vmdk image so we can run it on vmware, too. BTW, currently self-hosted-image is the only user of boot-directdisk.bbclass; with the adoption of .hdddirect and .vmdk formats, a user can still use "
IMAGE_FSTYPES+= 'live'" to generate the .iso and .hddimg format.Signed-off-by Dexuan Cui <[email protected]>--- meta/classes/boot-directdisk.bbclass | 8 ++++++++ meta/conf/machine/include/qemu.inc | 2 ++ meta/recipes-core/images/self-hosted-image.bb | 11 +++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/meta/classes/boot-directdisk.bbclass index 8879ba8..7f14225 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass @@ -24,6 +24,7 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
Quoted 7 lines
Quoted 4 lines
parted-native:do_populate_sysroot \
mtools-native:do_populate_sysroot " +do_bootdirectdisk[depends] += "qemu-native:do_populate_sysroot"
As a point of style, just add the new dependencies to the preceding assignment rather than creating a new assignment.
Ok, I'll add the new dependency into the existing do_bootdirectdisk[depends] rather than creating a new += line.
Quoted 41 lines
meta/classes/boot-directdisk.bbclass build_boot_dd() { · line 53
Quoted 7 lines
PACKAGES = " "
EXCLUDE_FROM_WORLD= "1"meta/classes/boot-directdisk.bbclass +0
-0@@ -50,6 +51,7 @@ build_boot_dd() { install -d ${HDDDIR} install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage${HDDDIR}/vmlinuz
Quoted 25 lines
(quoted diff) +1
-0+ install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys${HDDDIR}/ldlinux.sys
BLOCKS=
du -bks ${HDDDIR} | cut -f 1@@ -83,6 +85,12 @@
build_boot_dd(){ cd ${DEPLOY_DIR_IMAGE} rm -f
${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ln -s
${IMAGE_NAME}.hdddirect
${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirectmeta/classes/boot-directdisk.bbclass +6
-0+ + if [ "${NOVMDK}" != "1" ] ; then + ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk + fi } python do_bootdirectdisk() {(quoted diff) +0
-0b/meta/conf/machine/include/qemu.inc index 3cebfab..a5b563b 100644 --- a/meta/conf/machine/include/qemu.inc +++ b/meta/conf/machine/include/qemu.inc @@ -5,6 +5,8 @@
MACHINE_FEATURES= "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen"
IMAGE_FSTYPES?= "tar.bz2 ext3"meta/conf/machine/include/qemu.inc MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" · line 9
Quoted 2 lines
meta/conf/machine/include/qemu.inc +2
-0+APPEND_${MACHINE} = "root=/dev/hda2" +This concerns me. How does this interact with other recipes and configs that may set this? What happens if the machine config adds a console parameter to the APPEND? For example, the meta-intel n450 does the following:
Quoted 3 lines
APPEND += "console=ttyS0,115200 console=tty0"
If I understand correctly, your assignment above will override this.
My change (the below line) is only in qemu.inc
+ APPEND_${MACHINE} = "root=/dev/hda2"
So n450 is not affected here.
However, I do need to think more about the interact with others, e.g., in the case of n450, the APPEND in boot-directdisk.bbclass actually overrides the value assigned in atom-pc.conf -- this is an existing issue. I think nobody tested this before, so we didn't notice this.
I'll try to work out a new version.
Quoted 15 lines
Quoted 15 lines
ROOT_FLASH_SIZE= "280"# Don't include kernels in standard images diff --git
a/meta/recipes-core/images/self-hosted-image.bb b/meta/recipes-core/images/self-hosted-image.bb index 111c057..df6c81f 100644meta/recipes-core/images/self-hosted-image.bb +0
-1@@ -6,6 +6,13 @@ POKY_EXTRA_INSTALL = "\ IMAGE_FEATURES += "x11-mini" -inherit core-image +# Needed by boot-directdisk +ROOTFS ?="${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
Quoted 9 lines
meta/recipes-core/images/self-hosted-image.bb POKY_EXTRA_INSTALL = "\ · line 18
Quoted 8 lines
meta/recipes-core/images/self-hosted-image.bb +7
-1-PR = "r2" +inherit core-image boot-directdisk + +do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs" +do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs" +do_bootdirectdisk[depends] += "${PN}:do_rootfs" + +PR = "r3"
Thanks,
-- Dexuan
Re: [RFC PATCH 1/1][v2] self-hosted-image: generate the .hdddirect and .vmdk image files
Dexuan,
Will you an updated patch for this sometime soon?
Thanks
Sau!
Quoted 136 lines · Dexuan
Darren Hart wrote on 2012-01-19:
Quoted 10 lines · Dexuan Cui
Quoted 6 lines
The self-hosted-image work needs a live-bootable and r/w-able image format. The existing .iso isn't ok since it's readonly. The existing .hddimg is not a good choice, since it has a two-option(boot, install) syslinux function that we don't need: we don't hope a user to be potentially able to "install", and I think it may be not suitble to hack
build_hddimgto hide the "install"?bootimg.bbclass should probably be renamed liveimg.bbclass to keep it's meaning clear.
Good suggestion.
Quoted 24 lines
Quoted 24 lines
Moreever, .hddimg is not that compatibible with some devices and we hope to have the most compatibility.
So I think the .hdddirect format is a good choice and I made this patch to adopt it and also enhanced boot-directdisk.bbclass to generate .vmdk image so we can run it on vmware, too. BTW, currently self-hosted-image is the only user of boot-directdisk.bbclass; with the adoption of .hdddirect and .vmdk formats, a user can still use "
IMAGE_FSTYPES+= 'live'" to generate the .iso and .hddimg format.Signed-off-by Dexuan Cui<[email protected]>--- meta/classes/boot-directdisk.bbclass | 8 ++++++++ meta/conf/machine/include/qemu.inc | 2 ++ meta/recipes-core/images/self-hosted-image.bb | 11 +++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/meta/classes/boot-directdisk.bbclass index 8879ba8..7f14225 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass @@ -24,6 +24,7 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
Quoted 7 lines
Quoted 4 lines
parted-native:do_populate_sysroot \
mtools-native:do_populate_sysroot " +do_bootdirectdisk[depends] += "qemu-native:do_populate_sysroot"
As a point of style, just add the new dependencies to the preceding assignment rather than creating a new assignment.
Ok, I'll add the new dependency into the existing do_bootdirectdisk[depends] rather than creating a new += line.
Quoted 41 lines
meta/classes/boot-directdisk.bbclass build_boot_dd() { · line 53
Quoted 7 lines
PACKAGES = " "
EXCLUDE_FROM_WORLD= "1"meta/classes/boot-directdisk.bbclass +0
-0@@ -50,6 +51,7 @@ build_boot_dd() { install -d ${HDDDIR} install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage${HDDDIR}/vmlinuz
Quoted 25 lines
(quoted diff) +1
-0+ install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys${HDDDIR}/ldlinux.sys
BLOCKS=
du -bks ${HDDDIR} | cut -f 1@@ -83,6 +85,12 @@
build_boot_dd(){ cd ${DEPLOY_DIR_IMAGE} rm -f
${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ln -s
${IMAGE_NAME}.hdddirect
${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirectmeta/classes/boot-directdisk.bbclass +6
-0+ + if [ "${NOVMDK}" != "1" ] ; then + ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk + fi } python do_bootdirectdisk() {(quoted diff) +0
-0b/meta/conf/machine/include/qemu.inc index 3cebfab..a5b563b 100644 --- a/meta/conf/machine/include/qemu.inc +++ b/meta/conf/machine/include/qemu.inc @@ -5,6 +5,8 @@
MACHINE_FEATURES= "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen"
IMAGE_FSTYPES?= "tar.bz2 ext3"meta/conf/machine/include/qemu.inc MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" · line 9
Quoted 2 lines
meta/conf/machine/include/qemu.inc +2
-0+APPEND_${MACHINE} = "root=/dev/hda2" +This concerns me. How does this interact with other recipes and configs that may set this? What happens if the machine config adds a console parameter to the APPEND? For example, the meta-intel n450 does the following:
Quoted 3 lines
APPEND += "console=ttyS0,115200 console=tty0"
If I understand correctly, your assignment above will override this.
My change (the below line) is only in qemu.inc
+ APPEND_${MACHINE} = "root=/dev/hda2"
So n450 is not affected here.
However, I do need to think more about the interact with others, e.g., in the case of n450, the APPEND in boot-directdisk.bbclass actually overrides the value assigned in atom-pc.conf -- this is an existing issue. I think nobody tested this before, so we didn't notice this.I'll try to work out a new version.
Quoted 15 lines
Quoted 15 lines
ROOT_FLASH_SIZE= "280"# Don't include kernels in standard images diff --git
a/meta/recipes-core/images/self-hosted-image.bb b/meta/recipes-core/images/self-hosted-image.bb index 111c057..df6c81f 100644meta/recipes-core/images/self-hosted-image.bb +0
-1@@ -6,6 +6,13 @@ POKY_EXTRA_INSTALL = "\ IMAGE_FEATURES += "x11-mini" -inherit core-image +# Needed by boot-directdisk +ROOTFS ?="${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
Quoted 9 lines
meta/recipes-core/images/self-hosted-image.bb POKY_EXTRA_INSTALL = "\ · line 18
Quoted 8 lines
meta/recipes-core/images/self-hosted-image.bb +7
-1-PR = "r2" +inherit core-image boot-directdisk + +do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs" +do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs" +do_bootdirectdisk[depends] += "${PN}:do_rootfs" + +PR = "r3"Thanks,
-- Dexuan_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core