diff options
Diffstat (limited to 'meta/classes/boot-directdisk.bbclass')
-rw-r--r-- | meta/classes/boot-directdisk.bbclass | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass index a3c9a876c1..31690432dd 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass | |||
@@ -28,9 +28,6 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \ | |||
28 | PACKAGES = " " | 28 | PACKAGES = " " |
29 | EXCLUDE_FROM_WORLD = "1" | 29 | EXCLUDE_FROM_WORLD = "1" |
30 | 30 | ||
31 | HDDDIR = "${S}/hdd/boot" | ||
32 | HDDIMG = "${S}/hdd.image" | ||
33 | |||
34 | BOOTDD_VOLUME_ID ?= "boot" | 31 | BOOTDD_VOLUME_ID ?= "boot" |
35 | BOOTDD_EXTRA_SPACE ?= "16384" | 32 | BOOTDD_EXTRA_SPACE ?= "16384" |
36 | 33 | ||
@@ -43,14 +40,16 @@ SYSLINUX_TIMEOUT ?= "10" | |||
43 | inherit syslinux | 40 | inherit syslinux |
44 | 41 | ||
45 | build_boot_dd() { | 42 | build_boot_dd() { |
43 | HDDDIR="${S}/hdd/boot" | ||
44 | HDDIMG="${S}/hdd.image" | ||
46 | IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect | 45 | IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect |
47 | 46 | ||
48 | install -d ${HDDDIR} | 47 | install -d $HDDDIR |
49 | install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${HDDDIR}/vmlinuz | 48 | install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $HDDDIR/vmlinuz |
50 | install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg | 49 | install -m 0644 ${S}/syslinux.cfg $HDDDIR/syslinux.cfg |
51 | install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys | 50 | install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys $HDDDIR/ldlinux.sys |
52 | 51 | ||
53 | BLOCKS=`du -bks ${HDDDIR} | cut -f 1` | 52 | BLOCKS=`du -bks $HDDDIR | cut -f 1` |
54 | BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}` | 53 | BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}` |
55 | 54 | ||
56 | # Ensure total sectors is an integral number of sectors per | 55 | # Ensure total sectors is an integral number of sectors per |
@@ -59,11 +58,11 @@ build_boot_dd() { | |||
59 | # done in blocks, thus the mod by 16 instead of 32. | 58 | # done in blocks, thus the mod by 16 instead of 32. |
60 | BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16))) | 59 | BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16))) |
61 | 60 | ||
62 | mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C ${HDDIMG} $BLOCKS | 61 | mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS |
63 | mcopy -i ${HDDIMG} -s ${HDDDIR}/* ::/ | 62 | mcopy -i $HDDIMG -s $HDDDIR/* ::/ |
64 | 63 | ||
65 | syslinux ${HDDIMG} | 64 | syslinux $HDDIMG |
66 | chmod 644 ${HDDIMG} | 65 | chmod 644 $HDDIMG |
67 | 66 | ||
68 | ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1` | 67 | ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1` |
69 | TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS` | 68 | TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS` |
@@ -83,7 +82,7 @@ build_boot_dd() { | |||
83 | 82 | ||
84 | OFFSET=`expr $END2 / 512` | 83 | OFFSET=`expr $END2 / 512` |
85 | dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc | 84 | dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc |
86 | dd if=${HDDIMG} of=$IMAGE conv=notrunc seek=1 bs=512 | 85 | dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512 |
87 | dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 | 86 | dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 |
88 | 87 | ||
89 | cd ${DEPLOY_DIR_IMAGE} | 88 | cd ${DEPLOY_DIR_IMAGE} |