diff options
Diffstat (limited to 'meta/classes/boot-directdisk.bbclass')
-rw-r--r-- | meta/classes/boot-directdisk.bbclass | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass index 32776669d7..42b341536a 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass | |||
@@ -61,6 +61,8 @@ DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}" | |||
61 | SYSLINUX_ROOT ?= "root=/dev/sda2" | 61 | SYSLINUX_ROOT ?= "root=/dev/sda2" |
62 | SYSLINUX_TIMEOUT ?= "10" | 62 | SYSLINUX_TIMEOUT ?= "10" |
63 | 63 | ||
64 | IS_VMDK = '${@base_contains("IMAGE_FSTYPES", "vmdk", "true", "false", d)}' | ||
65 | |||
64 | boot_direct_populate() { | 66 | boot_direct_populate() { |
65 | dest=$1 | 67 | dest=$1 |
66 | install -d $dest | 68 | install -d $dest |
@@ -88,10 +90,10 @@ build_boot_dd() { | |||
88 | grubefi_hddimg_populate $HDDDIR | 90 | grubefi_hddimg_populate $HDDDIR |
89 | fi | 91 | fi |
90 | 92 | ||
91 | if [ ${IMAGE_FSTYPE} = "vmdk" ]; then | 93 | if [ "${IS_VMDK}" = "true" ]; then |
92 | if [ x${AUTO_SYSLINUXMENU} = x1 ] ; then | 94 | if [ "x${AUTO_SYSLINUXMENU}" = "x1" ] ; then |
93 | install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32 | 95 | install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32 |
94 | if [ x${SYSLINUX_SPLASH} != x ] ; then | 96 | if [ "x${SYSLINUX_SPLASH}" != "x" ] ; then |
95 | install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss | 97 | install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss |
96 | fi | 98 | fi |
97 | fi | 99 | fi |
@@ -129,9 +131,7 @@ build_boot_dd() { | |||
129 | parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B | 131 | parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B |
130 | parted $IMAGE set 1 boot on | 132 | parted $IMAGE set 1 boot on |
131 | 133 | ||
132 | if [ ${IMAGE_FSTYPE} != "vmdk" ]; then | 134 | parted $IMAGE print |
133 | parted $IMAGE print | ||
134 | fi | ||
135 | 135 | ||
136 | 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')\" }" | \ |
137 | dd of=$IMAGE bs=1 seek=440 conv=notrunc | 137 | dd of=$IMAGE bs=1 seek=440 conv=notrunc |
@@ -141,10 +141,8 @@ build_boot_dd() { | |||
141 | dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc | 141 | dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc |
142 | fi | 142 | fi |
143 | 143 | ||
144 | if [ ${IMAGE_FSTYPE} != "vmdk" ]; then | 144 | dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512 |
145 | dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512 | 145 | dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 |
146 | dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 | ||
147 | fi | ||
148 | 146 | ||
149 | cd ${DEPLOY_DIR_IMAGE} | 147 | cd ${DEPLOY_DIR_IMAGE} |
150 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect | 148 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect |