Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] self-hosted-image: 2 new patches from Dexuan: Feb 17, 2012
@ 2012-02-17 11:10 Dexuan Cui
  2012-02-17 11:10 ` [PATCH 1/2] syslinux.bbclass: make PROMPT settable Dexuan Cui
  2012-02-17 11:10 ` [PATCH 2/2] self-hosted-directdisk-image: create .hdddirect and .vmdk images Dexuan Cui
  0 siblings, 2 replies; 3+ messages in thread
From: Dexuan Cui @ 2012-02-17 11:10 UTC (permalink / raw)
  To: openembedded-core, sgw, dvhart

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

-- 
1.7.6




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] syslinux.bbclass: make PROMPT settable
  2012-02-17 11:10 [PATCH 0/2] self-hosted-image: 2 new patches from Dexuan: Feb 17, 2012 Dexuan Cui
@ 2012-02-17 11:10 ` Dexuan Cui
  2012-02-17 11:10 ` [PATCH 2/2] self-hosted-directdisk-image: create .hdddirect and .vmdk images Dexuan Cui
  1 sibling, 0 replies; 3+ messages in thread
From: Dexuan Cui @ 2012-02-17 11:10 UTC (permalink / raw)
  To: openembedded-core, sgw, dvhart

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 meta/classes/syslinux.bbclass |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 1569074..8225c80 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -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)
 
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] self-hosted-directdisk-image: create .hdddirect and .vmdk images
  2012-02-17 11:10 [PATCH 0/2] self-hosted-image: 2 new patches from Dexuan: Feb 17, 2012 Dexuan Cui
  2012-02-17 11:10 ` [PATCH 1/2] syslinux.bbclass: make PROMPT settable Dexuan Cui
@ 2012-02-17 11:10 ` Dexuan Cui
  1 sibling, 0 replies; 3+ messages in thread
From: Dexuan Cui @ 2012-02-17 11:10 UTC (permalink / raw)
  To: openembedded-core, sgw, dvhart

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 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

diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 8879ba8..d0daa82 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -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`
diff --git a/meta/conf/machine/include/qemu.inc b/meta/conf/machine/include/qemu.inc
index 10ab76e..4897491 100644
--- a/meta/conf/machine/include/qemu.inc
+++ b/meta/conf/machine/include/qemu.inc
@@ -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
diff --git a/meta/recipes-core/images/self-hosted-directdisk-image.bb b/meta/recipes-core/images/self-hosted-directdisk-image.bb
new file mode 100644
index 0000000..32cba3f
--- /dev/null
+++ b/meta/recipes-core/images/self-hosted-directdisk-image.bb
@@ -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
+}
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-17 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17 11:10 [PATCH 0/2] self-hosted-image: 2 new patches from Dexuan: Feb 17, 2012 Dexuan Cui
2012-02-17 11:10 ` [PATCH 1/2] syslinux.bbclass: make PROMPT settable Dexuan Cui
2012-02-17 11:10 ` [PATCH 2/2] self-hosted-directdisk-image: create .hdddirect and .vmdk images Dexuan Cui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox