summaryrefslogtreecommitdiffstats
path: root/meta/classes/boot-directdisk.bbclass
diff options
context:
space:
mode:
authoryanjun.zhu <yanjun.zhu@windriver.com>2013-11-19 16:48:31 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-09 18:01:43 +0000
commit22beb58bd8dd9247ba29b7ee243549734bc9d56c (patch)
tree8487fcedb9243665731f957a2f1eaa688c127258 /meta/classes/boot-directdisk.bbclass
parent80a9a79c4cb39b31b9f74410f3081e02b14f21cb (diff)
downloadpoky-22beb58bd8dd9247ba29b7ee243549734bc9d56c.tar.gz
boot-directdisk: add the support of vmdk
add the support of vmdk. (From OE-Core rev: 086ce22b88f5ef5f75a83119a32c8b3fdcfa296d) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/boot-directdisk.bbclass')
-rw-r--r--meta/classes/boot-directdisk.bbclass21
1 files changed, 18 insertions, 3 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 55357283ac..32776669d7 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -88,6 +88,15 @@ build_boot_dd() {
88 grubefi_hddimg_populate $HDDDIR 88 grubefi_hddimg_populate $HDDDIR
89 fi 89 fi
90 90
91 if [ ${IMAGE_FSTYPE} = "vmdk" ]; then
92 if [ x${AUTO_SYSLINUXMENU} = x1 ] ; then
93 install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
94 if [ x${SYSLINUX_SPLASH} != x ] ; then
95 install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss
96 fi
97 fi
98 fi
99
91 BLOCKS=`du -bks $HDDDIR | cut -f 1` 100 BLOCKS=`du -bks $HDDDIR | cut -f 1`
92 BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}` 101 BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
93 102
@@ -119,7 +128,10 @@ build_boot_dd() {
119 parted $IMAGE mkpart primary fat16 0 ${END1}B 128 parted $IMAGE mkpart primary fat16 0 ${END1}B
120 parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B 129 parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
121 parted $IMAGE set 1 boot on 130 parted $IMAGE set 1 boot on
122 parted $IMAGE print 131
132 if [ ${IMAGE_FSTYPE} != "vmdk" ]; then
133 parted $IMAGE print
134 fi
123 135
124 awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \ 136 awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
125 dd of=$IMAGE bs=1 seek=440 conv=notrunc 137 dd of=$IMAGE bs=1 seek=440 conv=notrunc
@@ -128,8 +140,11 @@ build_boot_dd() {
128 if [ "${PCBIOS}" = "1" ]; then 140 if [ "${PCBIOS}" = "1" ]; then
129 dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc 141 dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
130 fi 142 fi
131 dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512 143
132 dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 144 if [ ${IMAGE_FSTYPE} != "vmdk" ]; then
145 dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
146 dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
147 fi
133 148
134 cd ${DEPLOY_DIR_IMAGE} 149 cd ${DEPLOY_DIR_IMAGE}
135 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect 150 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect