summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-21 20:36:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-23 17:45:36 +0100
commit67d7ea7c675910f4da548639cdee31073cdf59fa (patch)
tree906556c4b75c4d25ccf78c245f522e771e5f55cb /meta/recipes-bsp
parentf0ff93c2a5c709cada5fc34b328204a79a5d642f (diff)
downloadpoky-67d7ea7c675910f4da548639cdee31073cdf59fa.tar.gz
grub: Update to 2.02
Drop git recipe, add arm bits to 2.02 itself (From OE-Core rev: 4f27e4042dfb39caa71c7c6eb0a327de6af4d563) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch (renamed from meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch45
-rw-r--r--meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch53
-rw-r--r--meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch81
-rw-r--r--meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch92
-rw-r--r--meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch39
-rw-r--r--meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch79
-rw-r--r--meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch (renamed from meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch33
-rw-r--r--meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch43
-rw-r--r--meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch (renamed from meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch33
-rw-r--r--meta/recipes-bsp/grub/files/fix-endianness-problem.patch44
-rw-r--r--meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch21
-rw-r--r--meta/recipes-bsp/grub/files/fix-texinfo.patch32
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch53
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch27
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch24
-rw-r--r--meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch131
-rw-r--r--meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch32
-rw-r--r--meta/recipes-bsp/grub/files/grub-install.in.patch20
-rw-r--r--meta/recipes-bsp/grub/files/grub-no-unused-result.patch19
-rw-r--r--meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch48
-rw-r--r--meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch44
-rw-r--r--meta/recipes-bsp/grub/files/remove-gets.patch20
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.02.bb (renamed from meta/recipes-bsp/grub/grub-efi_2.00.bb)9
-rw-r--r--meta/recipes-bsp/grub/grub2.inc50
-rw-r--r--meta/recipes-bsp/grub/grub_2.02.bb (renamed from meta/recipes-bsp/grub/grub_2.00.bb)6
-rw-r--r--meta/recipes-bsp/grub/grub_git.bb45
29 files changed, 26 insertions, 1097 deletions
diff --git a/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch b/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
index ce3238f3a1..ce3238f3a1 100644
--- a/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
+++ b/meta/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
diff --git a/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch b/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch
deleted file mode 100644
index ccdbee215d..0000000000
--- a/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 6186bcf1bcaaa0f16e79339e07c64c841d4d957d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 2 Dec 2016 20:52:40 +0200
4Subject: [PATCH] Enforce -no-pie, if the compiler supports it.
5
6Add a -no-pie as recent (2 Dec 2016) Debian testing compiler
7seems to default to enabling PIE when linking. See
8https://wiki.ubuntu.com/SecurityTeam/PIE
9
10Upstream-Status: Pending
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 acinclude.m4 | 2 +-
14 configure.ac | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/acinclude.m4 b/acinclude.m4
18index 19200b0..a713923 100644
19--- a/acinclude.m4
20+++ b/acinclude.m4
21@@ -416,7 +416,7 @@ int main() {
22
23 [# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
24 # `ac_compile' like this correct, after all?
25-if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then]
26+if eval "$ac_compile -S -o conftest.s" 2> /dev/null && eval "$CC -dumpspecs 2>/dev/null | grep -e no-pie" ; then]
27 AC_MSG_RESULT([yes])
28 [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
29 rm -f conftest.s
30diff --git a/configure.ac b/configure.ac
31index df20991..506c6b4 100644
32--- a/configure.ac
33+++ b/configure.ac
34@@ -603,7 +603,7 @@ grub_CHECK_PIE
35 [# Need that, because some distributions ship compilers that include
36 # `-fPIE' in the default specs.
37 if [ x"$pie_possible" = xyes ]; then
38- TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
39+ TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -no-pie"
40 fi]
41
42 # Position independent executable.
43--
442.10.2
45
diff --git a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
deleted file mode 100644
index 65ddcaf128..0000000000
--- a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1Upstream-Status: Accepted
2CVE: CVE-2015-8370
3Signed-off-by: Awais Belal <awais_belal@mentor.com>
4
5From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
6From: Hector Marco-Gisbert <hecmargi@upv.es>
7Date: Wed, 16 Dec 2015 04:57:18 +0000
8Subject: Fix security issue when reading username and password
9
10This patch fixes two integer underflows at:
11 * grub-core/lib/crypto.c
12 * grub-core/normal/auth.c
13
14CVE-2015-8370
15
16Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
17Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
18Also-By: Andrey Borzenkov <arvidjaar@gmail.com>
19---
20diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
21index 010e550..683a8aa 100644
22--- a/grub-core/lib/crypto.c
23+++ b/grub-core/lib/crypto.c
24@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size)
25
26 if (key == '\b')
27 {
28- cur_len--;
29+ if (cur_len)
30+ cur_len--;
31 continue;
32 }
33
34diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
35index c6bd96e..8615c48 100644
36--- a/grub-core/normal/auth.c
37+++ b/grub-core/normal/auth.c
38@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size)
39
40 if (key == '\b')
41 {
42- cur_len--;
43- grub_printf ("\b");
44+ if (cur_len)
45+ {
46+ cur_len--;
47+ grub_printf ("\b");
48+ }
49 continue;
50 }
51
52--
53cgit v0.9.0.2
diff --git a/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch b/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
deleted file mode 100644
index 9eabce977b..0000000000
--- a/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001
2From: Felix Janda <felix.janda@posteo.de>
3Date: Thu, 22 Jan 2015 19:54:36 +0100
4Subject: [PATCH] Remove direct _llseek code and require long filesystem libc.
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Backport
9 configure.ac | 8 ++++++++
10 grub-core/osdep/unix/hostdisk.c | 24 ------------------------
11 4 files changed, 13 insertions(+), 24 deletions(-)
12
13Index: grub-2.00/configure.ac
14===================================================================
15--- grub-2.00.orig/configure.ac
16+++ grub-2.00/configure.ac
17@@ -306,6 +306,14 @@ if test x$grub_cv_apple_cc = xyes ; then
18 HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute"
19 fi
20
21+case "$host_os" in
22+ cygwin | windows* | mingw32* | aros*)
23+ ;;
24+ *)
25+ AC_CHECK_SIZEOF(off_t)
26+ test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
27+esac
28+
29 if test x$USE_NLS = xno; then
30 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
31 fi
32Index: grub-2.00/grub-core/kern/emu/hostdisk.c
33===================================================================
34--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c
35+++ grub-2.00/grub-core/kern/emu/hostdisk.c
36@@ -44,11 +44,6 @@
37 #ifdef __linux__
38 # include <sys/ioctl.h> /* ioctl */
39 # include <sys/mount.h>
40-# if !defined(__GLIBC__) || \
41- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
42-/* Maybe libc doesn't have large file support. */
43-# include <linux/unistd.h> /* _llseek */
44-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
45 # ifndef BLKFLSBUF
46 # define BLKFLSBUF _IO (0x12,97) /* flush buffer cache */
47 # endif /* ! BLKFLSBUF */
48@@ -761,25 +756,6 @@ linux_find_partition (char *dev, grub_di
49 }
50 #endif /* __linux__ */
51
52-#if defined(__linux__) && (!defined(__GLIBC__) || \
53- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
54- /* Maybe libc doesn't have large file support. */
55-grub_err_t
56-grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
57-{
58- loff_t offset, result;
59- static int _llseek (uint filedes, ulong hi, ulong lo,
60- loff_t *res, uint wh);
61- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
62- loff_t *, res, uint, wh);
63-
64- offset = (loff_t) off;
65- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
66- return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
67- name, strerror (errno));
68- return GRUB_ERR_NONE;
69-}
70-#else
71 grub_err_t
72 grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
73 {
74@@ -790,7 +766,6 @@ grub_util_fd_seek (int fd, const char *n
75 name, strerror (errno));
76 return 0;
77 }
78-#endif
79
80 static void
81 flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
diff --git a/meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch b/meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch
deleted file mode 100644
index f95b9ef9a0..0000000000
--- a/meta/recipes-bsp/grub/files/0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch
+++ /dev/null
@@ -1,92 +0,0 @@
1From 7a5b301e3adb8e054288518a325135a1883c1c6c Mon Sep 17 00:00:00 2001
2From: Mike Gilbert <floppym@gentoo.org>
3Date: Tue, 19 Apr 2016 14:27:22 -0400
4Subject: [PATCH] build: Use AC_HEADER_MAJOR to find device macros
5
6Depending on the OS/libc, device macros are defined in different
7headers. This change ensures we include the right one.
8
9sys/types.h - BSD
10sys/mkdev.h - Sun
11sys/sysmacros.h - glibc (Linux)
12
13glibc currently pulls sys/sysmacros.h into sys/types.h, but this may
14change in a future release.
15
16https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
17---
18Upstream-Status: Backport
19
20 configure.ac | 3 ++-
21 grub-core/osdep/devmapper/getroot.c | 6 ++++++
22 grub-core/osdep/devmapper/hostdisk.c | 5 +++++
23 grub-core/osdep/linux/getroot.c | 6 ++++++
24 grub-core/osdep/unix/getroot.c | 4 +++-
25 5 files changed, 22 insertions(+), 2 deletions(-)
26
27Index: grub-2.00/configure.ac
28===================================================================
29--- grub-2.00.orig/configure.ac
30+++ grub-2.00/configure.ac
31@@ -326,7 +326,8 @@ fi
32
33 # Check for functions and headers.
34 AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent)
35-AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h)
36+AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
37+AC_HEADER_MAJOR
38
39 AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
40 #include <sys/param.h>
41Index: grub-2.00/grub-core/kern/emu/hostdisk.c
42===================================================================
43--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c
44+++ grub-2.00/grub-core/kern/emu/hostdisk.c
45@@ -41,6 +41,12 @@
46 #include <errno.h>
47 #include <limits.h>
48
49+#if defined(MAJOR_IN_MKDEV)
50+#include <sys/mkdev.h>
51+#elif defined(MAJOR_IN_SYSMACROS)
52+#include <sys/sysmacros.h>
53+#endif
54+
55 #ifdef __linux__
56 # include <sys/ioctl.h> /* ioctl */
57 # include <sys/mount.h>
58Index: grub-2.00/util/getroot.c
59===================================================================
60--- grub-2.00.orig/util/getroot.c
61+++ grub-2.00/util/getroot.c
62@@ -35,6 +35,13 @@
63 #ifdef HAVE_LIMITS_H
64 #include <limits.h>
65 #endif
66+
67+#if defined(MAJOR_IN_MKDEV)
68+#include <sys/mkdev.h>
69+#elif defined(MAJOR_IN_SYSMACROS)
70+#include <sys/sysmacros.h>
71+#endif
72+
73 #include <grub/util/misc.h>
74 #include <grub/util/lvm.h>
75 #include <grub/cryptodisk.h>
76Index: grub-2.00/util/raid.c
77===================================================================
78--- grub-2.00.orig/util/raid.c
79+++ grub-2.00/util/raid.c
80@@ -29,6 +29,12 @@
81 #include <errno.h>
82 #include <sys/types.h>
83
84+#if defined(MAJOR_IN_MKDEV)
85+#include <sys/mkdev.h>
86+#elif defined(MAJOR_IN_SYSMACROS)
87+#include <sys/sysmacros.h>
88+#endif
89+
90 #include <linux/types.h>
91 #include <linux/major.h>
92 #include <linux/raid/md_p.h>
diff --git a/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch b/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch
deleted file mode 100644
index 6ec2363ae3..0000000000
--- a/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From f30c692c1f9ef0e93bee2b408a24baa017f1ca9d Mon Sep 17 00:00:00 2001
2From: Vladimir Serbinenko <phcoder@gmail.com>
3Date: Thu, 7 Nov 2013 01:01:47 +0100
4Subject: [PATCH] * grub-core/gettext/gettext.c (main_context),
5 (secondary_context): Define after defining type and not before.
6
7---
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Upstream-Status: Backport
10
11 ChangeLog | 5 +++++
12 grub-core/gettext/gettext.c | 4 ++--
13 2 files changed, 7 insertions(+), 2 deletions(-)
14
15diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
16index df73570..4880cef 100644
17--- a/grub-core/gettext/gettext.c
18+++ b/grub-core/gettext/gettext.c
19@@ -34,8 +34,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
20 http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
21 */
22
23-static struct grub_gettext_context main_context, secondary_context;
24-
25 static const char *(*grub_gettext_original) (const char *s);
26
27 struct grub_gettext_msg
28@@ -69,6 +67,8 @@ struct grub_gettext_context
29 struct grub_gettext_msg *grub_gettext_msg_list;
30 };
31
32+static struct grub_gettext_context main_context, secondary_context;
33+
34 #define MO_MAGIC_NUMBER 0x950412de
35
36 static grub_err_t
37--
381.9.1
39
diff --git a/meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch b/meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
deleted file mode 100644
index abf08e16c9..0000000000
--- a/meta/recipes-bsp/grub/files/0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1From b258761d11946b28a847dff0768c3f271e13d60a Mon Sep 17 00:00:00 2001
2From: Awais Belal <awais_belal@mentor.com>
3Date: Thu, 8 Dec 2016 18:21:12 +0500
4Subject: [PATCH 1/2] * grub-core/kern/efi/mm.c
5 (grub_efi_finish_boot_services): Try terminating EFI services several times
6 due to quirks in some implementations.
7
8Upstream-status: Backport [ http://git.savannah.gnu.org/cgit/grub.git/patch/?id=e75fdee420a7ad95e9a465c9699adc2e2e970440 ]
9
10Signed-off-by: Awais Belal <awais_belal@mentor.com>
11---
12 grub-core/kern/efi/mm.c | 46 ++++++++++++++++++++++++++++++----------------
13 1 file changed, 30 insertions(+), 16 deletions(-)
14
15diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
16index 461deb0..b00e0bc 100644
17--- a/grub-core/kern/efi/mm.c
18+++ b/grub-core/kern/efi/mm.c
19@@ -167,27 +167,41 @@ grub_efi_finish_boot_services (grub_efi_uintn_t *outbuf_size, void *outbuf,
20 apple, sizeof (apple)) == 0);
21 #endif
22
23- if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
24- &finish_desc_size, &finish_desc_version) < 0)
25- return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
26+ while (1)
27+ {
28+ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
29+ &finish_desc_size, &finish_desc_version) < 0)
30+ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
31
32- if (outbuf && *outbuf_size < finish_mmap_size)
33- return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
34+ if (outbuf && *outbuf_size < finish_mmap_size)
35+ return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
36
37- finish_mmap_buf = grub_malloc (finish_mmap_size);
38- if (!finish_mmap_buf)
39- return grub_errno;
40+ finish_mmap_buf = grub_malloc (finish_mmap_size);
41+ if (!finish_mmap_buf)
42+ return grub_errno;
43
44- if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
45- &finish_desc_size, &finish_desc_version) <= 0)
46- return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
47+ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
48+ &finish_desc_size, &finish_desc_version) <= 0)
49+ {
50+ grub_free (finish_mmap_buf);
51+ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
52+ }
53
54- b = grub_efi_system_table->boot_services;
55- status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
56- finish_key);
57- if (status != GRUB_EFI_SUCCESS)
58- return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
59+ b = grub_efi_system_table->boot_services;
60+ status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
61+ finish_key);
62+ if (status == GRUB_EFI_SUCCESS)
63+ break;
64
65+ if (status != GRUB_EFI_INVALID_PARAMETER)
66+ {
67+ grub_free (finish_mmap_buf);
68+ return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
69+ }
70+
71+ grub_free (finish_mmap_buf);
72+ grub_printf ("Trying to terminate EFI services again\n");
73+ }
74 grub_efi_is_finished = 1;
75 if (outbuf_size)
76 *outbuf_size = finish_mmap_size;
77--
781.9.1
79
diff --git a/meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch b/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
index d5bfaa177a..d5bfaa177a 100644
--- a/meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
+++ b/meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
diff --git a/meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch b/meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch
deleted file mode 100644
index 255e3eb7d6..0000000000
--- a/meta/recipes-bsp/grub/files/0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1Upstream-Status: Backport
2
3Original commit: http://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/net/bootp.c?id=f06c2172c0b32052f22e37523445cf8e7affaea3
4
5From 149d2a14f4723778ced23f439487201ccbf1a2c9 Mon Sep 17 00:00:00 2001
6From: Khem Raj <raj.khem@gmail.com>
7Date: Thu, 23 Apr 2015 07:03:34 +0000
8Subject: [PATCH] parse_dhcp_vendor: Add missing const qualifiers.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 grub-core/net/bootp.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
16index bc07d53..44131ed 100644
17--- a/grub-core/net/bootp.c
18+++ b/grub-core/net/bootp.c
19@@ -52,9 +52,9 @@ set_env_limn_ro (const char *intername, const char *suffix,
20 }
21
22 static void
23-parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
24+parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask)
25 {
26- grub_uint8_t *ptr, *ptr0;
27+ const grub_uint8_t *ptr, *ptr0;
28
29 ptr = ptr0 = vend;
30
31--
322.1.4
33
diff --git a/meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch b/meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch
deleted file mode 100644
index 0e735ffcdc..0000000000
--- a/meta/recipes-bsp/grub/files/0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 630de45f3d5f9a2dda7fad99acd21449b8c4111d Mon Sep 17 00:00:00 2001
2From: Awais Belal <awais_belal@mentor.com>
3Date: Thu, 8 Dec 2016 18:27:01 +0500
4Subject: [PATCH 2/2] * grub-core/kern/efi/mm.c (grub_efi_get_memory_map):
5 Never return a descriptor_size==0 to avoid potential divisions by zero.
6
7Upstream-status: Backport [ http://git.savannah.gnu.org/cgit/grub.git/commit/?id=69aee43fa64601cabf6efa9279c10d69b466662e ]
8
9Signed-off-by: Awais Belal <awais_belal@mentor.com>
10---
11 grub-core/kern/efi/mm.c | 5 +++++
12 1 file changed, 5 insertions(+)
13
14diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
15index b00e0bc..9f1d194 100644
16--- a/grub-core/kern/efi/mm.c
17+++ b/grub-core/kern/efi/mm.c
18@@ -235,6 +235,7 @@ grub_efi_get_memory_map (grub_efi_uintn_t *memory_map_size,
19 grub_efi_boot_services_t *b;
20 grub_efi_uintn_t key;
21 grub_efi_uint32_t version;
22+ grub_efi_uintn_t size;
23
24 if (grub_efi_is_finished)
25 {
26@@ -264,10 +265,14 @@ grub_efi_get_memory_map (grub_efi_uintn_t *memory_map_size,
27 map_key = &key;
28 if (! descriptor_version)
29 descriptor_version = &version;
30+ if (! descriptor_size)
31+ descriptor_size = &size;
32
33 b = grub_efi_system_table->boot_services;
34 status = efi_call_5 (b->get_memory_map, memory_map_size, memory_map, map_key,
35 descriptor_size, descriptor_version);
36+ if (*descriptor_size == 0)
37+ *descriptor_size = sizeof (grub_efi_memory_descriptor_t);
38 if (status == GRUB_EFI_SUCCESS)
39 return 1;
40 else if (status == GRUB_EFI_BUFFER_TOO_SMALL)
41--
421.9.1
43
diff --git a/meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch b/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
index fc5aa4e313..fc5aa4e313 100644
--- a/meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch
+++ b/meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
diff --git a/meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch b/meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch
deleted file mode 100644
index 0eece082f8..0000000000
--- a/meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1Disable liblzma if --enable-liblzma=no
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
6
7--- a/configure.ac
8+++ b/configure.ac
9@@ -1029,10 +1029,20 @@ fi
10
11 AC_SUBST([LIBGEOM])
12
13-AC_CHECK_LIB([lzma], [lzma_code],
14- [LIBLZMA="-llzma"
15- AC_DEFINE([HAVE_LIBLZMA], [1],
16- [Define to 1 if you have the LZMA library.])],)
17+AC_ARG_ENABLE([liblzma],
18+ [AS_HELP_STRING([--enable-liblzma],
19+ [enable liblzma integration (default=guessed)])])
20+if test x"$enable_liblzma" = xno ; then
21+ liblzma_excuse="explicitly disabled"
22+fi
23+
24+if test x"$liblzma_excuse" = x ; then
25+ AC_CHECK_LIB([lzma], [lzma_code],
26+ [LIBLZMA="-llzma"
27+ AC_DEFINE([HAVE_LIBLZMA], [1],
28+ [Define to 1 if you have the LZMA library.])],)
29+fi
30+
31 AC_SUBST([LIBLZMA])
32
33 AC_ARG_ENABLE([libzfs],
diff --git a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
deleted file mode 100644
index 079992afba..0000000000
--- a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1grub-core/net/tftp.c: fix endianness problem.
2
3 * grub-core/net/tftp.c (ack): Fix endianness problem.
4 (tftp_receive): Likewise.
5 Reported by: Michael Davidsaver.
6
7Upstream-Status: Backport
8
9diff --git a/ChangeLog b/ChangeLog
10index 81bdae9..c2f42d5 100644
11--- a/ChangeLog
12+++ b/ChangeLog
13@@ -1,3 +1,9 @@
14+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
15+
16+ * grub-core/net/tftp.c (ack): Fix endianness problem.
17+ (tftp_receive): Likewise.
18+ Reported by: Michael Davidsaver.
19+
20 2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
21
22 * configure.ac: Bump version to 2.00.
23diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
24index 9c70efb..d0f39ea 100644
25--- a/grub-core/net/tftp.c
26+++ b/grub-core/net/tftp.c
27@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
28
29 tftph_ack = (struct tftphdr *) nb_ack.data;
30 tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
31- tftph_ack->u.ack.block = block;
32+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
33
34 err = grub_net_send_udp_packet (data->sock, &nb_ack);
35 if (err)
36@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
37 grub_priority_queue_pop (data->pq);
38
39 if (file->device->net->packs.count < 50)
40- err = ack (data, tftph->u.data.block);
41+ err = ack (data, data->block + 1);
42 else
43 {
44 file->device->net->stall = 1;
diff --git a/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch b/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch
deleted file mode 100644
index 61ae2f5372..0000000000
--- a/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1Upstream-Status: Backport
2
3This fixes compilation issues when using flex-2.5.37. It was taken from upstream.
4
5Original author is: Vladimir Serbinenko <phcoder@gmail.com>
6
7Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
8
9Index: grub-2.00/grub-core/script/yylex.l
10===================================================================
11--- grub-2.00.orig/grub-core/script/yylex.l 2012-06-08 23:24:15.000000000 +0300
12+++ grub-2.00/grub-core/script/yylex.l 2013-07-31 14:34:40.708100982 +0300
13@@ -29,6 +29,8 @@
14 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
15 #pragma GCC diagnostic ignored "-Wmissing-declarations"
16 #pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
17+#pragma GCC diagnostic ignored "-Wunused-function"
18+#pragma GCC diagnostic ignored "-Wsign-compare"
19
20 #define yyfree grub_lexer_yyfree
21 #define yyalloc grub_lexer_yyalloc
diff --git a/meta/recipes-bsp/grub/files/fix-texinfo.patch b/meta/recipes-bsp/grub/files/fix-texinfo.patch
deleted file mode 100644
index b911d7370b..0000000000
--- a/meta/recipes-bsp/grub/files/fix-texinfo.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1The tarball has a texi file that doesn't parse with current texinfo, so if it's
2being re-generated the build will fail. Take a patch from upstream to fix the
3texi.
4
5Upstream-Status: Backport
6Signed-off-by: Ross Burton <ross.burton@intel.com>
7
8From d4c4b8e1a085f92afcec36f6e590c6dfc51d0a1c Mon Sep 17 00:00:00 2001
9From: Bryan Hundven <bryanhundven@gmail.com>
10Date: Mon, 08 Apr 2013 13:23:07 +0000
11Subject: * docs/grub-dev.texi: Move @itemize after @subsection to satisfy
12
13 texinfo-5.1.
14---
15(limited to 'docs/grub-dev.texi')
16
17diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
18index a4a3820..f74c966 100644
19--- a/docs/grub-dev.texi
20+++ b/docs/grub-dev.texi
21@@ -1394,8 +1394,8 @@ grub_video_blit_glyph (&glyph, color, 0, 0);
22
23 @node Bitmap API
24 @section Bitmap API
25-@itemize
26 @subsection grub_video_bitmap_create
27+@itemize
28 @item Prototype:
29 @example
30 grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap, unsigned int width, unsigned int height, enum grub_video_blit_format blit_format)
31--
32cgit v0.9.0.2
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch b/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch
deleted file mode 100644
index eb8916cb72..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From 7ab576a7c61406b7e63739d1b11017ae336b9008 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Mon, 3 Mar 2014 03:34:48 -0500
4Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name
5
6Our kernel's name is bzImage, we need add it to grub.d/10_linux.in so
7that the grub-mkconfig and grub-install can work correctly.
8
9We only need add the bzImage to util/grub.d/10_linux.in, but also add it
10to util/grub.d/20_linux_xen.in to keep compatibility.
11
12Upstream-Status: Inappropriate [OE specific]
13
14Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
15---
16 util/grub.d/10_linux.in | 4 ++--
17 util/grub.d/20_linux_xen.in | 2 +-
18 2 files changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
21index 14402e8..c58f417 100644
22--- a/util/grub.d/10_linux.in
23+++ b/util/grub.d/10_linux.in
24@@ -153,11 +153,11 @@ EOF
25 machine=`uname -m`
26 case "x$machine" in
27 xi?86 | xx86_64)
28- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
29+ list=`for i in /boot/bzImage-* /bzImage-* /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
30 if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
31 done` ;;
32 *)
33- list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
34+ list=`for i in /boot/bzImage-* /boot/vmlinuz-* /boot/vmlinux-* /bzImage-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
35 if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
36 done` ;;
37 esac
38diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
39index 1d94502..b2decf3 100644
40--- a/util/grub.d/20_linux_xen.in
41+++ b/util/grub.d/20_linux_xen.in
42@@ -138,7 +138,7 @@ EOF
43 EOF
44 }
45
46-linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
47+linux_list=`for i in /boot/bzImage[xz]-* /bzImage[xz]-* /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
48 if grub_file_is_not_garbage "$i"; then
49 basename=$(basename $i)
50 version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
51--
521.7.10.4
53
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch b/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch
deleted file mode 100644
index 1ff3c1ca09..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1Upstream-Status: Pending
2
3
4This patch avoids this configure failure
5
6configure:20306: checking whether `ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow' generates calls to `__enable_execute_stack()'
7configure:20320: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387 -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -falign-loops=1 -S conftest.c
8conftest.c:308:6: error: no previous prototype for 'g' [-Werror=missing-prototypes]
9cc1: all warnings being treated as errors
10configure:20323: $? = 1
11configure:20327: error: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow failed to produce assembly code
12
13Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
142012/04/13
15
16Index: grub-2.00/acinclude.m4
17===================================================================
18--- grub-2.00.orig/acinclude.m4
19+++ grub-2.00/acinclude.m4
20@@ -317,6 +317,7 @@ dnl Check if the C compiler generates ca
21 AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[
22 AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()'])
23 AC_LANG_CONFTEST([AC_LANG_SOURCE([[
24+void g (int);
25 void f (int (*p) (void));
26 void g (int i)
27 {
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch b/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch
deleted file mode 100644
index dd30d94b75..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1Upstream-Status: pending
2
3This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters.
4
5configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100 -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
6conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
7cc1: all warnings being treated as errors
8
9Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/04/13
11
12Index: grub-1.99/configure.ac
13===================================================================
14--- grub-1.99.orig/configure.ac
15+++ grub-1.99/configure.ac
16@@ -378,7 +378,7 @@ if test "x$target_cpu" = xi386; then
17
18 # Some toolchains enable these features by default, but they need
19 # registers that aren't set up properly in GRUB.
20- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
21+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
22 fi
23
24 # By default, GCC 4.4 generates .eh_frame sections containing unwind
diff --git a/meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch b/meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch
deleted file mode 100644
index 4588fca4ba..0000000000
--- a/meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch
+++ /dev/null
@@ -1,131 +0,0 @@
1Allow a compilation without -mcmodel=large
2
3It's provided by Vladimir Serbinenko, and he will commit
4it upstream so it should be backport patch.
5
6Upstream-Status: Backport
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9
10--
11diff --git a/configure.ac b/configure.ac
12index 9f8fb8a..2c5e6ed 100644
13--- a/configure.ac
14+++ b/configure.ac
15@@ -723,9 +723,7 @@ if test "$target_cpu" = x86_64; then
16 [grub_cv_cc_mcmodel=yes],
17 [grub_cv_cc_mcmodel=no])
18 ])
19- if test "x$grub_cv_cc_mcmodel" = xno; then
20- AC_MSG_ERROR([-mcmodel=large not supported. Upgrade your gcc.])
21- else
22+ if test "x$grub_cv_cc_mcmodel" = xyes; then
23 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
24 fi
25 fi
26diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
27index 1409b5d..6e9dace 100644
28--- a/grub-core/kern/efi/mm.c
29+++ b/grub-core/kern/efi/mm.c
30@@ -32,6 +32,12 @@
31 #define BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> 12)
32 #define PAGES_TO_BYTES(pages) ((pages) << 12)
33
34+#if defined (__code_model_large__) || !defined (__x86_64__)
35+#define MAX_USABLE_ADDRESS 0xffffffff
36+#else
37+#define MAX_USABLE_ADDRESS 0x7fffffff
38+#endif
39+
40 /* The size of a memory map obtained from the firmware. This must be
41 a multiplier of 4KB. */
42 #define MEMORY_MAP_SIZE 0x3000
43@@ -58,7 +64,7 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address,
44
45 #if 1
46 /* Limit the memory access to less than 4GB for 32-bit platforms. */
47- if (address > 0xffffffff)
48+ if (address > MAX_USABLE_ADDRESS)
49 return 0;
50 #endif
51
52@@ -66,7 +72,7 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address,
53 if (address == 0)
54 {
55 type = GRUB_EFI_ALLOCATE_MAX_ADDRESS;
56- address = 0xffffffff;
57+ address = MAX_USABLE_ADDRESS;
58 }
59 else
60 type = GRUB_EFI_ALLOCATE_ADDRESS;
61@@ -86,7 +92,7 @@ grub_efi_allocate_pages (grub_efi_physical_address_t address,
62 {
63 /* Uggh, the address 0 was allocated... This is too annoying,
64 so reallocate another one. */
65- address = 0xffffffff;
66+ address = MAX_USABLE_ADDRESS;
67 status = efi_call_4 (b->allocate_pages, type, GRUB_EFI_LOADER_DATA, pages, &address);
68 grub_efi_free_pages (0, pages);
69 if (status != GRUB_EFI_SUCCESS)
70@@ -319,7 +325,7 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
71 {
72 if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY
73 #if 1
74- && desc->physical_start <= 0xffffffff
75+ && desc->physical_start <= MAX_USABLE_ADDRESS
76 #endif
77 && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000
78 && desc->num_pages != 0)
79@@ -337,9 +343,9 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
80 #if 1
81 if (BYTES_TO_PAGES (filtered_desc->physical_start)
82 + filtered_desc->num_pages
83- > BYTES_TO_PAGES (0x100000000LL))
84+ > BYTES_TO_PAGES (MAX_USABLE_ADDRESS+1LL))
85 filtered_desc->num_pages
86- = (BYTES_TO_PAGES (0x100000000LL)
87+ = (BYTES_TO_PAGES (MAX_USABLE_ADDRESS+1LL)
88 - BYTES_TO_PAGES (filtered_desc->physical_start));
89 #endif
90
91diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
92index 65f09ef..17c1215 100644
93--- a/grub-core/kern/x86_64/dl.c
94+++ b/grub-core/kern/x86_64/dl.c
95@@ -100,14 +100,32 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
96 break;
97
98 case R_X86_64_PC32:
99- *addr32 += rel->r_addend + sym->st_value -
100- (Elf64_Xword) seg->addr - rel->r_offset;
101+ {
102+ grub_int64_t value;
103+ value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
104+ (Elf64_Xword) seg->addr - rel->r_offset;
105+ if (value != (grub_int32_t) value)
106+ return grub_error (GRUB_ERR_BAD_MODULE, "relocation out of range");
107+ *addr32 = value;
108+ }
109 break;
110
111 case R_X86_64_32:
112+ {
113+ grub_uint64_t value = *addr32 + rel->r_addend + sym->st_value;
114+ if (value != (grub_uint32_t) value)
115+ return grub_error (GRUB_ERR_BAD_MODULE, "relocation out of range");
116+ *addr32 = value;
117+ }
118+ break;
119 case R_X86_64_32S:
120- *addr32 += rel->r_addend + sym->st_value;
121- break;
122+ {
123+ grub_int64_t value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value;
124+ if (value != (grub_int32_t) value)
125+ return grub_error (GRUB_ERR_BAD_MODULE, "relocation out of range");
126+ *addr32 = value;
127+ }
128+ break;
129
130 default:
131 return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
diff --git a/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch b/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch
deleted file mode 100644
index 4f12628a4b..0000000000
--- a/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From eb6368e65f6988eebad26cebdec057f797bceb40 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Tue, 9 Sep 2014 00:02:30 -0700
4Subject: [PATCH] Fix build with glibc 2.20
5
6* grub-core/kern/emu/hostfs.c: squahes below warning
7 warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
8
9Upstream-Status: Submitted
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
13---
14 grub-core/kern/emu/hostfs.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c
18index 3cb089c..a51ee32 100644
19--- a/grub-core/kern/emu/hostfs.c
20+++ b/grub-core/kern/emu/hostfs.c
21@@ -16,7 +16,7 @@
22 * You should have received a copy of the GNU General Public License
23 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
24 */
25-#define _BSD_SOURCE
26+#define _DEFAULT_SOURCE
27 #include <grub/fs.h>
28 #include <grub/file.h>
29 #include <grub/disk.h>
30--
311.7.9.5
32
diff --git a/meta/recipes-bsp/grub/files/grub-install.in.patch b/meta/recipes-bsp/grub/files/grub-install.in.patch
deleted file mode 100644
index 326951df44..0000000000
--- a/meta/recipes-bsp/grub/files/grub-install.in.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Our use of grub-install doesn't require the -x option, so we should be
4be able make use of grep versions that don't support it.
5
6Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
7
8Index: grub-1.99/util/grub-install.in
9===================================================================
10--- grub-1.99.orig/util/grub-install.in 2011-09-09 22:37:20.093906679 -0500
11+++ grub-1.99/util/grub-install.in 2011-09-09 22:37:30.854737882 -0500
12@@ -510,7 +510,7 @@
13
14 if [ "x${devabstraction_module}" = "x" ] ; then
15 if [ x"${install_device}" != x ]; then
16- if echo "${install_device}" | grep -qx "(.*)" ; then
17+ if echo "${install_device}" | grep -q "(.*)" ; then
18 install_drive="${install_device}"
19 else
20 install_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${install_device}"`" || exit 1
diff --git a/meta/recipes-bsp/grub/files/grub-no-unused-result.patch b/meta/recipes-bsp/grub/files/grub-no-unused-result.patch
deleted file mode 100644
index 4cbd0838d1..0000000000
--- a/meta/recipes-bsp/grub/files/grub-no-unused-result.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1Signed-off-by: Radu Moisan <radu.moisan@intel.com>
2Upstream-Status: Pending
3
4I had an error because of an unused return value for read().
5I added -Wno-unused-result.
6
7Index: grub-2.00/configure.ac
8===================================================================
9--- grub-2.00.orig/configure.ac 2012-08-13 16:32:33.000000000 +0300
10+++ grub-2.00/configure.ac 2012-08-13 16:38:22.000000000 +0300
11@@ -394,7 +394,7 @@
12 LIBS=""
13
14 # debug flags.
15-WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
16+WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wno-unused-result -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
17 HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS"
18 TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
19 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
diff --git a/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch b/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch
deleted file mode 100644
index d114f4847b..0000000000
--- a/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 8fbb150a56966edde4dc07b8d01be5eb149b65ab Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Sun, 20 Jan 2013 23:03:35 +0000
4Subject: [PATCH 1/1] * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't
5 add the initrd size to addr_min, since the initrd will be allocated after
6 this address.
7
8commit 6a0debbd9167e8f79cdef5497a73d23e580c0cd4 upstream
9
10Upstream-Status: Backport
11
12Signed-off-by: Shan Hai <shan.hai@windriver.com>
13---
14 ChangeLog | 6 ++++++
15 grub-core/loader/i386/linux.c | 3 +--
16 2 files changed, 7 insertions(+), 2 deletions(-)
17
18diff --git a/ChangeLog b/ChangeLog
19index c2f42d5..40cb508 100644
20--- a/ChangeLog
21+++ b/ChangeLog
22@@ -1,3 +1,9 @@
23+2013-01-20 Colin Watson <cjwatson@ubuntu.com>
24+
25+ * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the
26+ initrd size to addr_min, since the initrd will be allocated after
27+ this address.
28+
29 2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
30
31 * grub-core/net/tftp.c (ack): Fix endianness problem.
32diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
33index 62087cf..e2425c8 100644
34--- a/grub-core/loader/i386/linux.c
35+++ b/grub-core/loader/i386/linux.c
36@@ -1098,8 +1098,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
37 worse than that of Linux 2.3.xx, so avoid the last 64kb. */
38 addr_max -= 0x10000;
39
40- addr_min = (grub_addr_t) prot_mode_target + prot_init_space
41- + page_align (size);
42+ addr_min = (grub_addr_t) prot_mode_target + prot_init_space;
43
44 /* Put the initrd as high as possible, 4KiB aligned. */
45 addr = (addr_max - size) & ~0xFFF;
46--
471.8.5.2.233.g932f7e4
48
diff --git a/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
deleted file mode 100644
index 5168d3ca56..0000000000
--- a/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1Subject: [PATCH] grub2: remove grub-sparc64-setup from x86 builds
2
3* remove the grub-sparc64-setup files from the x86 builds.
4
5Upstream-Status: Inappropriate [embedded specific]
6
7Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
8Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
9---
10 Makefile.util.def | 18 ------------------
11 1 file changed, 18 deletions(-)
12
13diff --git a/Makefile.util.def b/Makefile.util.def
14index b80187c..a670cf2 100644
15--- a/Makefile.util.def
16+++ b/Makefile.util.def
17@@ -321,24 +321,6 @@ program = {
18 };
19
20 program = {
21- name = grub-sparc64-setup;
22- installdir = sbin;
23- mansection = 8;
24- common = util/grub-setup.c;
25- common = util/lvm.c;
26- common = grub-core/kern/emu/argp_common.c;
27- common = grub-core/lib/reed_solomon.c;
28- common = util/ieee1275/ofpath.c;
29-
30- ldadd = libgrubmods.a;
31- ldadd = libgrubkern.a;
32- ldadd = libgrubgcry.a;
33- ldadd = grub-core/gnulib/libgnu.a;
34- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
35- cppflags = '-DGRUB_SETUP_SPARC64=1';
36-};
37-
38-program = {
39 name = grub-ofpathname;
40 installdir = sbin;
41 mansection = 8;
42--
432.8.1
44
diff --git a/meta/recipes-bsp/grub/files/remove-gets.patch b/meta/recipes-bsp/grub/files/remove-gets.patch
deleted file mode 100644
index 463f7847ad..0000000000
--- a/meta/recipes-bsp/grub/files/remove-gets.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4
5Upstream-Status: Pending
6Index: grub-1.99/grub-core/gnulib/stdio.in.h
7===================================================================
8--- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800
9+++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700
10@@ -140,8 +140,10 @@
11 /* It is very rare that the developer ever has full control of stdin,
12 so any use of gets warrants an unconditional warning. Assume it is
13 always declared, since it is required by C89. */
14+#if defined gets
15 #undef gets
16 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
17+#endif
18
19 #if @GNULIB_FOPEN@
20 # if @REPLACE_FOPEN@
diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index e12f1d773f..9d494d5d12 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -1,8 +1,9 @@
1require grub2.inc 1require grub2.inc
2 2
3GRUBPLATFORM = "efi"
4
3DEPENDS_class-target = "grub-efi-native" 5DEPENDS_class-target = "grub-efi-native"
4RDEPENDS_${PN}_class-target = "diffutils freetype" 6RDEPENDS_${PN}_class-target = "diffutils freetype"
5PR = "r3"
6 7
7SRC_URI += " \ 8SRC_URI += " \
8 file://cfg \ 9 file://cfg \
@@ -29,11 +30,7 @@ python __anonymous () {
29inherit deploy 30inherit deploy
30 31
31CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" 32CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
32EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ 33EXTRA_OECONF += "--enable-efiemu=no"
33 --enable-efiemu=no --program-prefix='' \
34 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no \
35 --enable-largefile \
36"
37 34
38# ldm.c:114:7: error: trampoline generated for nested function 'hook' [-Werror=trampolines] 35# ldm.c:114:7: error: trampoline generated for nested function 'hook' [-Werror=trampolines]
39# and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo) 36# and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo)
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index ef893b327f..bb6ebddf57 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -12,41 +12,37 @@ LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13 13
14SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 14SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
15 file://grub-module-explicitly-keeps-symbole-.module_license.patch \ 15 file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
16 file://grub-2.00-fpmath-sse-387-fix.patch \
17 file://check-if-liblzma-is-disabled.patch \
18 file://fix-issue-with-flex-2.5.37.patch \
19 file://grub-2.00-add-oe-kernel.patch \
20 file://grub-install.in.patch \
21 file://remove-gets.patch \
22 file://fix-endianness-problem.patch \
23 file://grub2-remove-sparc64-setup-from-x86-builds.patch \
24 file://grub-2.00-fix-enable_execute_stack-check.patch \
25 file://grub-no-unused-result.patch \
26 file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
27 file://grub-efi-fix-with-glibc-2.20.patch \
28 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ 16 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
29 file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \ 17 file://autogen.sh-exclude-pc.patch \
30 file://grub2-fix-initrd-size-bug.patch \ 18 file://grub-module-explicitly-keeps-symbole-.module_license.patch \
31 file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \ 19"
32 file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \ 20SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
33 file://fix-texinfo.patch \ 21SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
34 file://0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch \
35 file://0001-Enforce-no-pie-if-the-compiler-supports-it.patch \
36 file://0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch \
37 file://0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch \
38 file://0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch \
39 "
40 22
41DEPENDS = "flex-native bison-native autogen-native" 23DEPENDS = "flex-native bison-native autogen-native"
42 24
43SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" 25COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
44SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" 26COMPATIBLE_HOST_armv7a = 'null'
27COMPATIBLE_HOST_armv7ve = 'null'
45 28
46COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' 29# configure.ac has code to set this automagically from the target tuple
30# but the OE freeform one (core2-foo-bar-linux) don't work with that.
31
32GRUBPLATFORM_arm = "uboot"
33GRUBPLATFORM_aarch64 = "efi"
34GRUBPLATFORM ??= "pc"
47 35
48inherit autotools gettext texinfo 36inherit autotools gettext texinfo
49 37
38EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
39 --disable-grub-mkfont \
40 --program-prefix="" \
41 --enable-liblzma=no \
42 --enable-libzfs=no \
43 --enable-largefile \
44"
45
50PACKAGECONFIG ??= "" 46PACKAGECONFIG ??= ""
51PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" 47PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
52PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2" 48PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.02.bb
index c3829381ae..57c6559365 100644
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/meta/recipes-bsp/grub/grub_2.02.bb
@@ -1,12 +1,6 @@
1require grub2.inc 1require grub2.inc
2 2
3RDEPENDS_${PN} = "diffutils freetype grub-editenv" 3RDEPENDS_${PN} = "diffutils freetype grub-editenv"
4PR = "r1"
5
6EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
7 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no \
8 --enable-largefile \
9"
10 4
11PACKAGES =+ "grub-editenv" 5PACKAGES =+ "grub-editenv"
12 6
diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
deleted file mode 100644
index 0a81e530f4..0000000000
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ /dev/null
@@ -1,45 +0,0 @@
1require grub2.inc
2
3DEFAULT_PREFERENCE = "-1"
4DEFAULT_PREFERENCE_arm = "1"
5
6FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"
7
8PV = "2.00+${SRCPV}"
9SRCREV = "ce95549cc54b5d6f494608a7c390dba3aab4fba7"
10SRC_URI = "git://git.savannah.gnu.org/grub.git \
11 file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
12 file://autogen.sh-exclude-pc.patch \
13 file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
14 "
15
16S = "${WORKDIR}/git"
17
18COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
19COMPATIBLE_HOST_armv7a = 'null'
20COMPATIBLE_HOST_armv7ve = 'null'
21
22# configure.ac has code to set this automagically from the target tuple
23# but the OE freeform one (core2-foo-bar-linux) don't work with that.
24
25GRUBPLATFORM_arm = "uboot"
26GRUBPLATFORM_aarch64 = "efi"
27GRUBPLATFORM ??= "pc"
28
29EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \
30 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no \
31 --enable-largefile \
32"
33
34do_install_append () {
35 install -d ${D}${sysconfdir}/grub.d
36 rm -rf ${D}${libdir}/charset.alias
37}
38
39# debugedit chokes on bare metal binaries
40INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
41
42RDEPENDS_${PN} = "diffutils freetype"
43
44INSANE_SKIP_${PN} = "arch"
45INSANE_SKIP_${PN}-dbg = "arch"