summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/boot-directdisk.bbclass7
-rw-r--r--meta/classes/bootimg.bbclass9
-rw-r--r--meta/classes/grub-efi.bbclass12
3 files changed, 15 insertions, 13 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 42b341536a..88e5c52e2b 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -32,7 +32,8 @@ BOOTDD_VOLUME_ID ?= "boot"
32BOOTDD_EXTRA_SPACE ?= "16384" 32BOOTDD_EXTRA_SPACE ?= "16384"
33 33
34EFI = "${@base_contains("MACHINE_FEATURES", "efi", "1", "0", d)}" 34EFI = "${@base_contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
35EFI_CLASS = "${@base_contains("MACHINE_FEATURES", "efi", "grub-efi", "", d)}" 35EFI_PROVIDER ?= "grub-efi"
36EFI_CLASS = "${@base_contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
36 37
37# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not 38# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
38# contain "efi". This way legacy is supported by default if neither is 39# contain "efi". This way legacy is supported by default if neither is
@@ -87,7 +88,7 @@ build_boot_dd() {
87 syslinux_hddimg_populate $HDDDIR 88 syslinux_hddimg_populate $HDDDIR
88 fi 89 fi
89 if [ "${EFI}" = "1" ]; then 90 if [ "${EFI}" = "1" ]; then
90 grubefi_hddimg_populate $HDDDIR 91 efi_hddimg_populate $HDDDIR
91 fi 92 fi
92 93
93 if [ "${IS_VMDK}" = "true" ]; then 94 if [ "${IS_VMDK}" = "true" ]; then
@@ -154,7 +155,7 @@ python do_bootdirectdisk() {
154 if d.getVar("PCBIOS", True) == "1": 155 if d.getVar("PCBIOS", True) == "1":
155 bb.build.exec_func('build_syslinux_cfg', d) 156 bb.build.exec_func('build_syslinux_cfg', d)
156 if d.getVar("EFI", True) == "1": 157 if d.getVar("EFI", True) == "1":
157 bb.build.exec_func('build_grub_cfg', d) 158 bb.build.exec_func('build_efi_cfg', d)
158 bb.build.exec_func('build_boot_dd', d) 159 bb.build.exec_func('build_boot_dd', d)
159} 160}
160 161
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index c370bd6a10..b13eef965d 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -42,7 +42,8 @@ BOOTIMG_VOLUME_ID ?= "boot"
42BOOTIMG_EXTRA_SPACE ?= "512" 42BOOTIMG_EXTRA_SPACE ?= "512"
43 43
44EFI = "${@base_contains("MACHINE_FEATURES", "efi", "1", "0", d)}" 44EFI = "${@base_contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
45EFI_CLASS = "${@base_contains("MACHINE_FEATURES", "efi", "grub-efi", "", d)}" 45EFI_PROVIDER ?= "grub-efi"
46EFI_CLASS = "${@base_contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
46 47
47# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not 48# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
48# contain "efi". This way legacy is supported by default if neither is 49# contain "efi". This way legacy is supported by default if neither is
@@ -89,7 +90,7 @@ build_iso() {
89 syslinux_iso_populate ${ISODIR} 90 syslinux_iso_populate ${ISODIR}
90 fi 91 fi
91 if [ "${EFI}" = "1" ]; then 92 if [ "${EFI}" = "1" ]; then
92 grubefi_iso_populate ${ISODIR} 93 efi_iso_populate ${ISODIR}
93 build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img 94 build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
94 fi 95 fi
95 96
@@ -206,7 +207,7 @@ build_hddimg() {
206 syslinux_hddimg_populate ${HDDDIR} 207 syslinux_hddimg_populate ${HDDDIR}
207 fi 208 fi
208 if [ "${EFI}" = "1" ]; then 209 if [ "${EFI}" = "1" ]; then
209 grubefi_hddimg_populate ${HDDDIR} 210 efi_hddimg_populate ${HDDDIR}
210 fi 211 fi
211 212
212 build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg 213 build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
@@ -227,7 +228,7 @@ python do_bootimg() {
227 if d.getVar("PCBIOS", True) == "1": 228 if d.getVar("PCBIOS", True) == "1":
228 bb.build.exec_func('build_syslinux_cfg', d) 229 bb.build.exec_func('build_syslinux_cfg', d)
229 if d.getVar("EFI", True) == "1": 230 if d.getVar("EFI", True) == "1":
230 bb.build.exec_func('build_grub_cfg', d) 231 bb.build.exec_func('build_efi_cfg', d)
231 bb.build.exec_func('build_hddimg', d) 232 bb.build.exec_func('build_hddimg', d)
232 bb.build.exec_func('build_iso', d) 233 bb.build.exec_func('build_iso', d)
233} 234}
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 71bd00fe99..5c80c177de 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -26,7 +26,7 @@ GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
26 26
27EFIDIR = "/EFI/BOOT" 27EFIDIR = "/EFI/BOOT"
28 28
29grubefi_populate() { 29efi_populate() {
30 # DEST must be the root of the image so that EFIDIR is not 30 # DEST must be the root of the image so that EFIDIR is not
31 # nested under a top level directory. 31 # nested under a top level directory.
32 DEST=$1 32 DEST=$1
@@ -42,9 +42,9 @@ grubefi_populate() {
42 install -m 0644 ${GRUBCFG} ${DEST}${EFIDIR} 42 install -m 0644 ${GRUBCFG} ${DEST}${EFIDIR}
43} 43}
44 44
45grubefi_iso_populate() { 45efi_iso_populate() {
46 iso_dir=$1 46 iso_dir=$1
47 grubefi_populate $iso_dir 47 efi_populate $iso_dir
48 # Build a EFI directory to create efi.img 48 # Build a EFI directory to create efi.img
49 mkdir -p ${EFIIMGDIR}/${EFIDIR} 49 mkdir -p ${EFIIMGDIR}/${EFIDIR}
50 cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} 50 cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
@@ -55,11 +55,11 @@ grubefi_iso_populate() {
55 fi 55 fi
56} 56}
57 57
58grubefi_hddimg_populate() { 58efi_hddimg_populate() {
59 grubefi_populate $1 59 efi_populate $1
60} 60}
61 61
62python build_grub_cfg() { 62python build_efi_cfg() {
63 import sys 63 import sys
64 64
65 workdir = d.getVar('WORKDIR', True) 65 workdir = d.getVar('WORKDIR', True)