summaryrefslogtreecommitdiffstats
path: root/meta/classes/bootimg.bbclass
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2014-03-06 19:57:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-11 09:30:14 -0700
commit9d04183cf8aed9eaa2aa03058488b1198f73cea0 (patch)
tree83baa1ccab871cb465fecdc88aaa112fe75cb68b /meta/classes/bootimg.bbclass
parentde18567e623ffa1033dc1ba236cad2fa34143e56 (diff)
downloadpoky-9d04183cf8aed9eaa2aa03058488b1198f73cea0.tar.gz
bootimg/grub-efi.bbclass: allow using a different class for EFI images
Abstract away some names so one can select using EFI_PROVIDER a different class than grub-efi for populating live images, basically allowing the use of a different bootloader than grub-efi. (From OE-Core rev: 14e5de3b8f4d5902d0ac683ff45fb878e88b40ef) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/bootimg.bbclass')
-rw-r--r--meta/classes/bootimg.bbclass9
1 files changed, 5 insertions, 4 deletions
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}