summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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