summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/grub/files')
-rw-r--r--meta/recipes-bsp/grub/files/cfg2
-rw-r--r--meta/recipes-bsp/grub/files/check-if-liblzma-is-disabled.patch33
-rw-r--r--meta/recipes-bsp/grub/files/fix-issue-with-flex-2.5.37.patch21
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-disable-help2man.patch148
-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-2.00-ignore-gnulib-gets-stupidity.patch28
-rw-r--r--meta/recipes-bsp/grub/files/grub-no-unused-result.patch19
8 files changed, 302 insertions, 0 deletions
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 @@
1search.file /EFI/BOOT/grub.cfg root
2set 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 @@
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-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 @@
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/grub-2.00-disable-help2man.patch b/meta/recipes-bsp/grub/files/grub-2.00-disable-help2man.patch
new file mode 100644
index 0000000000..a2e42c2b7f
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub-2.00-disable-help2man.patch
@@ -0,0 +1,148 @@
1Upstream-Status: Inappropriate (Bitbake build environment)
2
3We do not need the man pages when building just the EFI payload for the target,
4all the tools are built for the host. This does not trigger GRUB's built-in
5cross-compilation check, so force it. After the change to configure.ac,
6autogen.sh was run in devshell and the resulting configure was used to generate
7the configure diff. The configure diff was included to avoid having to add
8autogen.sh to a do_configure_prepend() routine which would slow down the build
9unnecessarily.
10
11Signed-off-by: Darren Hart <dvhart@linux.intel.com>
12
13Index: grub-2.00/configure.ac
14===================================================================
15--- grub-2.00.orig/configure.ac
16+++ grub-2.00/configure.ac
17@@ -310,11 +310,12 @@ if test x$USE_NLS = xno; then
18 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
19 fi
20
21-if test "x$cross_compiling" = xyes; then
22- AC_MSG_WARN([cannot generate manual pages while cross compiling])
23-else
24- AC_PATH_PROG(HELP2MAN, help2man)
25-fi
26+# Force behaving as though we are cross-compiling with respect to HELP2MAN
27+#if test "x$cross_compiling" = xyes; then
28+AC_MSG_WARN([cannot generate manual pages while cross compiling])
29+#else
30+# AC_PATH_PROG(HELP2MAN, help2man)
31+#fi
32
33 # Check for functions and headers.
34 AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent)
35Index: grub-2.00/configure
36===================================================================
37--- grub-2.00.orig/configure
38+++ grub-2.00/configure
39@@ -1215,7 +1215,6 @@ GL_COND_LIBTOOL_FALSE
40 GL_COND_LIBTOOL_TRUE
41 BUILD_CC
42 LIBUTIL
43-HELP2MAN
44 POSUB
45 LTLIBINTL
46 LIBINTL
47@@ -3069,7 +3068,6 @@ _ACEOF
48 # Let the site file select an alternate cache file if it wants to.
49 # Prefer an explicitly selected file to automatically selected ones.
50 ac_site_file1=NONE
51-ac_site_file2=NONE
52 if test -n "$CONFIG_SITE"; then
53 # We do not want a PATH search for config.site.
54 case $CONFIG_SITE in #((
55@@ -3077,14 +3075,8 @@ if test -n "$CONFIG_SITE"; then
56 */*) ac_site_file1=$CONFIG_SITE;;
57 *) ac_site_file1=./$CONFIG_SITE;;
58 esac
59-elif test "x$prefix" != xNONE; then
60- ac_site_file1=$prefix/share/config.site
61- ac_site_file2=$prefix/etc/config.site
62-else
63- ac_site_file1=$ac_default_prefix/share/config.site
64- ac_site_file2=$ac_default_prefix/etc/config.site
65 fi
66-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
67+for ac_site_file in $ac_site_file1
68 do
69 test "x$ac_site_file" = xNONE && continue
70 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
71@@ -3371,8 +3363,9 @@ case $target_os in *\ *) target_os=`echo
72 # The aliases save the names the user supplied, while $host etc.
73 # will get canonicalized.
74 test -n "$target_alias" &&
75- test "$program_prefix$program_suffix$program_transform_name" = \
76- NONENONEs,x,x, &&
77+ test "$target_alias" != "$host_alias" &&
78+ test "$program_prefix$program_suffix$program_transform_name" = \
79+ NONENONEs,x,x, &&
80 program_prefix=${target_alias}-
81
82 am__api_version='1.11'
83@@ -9633,51 +9626,13 @@ if test x$USE_NLS = xno; then
84 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
85 fi
86
87-if test "x$cross_compiling" = xyes; then
88- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5
89+# Force behaving as though we are cross-compiling with respect to HELP2MAN
90+#if test "x$cross_compiling" = xyes; then
91+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5
92 $as_echo "$as_me: WARNING: cannot generate manual pages while cross compiling" >&2;}
93-else
94- # Extract the first word of "help2man", so it can be a program name with args.
95-set dummy help2man; ac_word=$2
96-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
97-$as_echo_n "checking for $ac_word... " >&6; }
98-if ${ac_cv_path_HELP2MAN+:} false; then :
99- $as_echo_n "(cached) " >&6
100-else
101- case $HELP2MAN in
102- [\\/]* | ?:[\\/]*)
103- ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path.
104- ;;
105- *)
106- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
107-for as_dir in $PATH
108-do
109- IFS=$as_save_IFS
110- test -z "$as_dir" && as_dir=.
111- for ac_exec_ext in '' $ac_executable_extensions; do
112- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
113- ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext"
114- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
115- break 2
116- fi
117-done
118- done
119-IFS=$as_save_IFS
120-
121- ;;
122-esac
123-fi
124-HELP2MAN=$ac_cv_path_HELP2MAN
125-if test -n "$HELP2MAN"; then
126- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5
127-$as_echo "$HELP2MAN" >&6; }
128-else
129- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
130-$as_echo "no" >&6; }
131-fi
132-
133-
134-fi
135+#else
136+# AC_PATH_PROG(HELP2MAN, help2man)
137+#fi
138
139 # Check for functions and headers.
140 for ac_func in posix_memalign memalign asprintf vasprintf getextmntent
141@@ -20477,6 +20432,7 @@ $as_echo_n "checking whether \`$CC' gene
142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
143 /* end confdefs.h. */
144
145+void g (int);
146 void f (int (*p) (void));
147 void g (int i)
148 {
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 @@
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
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 @@
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-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 @@
1From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001
2From: Peter Jones <pjones@redhat.com>
3Date: Fri, 25 May 2012 15:28:19 -0400
4Subject: [PATCH] gnulib accused in build breaking shocker.
5
6Upstream-Status: pending [Fedora will push this]
7
8---
9 grub-core/gnulib/stdio.in.h | 2 ++
10 1 file changed, 2 insertions(+)
11
12diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
13index 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--
271.7.10.1
28
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 @@
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"