summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2018-02-28 18:15:01 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:23:06 -0800
commit8d158bb4382fd4ef31d37ea5558e07d5eb33145e (patch)
tree9c5f1685cbac3165508a7906cd560be8a65db31a /meta/recipes-bsp
parentf9c3405a99f3c0fd922d21bea7bb0bd0dd3a2ab2 (diff)
downloadopenembedded-core-contrib-8d158bb4382fd4ef31d37ea5558e07d5eb33145e.tar.gz
openembedded-core-contrib-8d158bb4382fd4ef31d37ea5558e07d5eb33145e.tar.bz2
openembedded-core-contrib-8d158bb4382fd4ef31d37ea5558e07d5eb33145e.zip
grub-efi: if installed and EFI_PROVIDER, install as bootx64 or bootia32
This way we could theoretically support multiple bootloaders, and we keep the convention of boot(x64|ia32). Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.02.bb13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index c5a68f01ce..ed27b90fdb 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -15,16 +15,19 @@ S = "${WORKDIR}/grub-${PV}"
python __anonymous () {
import re
target = d.getVar('TARGET_ARCH')
+ prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
if target == "x86_64":
grubtarget = 'x86_64'
- grubimage = "grub-efi-bootx64.efi"
+ grubimage = prefix + "bootx64.efi"
elif re.match('i.86', target):
grubtarget = 'i386'
- grubimage = "grub-efi-bootia32.efi"
+ grubimage = prefix + "bootia32.efi"
else:
raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
d.setVar("GRUB_TARGET", grubtarget)
d.setVar("GRUB_IMAGE", grubimage)
+ prefix = "grub-efi-" if prefix == "" else ""
+ d.setVar("GRUB_IMAGE_PREFIX", prefix)
}
inherit deploy
@@ -41,7 +44,7 @@ do_mkimage() {
# Search for the grub.cfg on the local boot media by using the
# built in cfg file provided via this recipe
grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
- -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \
+ -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
${GRUB_BUILDIN}
}
@@ -55,7 +58,7 @@ do_install_append_class-target() {
install -d ${D}/boot
install -d ${D}/boot/EFI
install -d ${D}/boot/EFI/BOOT
- install -m 644 ${B}/${GRUB_IMAGE} ${D}/boot/EFI/BOOT/
+ install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE}
}
do_install_class-native() {
@@ -79,7 +82,7 @@ GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
efi_gop iso9660 configfile search loadenv test"
do_deploy() {
- install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}
+ install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
}
do_deploy_class-native() {