summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>2019-09-18 16:12:43 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-19 10:54:32 +0100
commit1762dacb9b78761bfc2fbe12ad387ba51192fabb (patch)
tree13462babd667e54acd54e45928284f413a3d61bd /meta/recipes-bsp
parentb59c4277207b5fd5de1440be6258d524b77a1093 (diff)
downloadpoky-1762dacb9b78761bfc2fbe12ad387ba51192fabb.tar.gz
grub-efi: switch to image-uefi.conf
Use variables from image-uefi.conf instead of hardcoding them in the recipe. (From OE-Core rev: e6bb6d31c4285a62b3e9e324c36b2baf439e7bae) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.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.04.bb17
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 @@
1require grub2.inc 1require grub2.inc
2 2
3require conf/image-uefi.conf
4
3GRUBPLATFORM = "efi" 5GRUBPLATFORM = "efi"
4 6
5DEPENDS_append_class-target = " grub-efi-native" 7DEPENDS_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
59do_install_append_class-target() { 58do_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
66do_install_class-native() { 63do_install_class-native() {
@@ -100,7 +97,7 @@ addtask deploy after do_install before do_build
100 97
101FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ 98FILES_${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
106FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi" 103FILES_${PN}_remove_aarch64 = "${libdir}/grub/${GRUB_TARGET}-efi"