[OE-core] [PATCH] boot-directdisk: add the support of vmdk
Zhu Yanjun
yanjun.zhu at windriver.com
Wed Dec 4 06:50:38 UTC 2013
---
meta/classes/boot-directdisk.bbclass | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 5535728..b2bd210 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -88,6 +88,15 @@ build_boot_dd() {
grubefi_hddimg_populate $HDDDIR
fi
+ if [ ${IMAGE_FSTYPE} = "vmdk" ]; then
+ if [ x${AUTO_SYSLINUXMENU} = x1 ] ; then
+ install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
+ if [ x${SYSLINUX_SPLASH} != x ] ; then
+ install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss
+ fi
+ fi
+ fi
+
BLOCKS=`du -bks $HDDDIR | cut -f 1`
BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
@@ -119,17 +128,22 @@ build_boot_dd() {
parted $IMAGE mkpart primary fat16 0 ${END1}B
parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
parted $IMAGE set 1 boot on
- parted $IMAGE print
+
+ if [ ${IMAGE_FSTYPE} != "vmdk" ]; then
+ parted $IMAGE print
+ fi
awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
dd of=$IMAGE bs=1 seek=440 conv=notrunc
OFFSET=`expr $END2 / 512`
- if [ "${PCBIOS}" = "1" ]; then
- dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
+ if [ ${IMAGE_FSTYPE} != "vmdk" ]; then
+ if [ "${PCBIOS}" = "1" ]; then
+ dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
+ fi
+ dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
fi
- dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
- dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
+ dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
cd ${DEPLOY_DIR_IMAGE}
rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
--
1.7.9.5
More information about the Openembedded-core
mailing list