summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2013-05-09 13:24:03 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-16 00:09:46 +0300
commitf5b103ff47d6137326618328fa5803f0963e50f4 (patch)
tree52ad13f1e4e42e934e2115e0808e179079eedc9e /meta
parentbadd71825352f4a2aaf40707154f4d5f506a45f6 (diff)
downloadast2050-yocto-poky-f5b103ff47d6137326618328fa5803f0963e50f4.zip
ast2050-yocto-poky-f5b103ff47d6137326618328fa5803f0963e50f4.tar.gz
boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts
These variables should not be shared with other image classes. The bootimg class also has an HDDDIR variable that could be overwritten if executing concurrently in the same image recipe. (From OE-Core rev: 94c83fa26af104d28aa4e6951bcb109bb0c82265) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/boot-directdisk.bbclass25
1 files changed, 12 insertions, 13 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index a3c9a87..3169043 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 \
PACKAGES = " "
EXCLUDE_FROM_WORLD = "1"
-HDDDIR = "${S}/hdd/boot"
-HDDIMG = "${S}/hdd.image"
-
BOOTDD_VOLUME_ID ?= "boot"
BOOTDD_EXTRA_SPACE ?= "16384"
@@ -43,14 +40,16 @@ SYSLINUX_TIMEOUT ?= "10"
inherit syslinux
build_boot_dd() {
+ HDDDIR="${S}/hdd/boot"
+ HDDIMG="${S}/hdd.image"
IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
- install -d ${HDDDIR}
- install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${HDDDIR}/vmlinuz
- install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg
- install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
+ install -d $HDDDIR
+ install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $HDDDIR/vmlinuz
+ install -m 0644 ${S}/syslinux.cfg $HDDDIR/syslinux.cfg
+ install -m 444 ${STAGING_DATADIR}/syslinux/ldlinux.sys $HDDDIR/ldlinux.sys
- BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
+ BLOCKS=`du -bks $HDDDIR | cut -f 1`
BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
# Ensure total sectors is an integral number of sectors per
@@ -59,11 +58,11 @@ build_boot_dd() {
# done in blocks, thus the mod by 16 instead of 32.
BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
- mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C ${HDDIMG} $BLOCKS
- mcopy -i ${HDDIMG} -s ${HDDDIR}/* ::/
+ mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS
+ mcopy -i $HDDIMG -s $HDDDIR/* ::/
- syslinux ${HDDIMG}
- chmod 644 ${HDDIMG}
+ syslinux $HDDIMG
+ chmod 644 $HDDIMG
ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
@@ -83,7 +82,7 @@ build_boot_dd() {
OFFSET=`expr $END2 / 512`
dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
- dd if=${HDDIMG} of=$IMAGE conv=notrunc seek=1 bs=512
+ dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
cd ${DEPLOY_DIR_IMAGE}
OpenPOWER on IntegriCloud