diff options
-rw-r--r-- | meta/recipes-bsp/grub/grub-efi_2.04.bb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb b/meta/recipes-bsp/grub/grub-efi_2.04.bb index c85879b677..b9d6225d27 100644 --- a/meta/recipes-bsp/grub/grub-efi_2.04.bb +++ b/meta/recipes-bsp/grub/grub-efi_2.04.bb | |||
@@ -1,5 +1,7 @@ | |||
1 | require grub2.inc | 1 | require grub2.inc |
2 | 2 | ||
3 | require conf/image-uefi.conf | ||
4 | |||
3 | GRUBPLATFORM = "efi" | 5 | GRUBPLATFORM = "efi" |
4 | 6 | ||
5 | DEPENDS_append_class-target = " grub-efi-native" | 7 | DEPENDS_append_class-target = " grub-efi-native" |
@@ -18,18 +20,15 @@ python __anonymous () { | |||
18 | prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-" | 20 | prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-" |
19 | if target == "x86_64": | 21 | if target == "x86_64": |
20 | grubtarget = 'x86_64' | 22 | grubtarget = 'x86_64' |
21 | grubimage = prefix + "bootx64.efi" | ||
22 | elif re.match('i.86', target): | 23 | elif re.match('i.86', target): |
23 | grubtarget = 'i386' | 24 | grubtarget = 'i386' |
24 | grubimage = prefix + "bootia32.efi" | ||
25 | elif re.match('aarch64', target): | 25 | elif re.match('aarch64', target): |
26 | grubtarget = 'arm64' | 26 | grubtarget = 'arm64' |
27 | grubimage = prefix + "bootaa64.efi" | ||
28 | elif re.match('arm', target): | 27 | elif re.match('arm', target): |
29 | grubtarget = 'arm' | 28 | grubtarget = 'arm' |
30 | grubimage = prefix + "bootarm.efi" | ||
31 | else: | 29 | else: |
32 | raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) | 30 | raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) |
31 | grubimage = prefix + d.getVar("EFI_BOOT_IMAGE") | ||
33 | d.setVar("GRUB_TARGET", grubtarget) | 32 | d.setVar("GRUB_TARGET", grubtarget) |
34 | d.setVar("GRUB_IMAGE", grubimage) | 33 | d.setVar("GRUB_IMAGE", grubimage) |
35 | prefix = "grub-efi-" if prefix == "" else "" | 34 | prefix = "grub-efi-" if prefix == "" else "" |
@@ -45,7 +44,7 @@ do_mkimage() { | |||
45 | cd ${B} | 44 | cd ${B} |
46 | # Search for the grub.cfg on the local boot media by using the | 45 | # Search for the grub.cfg on the local boot media by using the |
47 | # built in cfg file provided via this recipe | 46 | # built in cfg file provided via this recipe |
48 | grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \ | 47 | grub-mkimage -c ../cfg -p ${EFIDIR} -d ./grub-core/ \ |
49 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ | 48 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ |
50 | ${GRUB_BUILDIN} | 49 | ${GRUB_BUILDIN} |
51 | } | 50 | } |
@@ -57,10 +56,8 @@ do_mkimage_class-native() { | |||
57 | } | 56 | } |
58 | 57 | ||
59 | do_install_append_class-target() { | 58 | do_install_append_class-target() { |
60 | install -d ${D}/boot | 59 | install -d ${D}${EFI_FILES_PATH} |
61 | install -d ${D}/boot/EFI | 60 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}${EFI_FILES_PATH}/${GRUB_IMAGE} |
62 | install -d ${D}/boot/EFI/BOOT | ||
63 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE} | ||
64 | } | 61 | } |
65 | 62 | ||
66 | do_install_class-native() { | 63 | do_install_class-native() { |
@@ -100,7 +97,7 @@ addtask deploy after do_install before do_build | |||
100 | 97 | ||
101 | FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ | 98 | FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ |
102 | ${datadir}/grub \ | 99 | ${datadir}/grub \ |
103 | /boot/EFI/BOOT/${GRUB_IMAGE} \ | 100 | ${EFI_FILES_PATH}/${GRUB_IMAGE} \ |
104 | " | 101 | " |
105 | 102 | ||
106 | FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi" | 103 | FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi" |