self-hosted-image: 2 new patches from Dexuan: Feb 17, 2012
cover self-hosted-image: 2 new patches from Dexuan: Feb 17, 2012
Hi Saul, Darren and all,
This is actually v3 of the old patches("self-hosted-image: generate the .hdddirect and .vmdk image files") I sent 1 month ago.
I'm sorry for sending this out so late, as I was pushed tightly on one other task... :-(
The new recipe self-hosted-directdisk-image.bb invokes self-hosted-image's do_rootfs automatically. That is, self-hosted-directdisk-image.bb is an enhanced version of self-hosted-image.bb.
If we only want to run the generated .ext3 image with "runqemu", we can run "bitbake self-hosted-image"; if we also want to generated a .vmdk image, we can run "bitbake self-hosted-directdisk-image".
Please comment. Thanks!
-------------
The following changes since commit 367f34f8bfb816bc396c89c95813246c16a76e1b:
linux-yocto: enable smp for qemux86 (2012-02-16 13:59:27 +0800)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dcui/self-hosted-v81
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/self-hosted-v81
Dexuan Cui (2):
syslinux.bbclass: make PROMPT settable self-hosted-directdisk-image: create .hdddirect and .vmdk images
meta/classes/boot-directdisk.bbclass | 4 +++- meta/classes/syslinux.bbclass | 11 ++++++----- meta/conf/machine/include/qemu.inc | 2 ++ .../images/self-hosted-directdisk-image.bb | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 meta/recipes-core/images/self-hosted-directdisk-image.bb
Signature · 1 line
1.7.6
PATCH 1/2 syslinux.bbclass: make PROMPT settable
--- meta/classes/syslinux.bbclass | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
meta/classes/syslinux.bbclass +6 -5
@@ -136,10 +136,6 @@ python build_syslinux_cfg () { except OSError: raise bb.build.funcFailed('Unable to open %s' % (cfile)) - # FIXME - the timeout should be settable - # And maybe the default too - # Definately the prompt - cfgfile.write('# Automatically created by OE\n') opts = d.getVar('SYSLINUX_OPTS', 1)
@@ -158,7 +154,12 @@ python build_syslinux_cfg () { else: cfgfile.write('TIMEOUT 50\n') - cfgfile.write('PROMPT 1\n') + prompt = d.getVar('SYSLINUX_PROMPT', 1) + + if prompt: + cfgfile.write('PROMPT %s\n' % prompt) + else: + cfgfile.write('PROMPT 1\n') menu = d.getVar('AUTO_SYSLINUXMENU', 1)
Signature · 1 line
1.7.6
PATCH 2/2 self-hosted-directdisk-image: create .hdddirect and .vmdk images
In reply to Dexuan Cui--- meta/classes/boot-directdisk.bbclass | 4 +++- meta/conf/machine/include/qemu.inc | 2 ++ .../images/self-hosted-directdisk-image.bb | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-core/images/self-hosted-directdisk-image.bb
meta/classes/boot-directdisk.bbclass +3 -1
@@ -38,7 +38,8 @@ BOOTDD_EXTRA_SPACE ?= "16384" AUTO_SYSLINUXCFG = "1" LABELS = "boot" -APPEND = "root=/dev/sda2" +SYSLINUX_ROOT ?= "root=/dev/sda2" +APPEND_prepend = "${SYSLINUX_ROOT}" TIMEOUT = "10" SYSLINUXCFG = "${HDDDIR}/syslinux.cfg" SYSLINUXMENU = "${HDDDIR}/menu"
@@ -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/conf/machine/include/qemu.inc +2 -0
@@ -5,6 +5,8 @@ MACHINE_FEATURES = "apm alsa pcmcia bluetooth irda usbgadget screen" IMAGE_FSTYPES ?= "tar.bz2 ext3" +SYSLINUX_ROOT = "root=/dev/hda2" + ROOT_FLASH_SIZE = "280" # Don't include kernels in standard images
meta/recipes-core/images/self-hosted-directdisk-image.bb new file +15 -0
@@ -0,0 +1,15 @@ +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +ROOTFS = "${DEPLOY_DIR_IMAGE}/self-hosted-image-${MACHINE}.ext3" +SYSLINUX_PROMPT = "0" +inherit boot-directdisk + +do_bootdirectdisk[depends] += "qemu-native:do_populate_sysroot \ + self-hosted-image:do_rootfs" +build_boot_dd_append () { + ${STAGING_BINDIR_NATIVE}/qemu-img convert -O vmdk \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect \ + ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk +}
Signature · 1 line
1.7.6