diff options
| -rw-r--r-- | meta/recipes-bsp/grub/grub-efi_2.02.bb | 13 |
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}" | |||
| 15 | python __anonymous () { | 15 | python __anonymous () { |
| 16 | import re | 16 | import re |
| 17 | target = d.getVar('TARGET_ARCH') | 17 | target = d.getVar('TARGET_ARCH') |
| 18 | prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-" | ||
| 18 | if target == "x86_64": | 19 | if target == "x86_64": |
| 19 | grubtarget = 'x86_64' | 20 | grubtarget = 'x86_64' |
| 20 | grubimage = "grub-efi-bootx64.efi" | 21 | grubimage = prefix + "bootx64.efi" |
| 21 | elif re.match('i.86', target): | 22 | elif re.match('i.86', target): |
| 22 | grubtarget = 'i386' | 23 | grubtarget = 'i386' |
| 23 | grubimage = "grub-efi-bootia32.efi" | 24 | grubimage = prefix + "bootia32.efi" |
| 24 | else: | 25 | else: |
| 25 | raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) | 26 | raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) |
| 26 | d.setVar("GRUB_TARGET", grubtarget) | 27 | d.setVar("GRUB_TARGET", grubtarget) |
| 27 | d.setVar("GRUB_IMAGE", grubimage) | 28 | d.setVar("GRUB_IMAGE", grubimage) |
| 29 | prefix = "grub-efi-" if prefix == "" else "" | ||
| 30 | d.setVar("GRUB_IMAGE_PREFIX", prefix) | ||
| 28 | } | 31 | } |
| 29 | 32 | ||
| 30 | inherit deploy | 33 | inherit deploy |
| @@ -41,7 +44,7 @@ do_mkimage() { | |||
| 41 | # Search for the grub.cfg on the local boot media by using the | 44 | # Search for the grub.cfg on the local boot media by using the |
| 42 | # built in cfg file provided via this recipe | 45 | # built in cfg file provided via this recipe |
| 43 | grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \ | 46 | grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \ |
| 44 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \ | 47 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ |
| 45 | ${GRUB_BUILDIN} | 48 | ${GRUB_BUILDIN} |
| 46 | } | 49 | } |
| 47 | 50 | ||
| @@ -55,7 +58,7 @@ do_install_append_class-target() { | |||
| 55 | install -d ${D}/boot | 58 | install -d ${D}/boot |
| 56 | install -d ${D}/boot/EFI | 59 | install -d ${D}/boot/EFI |
| 57 | install -d ${D}/boot/EFI/BOOT | 60 | install -d ${D}/boot/EFI/BOOT |
| 58 | install -m 644 ${B}/${GRUB_IMAGE} ${D}/boot/EFI/BOOT/ | 61 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE} |
| 59 | } | 62 | } |
| 60 | 63 | ||
| 61 | do_install_class-native() { | 64 | do_install_class-native() { |
| @@ -79,7 +82,7 @@ GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \ | |||
| 79 | efi_gop iso9660 configfile search loadenv test" | 82 | efi_gop iso9660 configfile search loadenv test" |
| 80 | 83 | ||
| 81 | do_deploy() { | 84 | do_deploy() { |
| 82 | install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR} | 85 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR} |
| 83 | } | 86 | } |
| 84 | 87 | ||
| 85 | do_deploy_class-native() { | 88 | do_deploy_class-native() { |
