diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-bsp/grub | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-bsp/grub')
25 files changed, 1133 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch b/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch new file mode 100644 index 0000000000..46aaa97cf2 --- /dev/null +++ b/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 275fe0269ecc00af4788afaf9dc151a50b25645b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 28 Aug 2014 19:26:14 -0700 | ||
4 | Subject: [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 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Submitted | ||
12 | |||
13 | --- | ||
14 | grub-core/kern/emu/hostfs.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c | ||
18 | index 7e725f6..8dd8e65 100644 | ||
19 | --- a/grub-core/kern/emu/hostfs.c | ||
20 | +++ b/grub-core/kern/emu/hostfs.c | ||
21 | @@ -19,7 +19,7 @@ | ||
22 | |||
23 | #include <config-util.h> | ||
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 | -- | ||
31 | 2.1.0 | ||
32 | |||
diff --git a/meta/recipes-bsp/grub/files/cfg b/meta/recipes-bsp/grub/files/cfg new file mode 100644 index 0000000000..ffffe47638 --- /dev/null +++ b/meta/recipes-bsp/grub/files/cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | search.file /EFI/BOOT/grub.cfg root | ||
2 | set prefix=($root)/EFI/BOOT | ||
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 new file mode 100644 index 0000000000..0eece082f8 --- /dev/null +++ b/meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Disable liblzma if --enable-liblzma=no | ||
2 | |||
3 | Upstream-Status: Inappropriate [configuration] | ||
4 | |||
5 | Signed-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-issue-with-flex-2.5.37.patch b/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch new file mode 100644 index 0000000000..61ae2f5372 --- /dev/null +++ b/meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | This fixes compilation issues when using flex-2.5.37. It was taken from upstream. | ||
4 | |||
5 | Original author is: Vladimir Serbinenko <phcoder@gmail.com> | ||
6 | |||
7 | Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> | ||
8 | |||
9 | Index: 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/grub-2.00-add-oe-kernel.patch b/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch new file mode 100644 index 0000000000..eb8916cb72 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-2.00-add-oe-kernel.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 7ab576a7c61406b7e63739d1b11017ae336b9008 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Mon, 3 Mar 2014 03:34:48 -0500 | ||
4 | Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name | ||
5 | |||
6 | Our kernel's name is bzImage, we need add it to grub.d/10_linux.in so | ||
7 | that the grub-mkconfig and grub-install can work correctly. | ||
8 | |||
9 | We only need add the bzImage to util/grub.d/10_linux.in, but also add it | ||
10 | to util/grub.d/20_linux_xen.in to keep compatibility. | ||
11 | |||
12 | Upstream-Status: Inappropriate [OE specific] | ||
13 | |||
14 | Signed-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 | |||
20 | diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in | ||
21 | index 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 | ||
38 | diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in | ||
39 | index 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 | -- | ||
52 | 1.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 new file mode 100644 index 0000000000..09ef4dbff9 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | |||
4 | This patch avoids this configure failure | ||
5 | |||
6 | configure: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()' | ||
7 | configure: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 | ||
8 | conftest.c:308:6: error: no previous prototype for 'g' [-Werror=missing-prototypes] | ||
9 | cc1: all warnings being treated as errors | ||
10 | configure:20323: $? = 1 | ||
11 | configure: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 | |||
13 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
14 | 2012/04/13 | ||
15 | |||
16 | Index: 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 new file mode 100644 index 0000000000..c557f13e23 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Upstream-Status: pending | ||
2 | |||
3 | This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters. | ||
4 | |||
5 | configure: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 | ||
6 | conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror] | ||
7 | cc1: all warnings being treated as errors | ||
8 | |||
9 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
10 | 2012/04/13 | ||
11 | |||
12 | Index: 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-2.00-ignore-gnulib-gets-stupidity.patch b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch new file mode 100644 index 0000000000..70f60015c2 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Jones <pjones@redhat.com> | ||
3 | Date: Fri, 25 May 2012 15:28:19 -0400 | ||
4 | Subject: [PATCH] gnulib accused in build breaking shocker. | ||
5 | |||
6 | Upstream-Status: pending [Fedora will push this] | ||
7 | |||
8 | --- | ||
9 | grub-core/gnulib/stdio.in.h | 2 ++ | ||
10 | 1 file changed, 2 insertions(+) | ||
11 | |||
12 | diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h | ||
13 | index 80b9dbf..69932d9 100644 | ||
14 | --- a/grub-core/gnulib/stdio.in.h | ||
15 | +++ b/grub-core/gnulib/stdio.in.h | ||
16 | @@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " | ||
17 | so any use of gets warrants an unconditional warning. Assume it is | ||
18 | always declared, since it is required by C89. */ | ||
19 | #undef gets | ||
20 | +#if 0 | ||
21 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
22 | +#endif | ||
23 | |||
24 | #if @GNULIB_FOPEN@ | ||
25 | # if @REPLACE_FOPEN@ | ||
26 | -- | ||
27 | 1.7.10.1 | ||
28 | |||
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 new file mode 100644 index 0000000000..4588fca4ba --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-efi-allow-a-compilation-without-mcmodel-large.patch | |||
@@ -0,0 +1,131 @@ | |||
1 | Allow a compilation without -mcmodel=large | ||
2 | |||
3 | It's provided by Vladimir Serbinenko, and he will commit | ||
4 | it upstream so it should be backport patch. | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
9 | |||
10 | -- | ||
11 | diff --git a/configure.ac b/configure.ac | ||
12 | index 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 | ||
26 | diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c | ||
27 | index 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 | |||
91 | diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c | ||
92 | index 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 new file mode 100644 index 0000000000..4f12628a4b --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From eb6368e65f6988eebad26cebdec057f797bceb40 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Tue, 9 Sep 2014 00:02:30 -0700 | ||
4 | Subject: [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 | |||
9 | Upstream-Status: Submitted | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Signed-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 | |||
17 | diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c | ||
18 | index 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 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/meta/recipes-bsp/grub/files/grub-no-unused-result.patch b/meta/recipes-bsp/grub/files/grub-no-unused-result.patch new file mode 100644 index 0000000000..4cbd0838d1 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-no-unused-result.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Signed-off-by: Radu Moisan <radu.moisan@intel.com> | ||
2 | Upstream-Status: Pending | ||
3 | |||
4 | I had an error because of an unused return value for read(). | ||
5 | I added -Wno-unused-result. | ||
6 | |||
7 | Index: 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/grub-0.97/autohell.patch b/meta/recipes-bsp/grub/grub-0.97/autohell.patch new file mode 100644 index 0000000000..d66207ae6c --- /dev/null +++ b/meta/recipes-bsp/grub/grub-0.97/autohell.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | --- | ||
4 | configure.ac | 4 ++-- | ||
5 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
6 | |||
7 | Index: grub-0.97/configure.ac | ||
8 | =================================================================== | ||
9 | --- grub-0.97.orig/configure.ac 2008-09-12 17:39:52.000000000 +0200 | ||
10 | +++ grub-0.97/configure.ac 2008-09-12 17:40:21.000000000 +0200 | ||
11 | @@ -60,8 +60,8 @@ AC_PROG_CC | ||
12 | _AM_DEPENDENCIES(CC) | ||
13 | |||
14 | dnl Because recent automake complains about AS, set it here. | ||
15 | -CCAS="$CC" | ||
16 | -AC_SUBST(CCAS) | ||
17 | +AM_PROG_AS | ||
18 | +AC_SUBST(AS) | ||
19 | |||
20 | AC_ARG_WITH(binutils, | ||
21 | [ --with-binutils=DIR search the directory DIR to find binutils]) | ||
diff --git a/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch b/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch new file mode 100644 index 0000000000..d225d13dce --- /dev/null +++ b/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch | |||
@@ -0,0 +1,101 @@ | |||
1 | Upstream-Status: Inappropriate [No Longer Maintained] | ||
2 | |||
3 | diff -Naur grub-0.97-800/stage2/fsys_ext2fs.c grub-0.97-810/stage2/fsys_ext2fs.c | ||
4 | --- grub-0.97-800/stage2/fsys_ext2fs.c 2008-07-21 00:40:21.668879475 -0600 | ||
5 | +++ grub-0.97-810/stage2/fsys_ext2fs.c 2008-07-21 01:01:11.063953773 -0600 | ||
6 | @@ -79,7 +79,52 @@ | ||
7 | __u32 s_rev_level; /* Revision level */ | ||
8 | __u16 s_def_resuid; /* Default uid for reserved blocks */ | ||
9 | __u16 s_def_resgid; /* Default gid for reserved blocks */ | ||
10 | - __u32 s_reserved[235]; /* Padding to the end of the block */ | ||
11 | + /* | ||
12 | + * These fields are for EXT2_DYNAMIC_REV superblocks only. | ||
13 | + * | ||
14 | + * Note: the difference between the compatible feature set and | ||
15 | + * the incompatible feature set is that if there is a bit set | ||
16 | + * in the incompatible feature set that the kernel doesn't | ||
17 | + * know about, it should refuse to mount the filesystem. | ||
18 | + * | ||
19 | + * e2fsck's requirements are more strict; if it doesn't know | ||
20 | + * about a feature in either the compatible or incompatible | ||
21 | + * feature set, it must abort and not try to meddle with | ||
22 | + * things it doesn't understand... | ||
23 | + */ | ||
24 | + __u32 s_first_ino; /* First non-reserved inode */ | ||
25 | + __u16 s_inode_size; /* size of inode structure */ | ||
26 | + __u16 s_block_group_nr; /* block group # of this superblock */ | ||
27 | + __u32 s_feature_compat; /* compatible feature set */ | ||
28 | + __u32 s_feature_incompat; /* incompatible feature set */ | ||
29 | + __u32 s_feature_ro_compat; /* readonly-compatible feature set */ | ||
30 | + __u8 s_uuid[16]; /* 128-bit uuid for volume */ | ||
31 | + char s_volume_name[16]; /* volume name */ | ||
32 | + char s_last_mounted[64]; /* directory where last mounted */ | ||
33 | + __u32 s_algorithm_usage_bitmap; /* For compression */ | ||
34 | + /* | ||
35 | + * Performance hints. Directory preallocation should only | ||
36 | + * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on. | ||
37 | + */ | ||
38 | + __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ | ||
39 | + __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ | ||
40 | + __u16 s_reserved_gdt_blocks;/* Per group table for online growth */ | ||
41 | + /* | ||
42 | + * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set. | ||
43 | + */ | ||
44 | + __u8 s_journal_uuid[16]; /* uuid of journal superblock */ | ||
45 | + __u32 s_journal_inum; /* inode number of journal file */ | ||
46 | + __u32 s_journal_dev; /* device number of journal file */ | ||
47 | + __u32 s_last_orphan; /* start of list of inodes to delete */ | ||
48 | + __u32 s_hash_seed[4]; /* HTREE hash seed */ | ||
49 | + __u8 s_def_hash_version; /* Default hash version to use */ | ||
50 | + __u8 s_jnl_backup_type; /* Default type of journal backup */ | ||
51 | + __u16 s_reserved_word_pad; | ||
52 | + __u32 s_default_mount_opts; | ||
53 | + __u32 s_first_meta_bg; /* First metablock group */ | ||
54 | + __u32 s_mkfs_time; /* When the filesystem was created */ | ||
55 | + __u32 s_jnl_blocks[17]; /* Backup of the journal inode */ | ||
56 | + __u32 s_reserved[172]; /* Padding to the end of the block */ | ||
57 | }; | ||
58 | |||
59 | struct ext2_group_desc | ||
60 | @@ -218,6 +263,14 @@ | ||
61 | #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32)) | ||
62 | #define EXT2_ADDR_PER_BLOCK_BITS(s) (log2(EXT2_ADDR_PER_BLOCK(s))) | ||
63 | |||
64 | +#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */ | ||
65 | +#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */ | ||
66 | +#define EXT2_GOOD_OLD_INODE_SIZE 128 | ||
67 | +#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \ | ||
68 | + EXT2_GOOD_OLD_INODE_SIZE : \ | ||
69 | + (s)->s_inode_size) | ||
70 | +#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s)) | ||
71 | + | ||
72 | /* linux/ext2_fs.h */ | ||
73 | #define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10) | ||
74 | /* kind of from ext2/super.c */ | ||
75 | @@ -553,7 +606,7 @@ | ||
76 | gdp = GROUP_DESC; | ||
77 | ino_blk = gdp[desc].bg_inode_table + | ||
78 | (((current_ino - 1) % (SUPERBLOCK->s_inodes_per_group)) | ||
79 | - >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode))); | ||
80 | + >> log2 (EXT2_INODES_PER_BLOCK (SUPERBLOCK))); | ||
81 | #ifdef E2DEBUG | ||
82 | printf ("inode table fsblock=%d\n", ino_blk); | ||
83 | #endif /* E2DEBUG */ | ||
84 | @@ -565,13 +618,12 @@ | ||
85 | /* reset indirect blocks! */ | ||
86 | mapblock2 = mapblock1 = -1; | ||
87 | |||
88 | - raw_inode = INODE + | ||
89 | - ((current_ino - 1) | ||
90 | - & (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode) - 1)); | ||
91 | + raw_inode = (struct ext2_inode *)((char *)INODE + | ||
92 | + ((current_ino - 1) & (EXT2_INODES_PER_BLOCK (SUPERBLOCK) - 1)) * | ||
93 | + EXT2_INODE_SIZE (SUPERBLOCK)); | ||
94 | #ifdef E2DEBUG | ||
95 | printf ("ipb=%d, sizeof(inode)=%d\n", | ||
96 | - (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)), | ||
97 | - sizeof (struct ext2_inode)); | ||
98 | + EXT2_INODES_PER_BLOCK (SUPERBLOCK), EXT2_INODE_SIZE (SUPERBLOCK)); | ||
99 | printf ("inode=%x, raw_inode=%x\n", INODE, raw_inode); | ||
100 | printf ("offset into inode table block=%d\n", (int) raw_inode - (int) INODE); | ||
101 | for (i = (unsigned char *) INODE; i <= (unsigned char *) raw_inode; | ||
diff --git a/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch b/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..0cf7dc96d7 --- /dev/null +++ b/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | Upstream-Status: Inappropriate | ||
2 | |||
3 | Subject: [PATCH] grub: fix for automake-1.12 | ||
4 | |||
5 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
6 | |||
7 | this patch avoids these kinds of errors: | ||
8 | |||
9 | | stage1/Makefile.am:2: error: 'pkglibdir' is not a legitimate directory for 'DATA' | ||
10 | | stage2/Makefile.am:35: error: 'pkglibdir' is not a legitimate directory for 'DATA' | ||
11 | | stage2/Makefile.am:46: error: 'pkglibdir' is not a legitimate directory for 'DATA' | ||
12 | | autoreconf: automake failed with exit status: 1 | ||
13 | | ERROR: autoreconf execution failed. | ||
14 | |||
15 | The upstream status is marked as 'Inappropriate' because this problem is not uncommon, | ||
16 | it has been there for a long time and no change in upstream. | ||
17 | |||
18 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
19 | |||
20 | Index: grub-0.97/stage1/Makefile.am | ||
21 | =================================================================== | ||
22 | --- a/stage1/Makefile.am | ||
23 | +++ b/stage1/Makefile.am | ||
24 | @@ -1,7 +1,7 @@ | ||
25 | -pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor) | ||
26 | -nodist_pkglib_DATA = stage1 | ||
27 | +pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor) | ||
28 | +nodist_pkgdata_DATA = stage1 | ||
29 | |||
30 | -CLEANFILES = $(nodist_pkglib_DATA) | ||
31 | +CLEANFILES = $(nodist_pkgdata_DATA) | ||
32 | |||
33 | # We can't use builtins or standard includes. | ||
34 | AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc | ||
35 | Index: grub-0.97/stage2/Makefile.am | ||
36 | =================================================================== | ||
37 | --- a/stage2/Makefile.am | ||
38 | +++ b/stage2/Makefile.am | ||
39 | @@ -27,12 +27,12 @@ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \ | ||
40 | -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 | ||
41 | |||
42 | # Stage 2 and Stage 1.5's. | ||
43 | -pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor) | ||
44 | +pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor) | ||
45 | |||
46 | EXTRA_PROGRAMS = nbloader.exec pxeloader.exec diskless.exec | ||
47 | |||
48 | if DISKLESS_SUPPORT | ||
49 | -pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \ | ||
50 | +pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \ | ||
51 | ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \ | ||
52 | reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 \ | ||
53 | nbgrub pxegrub | ||
54 | @@ -43,7 +43,7 @@ noinst_PROGRAMS = pre_stage2.exec start.exec start_eltorito.exec \ | ||
55 | reiserfs_stage1_5.exec ufs2_stage1_5.exec vstafs_stage1_5.exec \ | ||
56 | xfs_stage1_5.exec nbloader.exec pxeloader.exec diskless.exec | ||
57 | else | ||
58 | -pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \ | ||
59 | +pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \ | ||
60 | ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \ | ||
61 | reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 | ||
62 | noinst_DATA = pre_stage2 start start_eltorito | ||
63 | @@ -105,7 +105,7 @@ else | ||
64 | BUILT_SOURCES = stage2_size.h | ||
65 | endif | ||
66 | |||
67 | -CLEANFILES = $(pkglib_DATA) $(noinst_DATA) $(BUILT_SOURCES) | ||
68 | +CLEANFILES = $(pkgdata_DATA) $(noinst_DATA) $(BUILT_SOURCES) | ||
69 | |||
70 | stage2_size.h: pre_stage2 | ||
71 | -rm -f stage2_size.h | ||
72 | -- | ||
73 | 1.7.9.5 | ||
74 | |||
diff --git a/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch b/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch new file mode 100644 index 0000000000..70037e47c7 --- /dev/null +++ b/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Inappropriate [disable feature] | ||
2 | |||
3 | After the commit "tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm", | ||
4 | we got bug 1099 (http://bugzilla.yoctoproject.org/show_bug.cgi?id=1099): | ||
5 | |||
6 | Running "install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0) | ||
7 | /boot/grub/stage2 p /boot/grub/menu list" failed | ||
8 | Error 6: Mismatched or corrupt version of stage1/stage2 | ||
9 | |||
10 | This turned out to be a gcc's bug. See | ||
11 | https://bugs.gentoo.org/show_bug.cgi?id=360513 | ||
12 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333 | ||
13 | |||
14 | Upstream gcc seems uninterested in the bug, so at present we can disable the | ||
15 | option as a workaround. Thanks Ryan Hill for the investigation and the | ||
16 | workaround patch. | ||
17 | |||
18 | Dexuan Cui <dexuan.cui@intel.com> | ||
19 | Wed Jun 29 20:21:39 CST 2011 | ||
20 | |||
21 | --- grub-0.97/stage2/Makefile.am.orig | ||
22 | +++ grub-0.97/stage2/Makefile.am | ||
23 | @@ -79,7 +79,7 @@ | ||
24 | HERCULES_FLAGS = | ||
25 | endif | ||
26 | |||
27 | -STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ | ||
28 | +STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \ | ||
29 | $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) | ||
30 | |||
31 | STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 | ||
diff --git a/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch b/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch new file mode 100644 index 0000000000..bd8e0a89fc --- /dev/null +++ b/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | |||
2 | This patch is from ubuntu: | ||
3 | * objcopy-absolute.diff (update): Remove .note, .comment, and | ||
4 | .note.gnu.build-id sections from images (LP: #444703). | ||
5 | |||
6 | Upstream-Status: Inappropriate [no longer maintained] | ||
7 | |||
8 | Index: b/acinclude.m4 | ||
9 | =================================================================== | ||
10 | --- a/acinclude.m4 | ||
11 | +++ b/acinclude.m4 | ||
12 | @@ -61,7 +61,7 @@ | ||
13 | else | ||
14 | AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr]) | ||
15 | fi | ||
16 | - if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then : | ||
17 | + if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then : | ||
18 | else | ||
19 | AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files]) | ||
20 | fi | ||
21 | Index: b/stage1/Makefile.am | ||
22 | =================================================================== | ||
23 | --- a/stage1/Makefile.am | ||
24 | +++ b/stage1/Makefile.am | ||
25 | @@ -12,4 +12,4 @@ | ||
26 | |||
27 | SUFFIXES = .exec | ||
28 | .exec: | ||
29 | - $(OBJCOPY) -O binary $< $@ | ||
30 | + $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@ | ||
31 | Index: b/stage2/Makefile.am | ||
32 | =================================================================== | ||
33 | --- a/stage2/Makefile.am | ||
34 | +++ b/stage2/Makefile.am | ||
35 | @@ -293,4 +293,4 @@ | ||
36 | # General rule for making a raw binary. | ||
37 | SUFFIXES = .exec | ||
38 | .exec: | ||
39 | - $(OBJCOPY) -O binary $< $@ | ||
40 | + $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@ | ||
diff --git a/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch b/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch new file mode 100644 index 0000000000..079992afba --- /dev/null +++ b/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | grub-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 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | diff --git a/ChangeLog b/ChangeLog | ||
10 | index 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. | ||
23 | diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c | ||
24 | index 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/grub-2.00/grub-install.in.patch b/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch new file mode 100644 index 0000000000..326951df44 --- /dev/null +++ b/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Our use of grub-install doesn't require the -x option, so we should be | ||
4 | be able make use of grep versions that don't support it. | ||
5 | |||
6 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
7 | |||
8 | Index: 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/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch b/meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch new file mode 100644 index 0000000000..6259a1abe3 --- /dev/null +++ b/meta/recipes-bsp/grub/grub-2.00/grub2-remove-sparc64-setup-from-x86-builds.patch | |||
@@ -0,0 +1,104 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | remove the grub-sparc64-setup files from the x86 builds. | ||
4 | |||
5 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
6 | |||
7 | --- a/Makefile.util.am 2014-08-15 11:41:02.441011278 -0700 | ||
8 | +++ b/Makefile.util.am 2014-08-15 11:44:26.245021142 -0700 | ||
9 | @@ -4692,9 +4692,9 @@ | ||
10 | endif | ||
11 | |||
12 | if COND_emu | ||
13 | -sbin_PROGRAMS += grub-sparc64-setup | ||
14 | +sbin_PROGRAMS += | ||
15 | if COND_MAN_PAGES | ||
16 | -man_MANS += grub-sparc64-setup.8 | ||
17 | +man_MANS += | ||
18 | |||
19 | grub-sparc64-setup.8: grub-sparc64-setup | ||
20 | chmod a+x grub-sparc64-setup | ||
21 | @@ -4715,9 +4715,9 @@ | ||
22 | endif | ||
23 | |||
24 | if COND_i386_pc | ||
25 | -sbin_PROGRAMS += grub-sparc64-setup | ||
26 | +sbin_PROGRAMS += | ||
27 | if COND_MAN_PAGES | ||
28 | -man_MANS += grub-sparc64-setup.8 | ||
29 | +man_MANS += | ||
30 | |||
31 | grub-sparc64-setup.8: grub-sparc64-setup | ||
32 | chmod a+x grub-sparc64-setup | ||
33 | @@ -4738,9 +4738,9 @@ | ||
34 | endif | ||
35 | |||
36 | if COND_i386_efi | ||
37 | -sbin_PROGRAMS += grub-sparc64-setup | ||
38 | +sbin_PROGRAMS += | ||
39 | if COND_MAN_PAGES | ||
40 | -man_MANS += grub-sparc64-setup.8 | ||
41 | +man_MANS += | ||
42 | |||
43 | grub-sparc64-setup.8: grub-sparc64-setup | ||
44 | chmod a+x grub-sparc64-setup | ||
45 | @@ -4761,9 +4761,9 @@ | ||
46 | endif | ||
47 | |||
48 | if COND_i386_qemu | ||
49 | -sbin_PROGRAMS += grub-sparc64-setup | ||
50 | +sbin_PROGRAMS += | ||
51 | if COND_MAN_PAGES | ||
52 | -man_MANS += grub-sparc64-setup.8 | ||
53 | +man_MANS += | ||
54 | |||
55 | grub-sparc64-setup.8: grub-sparc64-setup | ||
56 | chmod a+x grub-sparc64-setup | ||
57 | @@ -4784,9 +4784,9 @@ | ||
58 | endif | ||
59 | |||
60 | if COND_i386_coreboot | ||
61 | -sbin_PROGRAMS += grub-sparc64-setup | ||
62 | +sbin_PROGRAMS += | ||
63 | if COND_MAN_PAGES | ||
64 | -man_MANS += grub-sparc64-setup.8 | ||
65 | +man_MANS += | ||
66 | |||
67 | grub-sparc64-setup.8: grub-sparc64-setup | ||
68 | chmod a+x grub-sparc64-setup | ||
69 | @@ -4807,9 +4807,9 @@ | ||
70 | endif | ||
71 | |||
72 | if COND_i386_multiboot | ||
73 | -sbin_PROGRAMS += grub-sparc64-setup | ||
74 | +sbin_PROGRAMS += | ||
75 | if COND_MAN_PAGES | ||
76 | -man_MANS += grub-sparc64-setup.8 | ||
77 | +man_MANS += | ||
78 | |||
79 | grub-sparc64-setup.8: grub-sparc64-setup | ||
80 | chmod a+x grub-sparc64-setup | ||
81 | @@ -4830,9 +4830,9 @@ | ||
82 | endif | ||
83 | |||
84 | if COND_i386_ieee1275 | ||
85 | -sbin_PROGRAMS += grub-sparc64-setup | ||
86 | +sbin_PROGRAMS += | ||
87 | if COND_MAN_PAGES | ||
88 | -man_MANS += grub-sparc64-setup.8 | ||
89 | +man_MANS += | ||
90 | |||
91 | grub-sparc64-setup.8: grub-sparc64-setup | ||
92 | chmod a+x grub-sparc64-setup | ||
93 | @@ -4853,9 +4853,9 @@ | ||
94 | endif | ||
95 | |||
96 | if COND_x86_64_efi | ||
97 | -sbin_PROGRAMS += grub-sparc64-setup | ||
98 | +sbin_PROGRAMS += | ||
99 | if COND_MAN_PAGES | ||
100 | -man_MANS += grub-sparc64-setup.8 | ||
101 | +man_MANS += | ||
102 | |||
103 | grub-sparc64-setup.8: grub-sparc64-setup | ||
104 | chmod a+x grub-sparc64-setup | ||
diff --git a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch b/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch new file mode 100644 index 0000000000..463f7847ad --- /dev/null +++ b/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Index: 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.00.bb new file mode 100644 index 0000000000..d213f31a20 --- /dev/null +++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb | |||
@@ -0,0 +1,92 @@ | |||
1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" | ||
2 | |||
3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ | ||
4 | intended to unify bootloading across x86 operating systems. In \ | ||
5 | addition to loading the Linux kernel, it implements the Multiboot \ | ||
6 | standard, which allows for flexible loading of multiple boot images. \ | ||
7 | This recipe builds an EFI binary for the target. It does not install \ | ||
8 | or package anything, it only deploys a target-arch GRUB EFI image." | ||
9 | |||
10 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
11 | SECTION = "bootloaders" | ||
12 | |||
13 | LICENSE = "GPLv3" | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
15 | |||
16 | # FIXME: We should be able to optionally drop freetype as a dependency | ||
17 | DEPENDS = "autogen-native flex-native bison-native" | ||
18 | DEPENDS_class-target = "grub-efi-native" | ||
19 | PR = "r2" | ||
20 | |||
21 | SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ | ||
22 | file://cfg \ | ||
23 | file://grub-2.00-fpmath-sse-387-fix.patch \ | ||
24 | file://grub-2.00-fix-enable_execute_stack-check.patch \ | ||
25 | file://check-if-liblzma-is-disabled.patch \ | ||
26 | file://grub-no-unused-result.patch \ | ||
27 | file://grub-2.00-ignore-gnulib-gets-stupidity.patch \ | ||
28 | file://fix-issue-with-flex-2.5.37.patch \ | ||
29 | file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \ | ||
30 | file://grub-2.00-add-oe-kernel.patch \ | ||
31 | file://grub-efi-fix-with-glibc-2.20.patch \ | ||
32 | " | ||
33 | SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" | ||
34 | SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" | ||
35 | |||
36 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' | ||
37 | |||
38 | S = "${WORKDIR}/grub-${PV}" | ||
39 | |||
40 | # Determine the target arch for the grub modules | ||
41 | python __anonymous () { | ||
42 | import re | ||
43 | target = d.getVar('TARGET_ARCH', True) | ||
44 | if target == "x86_64": | ||
45 | grubtarget = 'x86_64' | ||
46 | grubimage = "bootx64.efi" | ||
47 | elif re.match('i.86', target): | ||
48 | grubtarget = 'i386' | ||
49 | grubimage = "bootia32.efi" | ||
50 | else: | ||
51 | raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target) | ||
52 | d.setVar("GRUB_TARGET", grubtarget) | ||
53 | d.setVar("GRUB_IMAGE", grubimage) | ||
54 | } | ||
55 | |||
56 | inherit autotools-brokensep gettext texinfo deploy | ||
57 | |||
58 | CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" | ||
59 | EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ | ||
60 | --enable-efiemu=no --program-prefix='' \ | ||
61 | --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" | ||
62 | |||
63 | do_install_class-target() { | ||
64 | : | ||
65 | } | ||
66 | |||
67 | do_install_class-native() { | ||
68 | install -d ${D}${bindir} | ||
69 | install -m 755 grub-mkimage ${D}${bindir} | ||
70 | } | ||
71 | |||
72 | GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search" | ||
73 | |||
74 | do_deploy() { | ||
75 | # Search for the grub.cfg on the local boot media by using the | ||
76 | # built in cfg file provided via this recipe | ||
77 | grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \ | ||
78 | -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \ | ||
79 | ${GRUB_BUILDIN} | ||
80 | install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR} | ||
81 | } | ||
82 | |||
83 | do_deploy_class-native() { | ||
84 | : | ||
85 | } | ||
86 | |||
87 | addtask deploy after do_install before do_build | ||
88 | |||
89 | FILES_${PN}-dbg += "${libdir}/${BPN}/${GRUB_TARGET}-efi/.debug" | ||
90 | |||
91 | BBCLASSEXTEND = "native" | ||
92 | ALLOW_EMPTY_${PN} = "1" | ||
diff --git a/meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch b/meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch new file mode 100644 index 0000000000..fc5aa4e313 --- /dev/null +++ b/meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From ff8f68cc48fd3c30d55e1d570d51f2e0952c968e Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Sat, 25 Jan 2014 23:49:44 -0500 | ||
4 | Subject: [PATCH] autogen.sh: exclude .pc from po/POTFILES.in | ||
5 | |||
6 | Exclude the .pc from po/POTFILES.in since quilt uses "patch --backup", | ||
7 | which will create the backup file under .pc, this may cause unexpected | ||
8 | errors, for example, on CentOS 5.x, if the backup file is null | ||
9 | (newfile), it's mode will be 000, then we will get errors when xgettext | ||
10 | try to read it. | ||
11 | |||
12 | Upstream-Status: Inappropriate [OE specific] | ||
13 | |||
14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
15 | --- | ||
16 | autogen.sh | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/autogen.sh b/autogen.sh | ||
20 | index 7424428..843619e 100755 | ||
21 | --- a/autogen.sh | ||
22 | +++ b/autogen.sh | ||
23 | @@ -5,7 +5,7 @@ set -e | ||
24 | export LC_COLLATE=C | ||
25 | unset LC_ALL | ||
26 | |||
27 | -find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in | ||
28 | +find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -path './.pc/*' | sort > po/POTFILES.in | ||
29 | find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in | ||
30 | |||
31 | echo "Importing unicode..." | ||
32 | -- | ||
33 | 1.7.10.4 | ||
34 | |||
diff --git a/meta/recipes-bsp/grub/grub_0.97.bb b/meta/recipes-bsp/grub/grub_0.97.bb new file mode 100644 index 0000000000..997a045b2e --- /dev/null +++ b/meta/recipes-bsp/grub/grub_0.97.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "GRUB is the GRand Unified Bootloader" | ||
2 | DESCRIPTION = "GRUB is a GPLed bootloader intended to unify bootloading across x86 \ | ||
3 | operating systems. In addition to loading the Linux kernel, it implements the Multiboot \ | ||
4 | standard, which allows for flexible loading of multiple boot images." | ||
5 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
6 | SECTION = "bootloaders" | ||
7 | |||
8 | LICENSE = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \ | ||
10 | file://grub/main.c;beginline=3;endline=9;md5=22a5f28d2130fff9f2a17ed54be90ed6" | ||
11 | |||
12 | RDEPENDS_${PN} = "diffutils" | ||
13 | PR = "r6" | ||
14 | |||
15 | SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \ | ||
16 | file://no-reorder-functions.patch \ | ||
17 | file://autohell.patch \ | ||
18 | file://grub_fix_for_automake-1.12.patch \ | ||
19 | file://objcopy-absolute.patch \ | ||
20 | file://grub-support-256byte-inode.patch \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884" | ||
24 | SRC_URI[sha256sum] = "4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b" | ||
25 | |||
26 | inherit autotools texinfo | ||
27 | |||
28 | COMPATIBLE_HOST = "i.86.*-linux" | ||
29 | |||
30 | EXTRA_OECONF = "--without-curses" | ||
31 | |||
32 | do_install_append_vmware() { | ||
33 | mkdir -p ${D}/boot/ | ||
34 | ln -sf ../usr/lib/grub/{$TARGET_ARCH}{$TARGET_VENDOR}/ ${D}/boot/grub | ||
35 | } | ||
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb new file mode 100644 index 0000000000..e2fcbb98f5 --- /dev/null +++ b/meta/recipes-bsp/grub/grub_2.00.bb | |||
@@ -0,0 +1,51 @@ | |||
1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" | ||
2 | |||
3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ | ||
4 | intended to unify bootloading across x86 operating systems. In \ | ||
5 | addition to loading the Linux kernel, it implements the Multiboot \ | ||
6 | standard, which allows for flexible loading of multiple boot images." | ||
7 | |||
8 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
9 | SECTION = "bootloaders" | ||
10 | |||
11 | LICENSE = "GPLv3" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
13 | |||
14 | DEPENDS = "autogen-native flex-native bison-native xz" | ||
15 | RDEPENDS_${PN} = "diffutils freetype" | ||
16 | PR = "r1" | ||
17 | |||
18 | SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ | ||
19 | file://grub-install.in.patch \ | ||
20 | file://grub-2.00-fpmath-sse-387-fix.patch \ | ||
21 | file://remove-gets.patch \ | ||
22 | file://check-if-liblzma-is-disabled.patch \ | ||
23 | file://fix-issue-with-flex-2.5.37.patch \ | ||
24 | file://grub-2.00-add-oe-kernel.patch \ | ||
25 | file://fix-endianness-problem.patch \ | ||
26 | file://grub2-remove-sparc64-setup-from-x86-builds.patch \ | ||
27 | " | ||
28 | |||
29 | SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" | ||
30 | SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" | ||
31 | |||
32 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' | ||
33 | |||
34 | FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug" | ||
35 | |||
36 | |||
37 | inherit autotools gettext texinfo | ||
38 | |||
39 | PACKAGECONFIG ??= "" | ||
40 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" | ||
41 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2" | ||
42 | |||
43 | EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \ | ||
44 | --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" | ||
45 | |||
46 | do_install_append () { | ||
47 | install -d ${D}${sysconfdir}/grub.d | ||
48 | } | ||
49 | |||
50 | INSANE_SKIP_${PN} = "arch" | ||
51 | INSANE_SKIP_${PN}-dbg = "arch" | ||
diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb new file mode 100644 index 0000000000..2a6392b82e --- /dev/null +++ b/meta/recipes-bsp/grub/grub_git.bb | |||
@@ -0,0 +1,64 @@ | |||
1 | SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" | ||
2 | |||
3 | DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ | ||
4 | intended to unify bootloading across x86 operating systems. In \ | ||
5 | addition to loading the Linux kernel, it implements the Multiboot \ | ||
6 | standard, which allows for flexible loading of multiple boot images." | ||
7 | |||
8 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
9 | SECTION = "bootloaders" | ||
10 | |||
11 | LICENSE = "GPLv3" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
13 | |||
14 | DEPENDS = "autogen-native flex-native bison-native xz freetype" | ||
15 | |||
16 | DEFAULT_PREFERENCE = "-1" | ||
17 | DEFAULT_PREFERENCE_arm = "1" | ||
18 | |||
19 | PV = "2.00+${SRCPV}" | ||
20 | SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e" | ||
21 | SRC_URI = "git://git.savannah.gnu.org/grub.git \ | ||
22 | file://autogen.sh-exclude-pc.patch \ | ||
23 | file://grub-2.00-add-oe-kernel.patch \ | ||
24 | file://0001-Fix-build-with-glibc-2.20.patch \ | ||
25 | " | ||
26 | |||
27 | S = "${WORKDIR}/git" | ||
28 | |||
29 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)' | ||
30 | |||
31 | inherit autotools gettext texinfo | ||
32 | |||
33 | PACKAGECONFIG ??= "" | ||
34 | PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" | ||
35 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2" | ||
36 | |||
37 | # configure.ac has code to set this automagically from the target tuple | ||
38 | # but the OE freeform one (core2-foo-bar-linux) don't work with that. | ||
39 | |||
40 | GRUBPLATFORM_arm = "uboot" | ||
41 | GRUBPLATFORM_aarch64 = "efi" | ||
42 | GRUBPLATFORM ??= "pc" | ||
43 | |||
44 | EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \ | ||
45 | --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" | ||
46 | |||
47 | do_configure_prepend() { | ||
48 | ( cd ${S} | ||
49 | ${S}/autogen.sh ) | ||
50 | } | ||
51 | |||
52 | do_install_append () { | ||
53 | install -d ${D}${sysconfdir}/grub.d | ||
54 | |||
55 | } | ||
56 | |||
57 | # debugedit chokes on bare metal binaries | ||
58 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
59 | |||
60 | RDEPENDS_${PN} = "diffutils freetype" | ||
61 | FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug" | ||
62 | |||
63 | INSANE_SKIP_${PN} = "arch" | ||
64 | INSANE_SKIP_${PN}-dbg = "arch" | ||