summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2013-09-17 13:32:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-30 22:11:56 +0100
commit0ac89346dea9ae52aa9b8c11a6e6bf84ab82e3c9 (patch)
tree08e638462806ac3749bd2bc602124318a07428d5 /meta/classes
parentec9f4c3c25544e7613058113f283658ce604c937 (diff)
downloadpoky-0ac89346dea9ae52aa9b8c11a6e6bf84ab82e3c9.tar.gz
boot-directdisk.bbclass: Fix media generation problems with vmdk
The various populate methods need to accept a path as an argument vs using hard expanded variables. In the case of the boot-directdisk class it uses a different path for HDDDIR but it gets eclipsed by the the class definition at the point in time ${HDDDIR} gets expanded. The logical fix is to pass the arguments to the functions as opposed to using globally expanded variables from the class definitions. This patch changes 3 things: 1) syslinux_hddimg_populate takes an argument for the destination 2) syslinux_iso_populate takes an argument for the destination 3) populate is changed to boot_direct_populate because there was a conflict with it overriding the populate in bootimg.bbclass [YOCTO #3994] (From OE-Core rev: 63d164b755b984021f7e3cdba7280918ded6e821) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/boot-directdisk.bbclass16
-rw-r--r--meta/classes/bootimg.bbclass8
-rw-r--r--meta/classes/grub-efi.bbclass13
-rw-r--r--meta/classes/syslinux.bbclass12
4 files changed, 26 insertions, 23 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 4b9d7bd128..c58c6f0c53 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -61,15 +61,15 @@ DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}"
61SYSLINUX_ROOT ?= "root=/dev/sda2" 61SYSLINUX_ROOT ?= "root=/dev/sda2"
62SYSLINUX_TIMEOUT ?= "10" 62SYSLINUX_TIMEOUT ?= "10"
63 63
64populate() { 64boot_direct_populate() {
65 DEST=$1 65 dest=$1
66 install -d ${DEST} 66 install -d $dest
67 67
68 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use. 68 # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
69 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz 69 install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz
70 70
71 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then 71 if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
72 install -m 0644 ${INITRD} ${DEST}/initrd 72 install -m 0644 ${INITRD} $dest/initrd
73 fi 73 fi
74 74
75} 75}
@@ -79,13 +79,13 @@ build_boot_dd() {
79 HDDIMG="${S}/hdd.image" 79 HDDIMG="${S}/hdd.image"
80 IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect 80 IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
81 81
82 populate ${HDDDIR} 82 boot_direct_populate $HDDDIR
83 83
84 if [ "${PCBIOS}" = "1" ]; then 84 if [ "${PCBIOS}" = "1" ]; then
85 syslinux_hddimg_populate 85 syslinux_hddimg_populate $HDDDIR
86 fi 86 fi
87 if [ "${EFI}" = "1" ]; then 87 if [ "${EFI}" = "1" ]; then
88 grubefi_hddimg_populate 88 grubefi_hddimg_populate $HDDDIR
89 fi 89 fi
90 90
91 BLOCKS=`du -bks $HDDDIR | cut -f 1` 91 BLOCKS=`du -bks $HDDDIR | cut -f 1`
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index c61c4e985e..395085d0ab 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -86,10 +86,10 @@ build_iso() {
86 populate ${ISODIR} 86 populate ${ISODIR}
87 87
88 if [ "${PCBIOS}" = "1" ]; then 88 if [ "${PCBIOS}" = "1" ]; then
89 syslinux_iso_populate 89 syslinux_iso_populate ${ISODIR}
90 fi 90 fi
91 if [ "${EFI}" = "1" ]; then 91 if [ "${EFI}" = "1" ]; then
92 grubefi_iso_populate 92 grubefi_iso_populate ${ISODIR}
93 build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img 93 build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
94 fi 94 fi
95 95
@@ -203,10 +203,10 @@ build_hddimg() {
203 populate ${HDDDIR} 203 populate ${HDDDIR}
204 204
205 if [ "${PCBIOS}" = "1" ]; then 205 if [ "${PCBIOS}" = "1" ]; then
206 syslinux_hddimg_populate 206 syslinux_hddimg_populate ${HDDDIR}
207 fi 207 fi
208 if [ "${EFI}" = "1" ]; then 208 if [ "${EFI}" = "1" ]; then
209 grubefi_hddimg_populate 209 grubefi_hddimg_populate ${HDDDIR}
210 fi 210 fi
211 211
212 build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg 212 build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 591bee25ef..96fb98b043 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -42,19 +42,20 @@ grubefi_populate() {
42} 42}
43 43
44grubefi_iso_populate() { 44grubefi_iso_populate() {
45 grubefi_populate ${ISODIR} 45 iso_dir=$1
46 grubefi_populate $iso_dir
46 # Build a EFI directory to create efi.img 47 # Build a EFI directory to create efi.img
47 mkdir -p ${EFIIMGDIR}/${EFIDIR} 48 mkdir -p ${EFIIMGDIR}/${EFIDIR}
48 cp ${ISODIR}/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} 49 cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
49 cp ${ISODIR}/vmlinuz ${EFIIMGDIR} 50 cp $iso_dir/vmlinuz ${EFIIMGDIR}
50 echo "EFI\\BOOT\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh 51 echo "EFI\\BOOT\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh
51 if [ -f "${ISODIR}/initrd" ] ; then 52 if [ -f "$iso_dir/initrd" ] ; then
52 cp ${ISODIR}/initrd ${EFIIMGDIR} 53 cp $iso_dir/initrd ${EFIIMGDIR}
53 fi 54 fi
54} 55}
55 56
56grubefi_hddimg_populate() { 57grubefi_hddimg_populate() {
57 grubefi_populate ${HDDDIR} 58 grubefi_populate $1
58} 59}
59 60
60python build_grub_cfg() { 61python build_grub_cfg() {
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index 91b973188c..944bd92da2 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -53,14 +53,16 @@ syslinux_populate() {
53} 53}
54 54
55syslinux_iso_populate() { 55syslinux_iso_populate() {
56 syslinux_populate ${ISODIR} ${ISOLINUXDIR} isolinux.cfg 56 iso_dir=$1
57 install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR} 57 syslinux_populate $iso_dir ${ISOLINUXDIR} isolinux.cfg
58 install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 ${ISODIR}${ISOLINUXDIR} 58 install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin $iso_dir${ISOLINUXDIR}
59 install -m 0644 ${STAGING_DATADIR}/syslinux/ldlinux.c32 $iso_dir${ISOLINUXDIR}
59} 60}
60 61
61syslinux_hddimg_populate() { 62syslinux_hddimg_populate() {
62 syslinux_populate ${HDDDIR} ${SYSLINUXDIR} syslinux.cfg 63 hdd_dir=$1
63 install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys ${HDDDIR}${SYSLINUXDIR}/ldlinux.sys 64 syslinux_populate $hdd_dir ${SYSLINUXDIR} syslinux.cfg
65 install -m 0444 ${STAGING_DATADIR}/syslinux/ldlinux.sys $hdd_dir${SYSLINUXDIR}/ldlinux.sys
64} 66}
65 67
66syslinux_hddimg_install() { 68syslinux_hddimg_install() {