diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2019-07-29 11:20:26 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-31 13:50:46 +0100 |
commit | cfb190a3c9771b382d994702a6e74bb662bf6a8c (patch) | |
tree | 85fc94dbf4ec102b1e86fab99ee1be5ea34ebdf7 /meta/recipes-bsp/grub/grub-efi_2.04.bb | |
parent | 07ba3a1d7320946c22a3dafefcb2aab6b1906b90 (diff) | |
download | poky-cfb190a3c9771b382d994702a6e74bb662bf6a8c.tar.gz |
grub: upgrade 2.02 -> 2.04
* For changes in this version, see:
http://git.savannah.gnu.org/cgit/grub.git/tree/NEWS?h=grub-2.04
* Remove backported patches and refresh others.
* Remove the musl patch as it's no longer needed.
* Use configure option --disable-werror instead of passing through CFLAGS.
(From OE-Core rev: 07222d213d1da0ccade1c61ed19a7ecdc4966edd)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub/grub-efi_2.04.bb')
-rw-r--r-- | meta/recipes-bsp/grub/grub-efi_2.04.bb | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb b/meta/recipes-bsp/grub/grub-efi_2.04.bb new file mode 100644 index 0000000000..0028a9b6eb --- /dev/null +++ b/meta/recipes-bsp/grub/grub-efi_2.04.bb | |||
@@ -0,0 +1,109 @@ | |||
1 | require grub2.inc | ||
2 | |||
3 | GRUBPLATFORM = "efi" | ||
4 | |||
5 | DEPENDS_append_class-target = " grub-efi-native" | ||
6 | RDEPENDS_${PN}_class-target = "diffutils freetype grub-common virtual/grub-bootconf" | ||
7 | |||
8 | SRC_URI += " \ | ||
9 | file://cfg \ | ||
10 | " | ||
11 | |||
12 | S = "${WORKDIR}/grub-${PV}" | ||
13 | |||
14 | # Determine the target arch for the grub modules | ||
15 | python __anonymous () { | ||
16 | import re | ||
17 | target = d.getVar('TARGET_ARCH') | ||
18 | prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-" | ||
19 | if target == "x86_64": | ||
20 | grubtarget = 'x86_64' | ||
21 | grubimage = prefix + "bootx64.efi" | ||
22 | elif re.match('i.86', target): | ||
23 | grubtarget = 'i386' | ||
24 | grubimage = prefix + "bootia32.efi" | ||
25 | elif re.match('aarch64', target): | ||
26 | grubtarget = 'arm64' | ||
27 | grubimage = prefix + "bootaa64.efi" | ||
28 | elif re.match('arm', target): | ||
29 | grubtarget = 'arm' | ||
30 | grubimage = prefix + "bootarm.efi" | ||
31 | else: | ||
32 | raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) | ||
33 | d.setVar("GRUB_TARGET", grubtarget) | ||
34 | d.setVar("GRUB_IMAGE", grubimage) | ||
35 | prefix = "grub-efi-" if prefix == "" else "" | ||
36 | d.setVar("GRUB_IMAGE_PREFIX", prefix) | ||
37 | } | ||
38 | |||
39 | inherit deploy | ||
40 | |||
41 | CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" | ||
42 | EXTRA_OECONF += "--enable-efiemu=no" | ||
43 | |||
44 | do_mkimage() { | ||
45 | cd ${B} | ||
46 | # Search for the grub.cfg on the local boot media by using the | ||
47 | # built in cfg file provided via this recipe | ||
48 | grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \ | ||
49 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \ | ||
50 | ${GRUB_BUILDIN} | ||
51 | } | ||
52 | |||
53 | addtask mkimage before do_install after do_compile | ||
54 | |||
55 | do_mkimage_class-native() { | ||
56 | : | ||
57 | } | ||
58 | |||
59 | do_install_append_class-target() { | ||
60 | install -d ${D}/boot | ||
61 | install -d ${D}/boot/EFI | ||
62 | install -d ${D}/boot/EFI/BOOT | ||
63 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE} | ||
64 | } | ||
65 | |||
66 | do_install_class-native() { | ||
67 | install -d ${D}${bindir} | ||
68 | install -m 755 grub-mkimage ${D}${bindir} | ||
69 | install -m 755 grub-editenv ${D}${bindir} | ||
70 | } | ||
71 | |||
72 | do_install_class-target() { | ||
73 | oe_runmake 'DESTDIR=${D}' -C grub-core install | ||
74 | |||
75 | # Remove build host references... | ||
76 | find "${D}" -name modinfo.sh -type f -exec \ | ||
77 | sed -i \ | ||
78 | -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
79 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
80 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ | ||
81 | {} + | ||
82 | } | ||
83 | |||
84 | GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \ | ||
85 | efi_gop iso9660 configfile search loadenv test" | ||
86 | |||
87 | do_deploy() { | ||
88 | install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR} | ||
89 | } | ||
90 | |||
91 | do_deploy_class-native() { | ||
92 | : | ||
93 | } | ||
94 | |||
95 | addtask deploy after do_install before do_build | ||
96 | |||
97 | FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \ | ||
98 | ${datadir}/grub \ | ||
99 | /boot/EFI/BOOT/${GRUB_IMAGE} \ | ||
100 | " | ||
101 | |||
102 | |||
103 | # 64-bit binaries are expected for the bootloader with an x32 userland | ||
104 | INSANE_SKIP_${PN}_append_linux-gnux32 = " arch" | ||
105 | INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch" | ||
106 | INSANE_SKIP_${PN}_append_linux-muslx32 = " arch" | ||
107 | INSANE_SKIP_${PN}-dbg_append_linux-muslx32 = " arch" | ||
108 | |||
109 | BBCLASSEXTEND = "native" | ||