summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorRadu Moisan <radu.moisan@intel.com>2012-08-21 14:34:25 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-23 11:43:33 +0100
commit1192ace3185f3293508531687e1d199b03934460 (patch)
treefaca12b2c4bac19a8fad2a40298bd60546ec6d6a /meta/recipes-bsp
parenteab2efc596c6d6d8bd785de4ce7bb6b23379c573 (diff)
downloadpoky-1192ace3185f3293508531687e1d199b03934460.tar.gz
grub: Update to upstream stable 2.00
Removed unnecessary patches (merged upstream). (From OE-Core rev: d888f50d5cfdf5b3881f81c26f0349ef41c06197) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Saul Wold <sgw@linux.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/grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch147
-rw-r--r--meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch41
-rw-r--r--meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch34
-rw-r--r--meta/recipes-bsp/grub/files/grub-1.99_fix_for_automake_1.11.2.patch179
-rw-r--r--meta/recipes-bsp/grub/grub-1.99/grub-1.99-lazy_stat.patch64
-rwxr-xr-xmeta/recipes-bsp/grub/grub-2.00/40_custom (renamed from meta/recipes-bsp/grub/grub-1.99/40_custom)0
-rw-r--r--meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch (renamed from meta/recipes-bsp/grub/grub-1.99/grub-install.in.patch)0
-rw-r--r--meta/recipes-bsp/grub/grub-2.00/remove-gets.patch (renamed from meta/recipes-bsp/grub/grub-1.99/remove-gets.patch)0
-rw-r--r--meta/recipes-bsp/grub/grub_2.00.bb (renamed from meta/recipes-bsp/grub/grub_1.99.bb)16
9 files changed, 7 insertions, 474 deletions
diff --git a/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch b/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch
deleted file mode 100644
index 9d81050e43..0000000000
--- a/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch
+++ /dev/null
@@ -1,147 +0,0 @@
1Upstream-Status: Pending
2
3This patch fixes these strick-aliasing errors with gcc 4.7
4
5
6| gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -DGRUB_FILE=\"fs/zfs/zfs.c\" -I. -I. -I.. -I.. -I../include -I../include -isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -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 -Wno-trampolines -ffreestanding -isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -c -o fs/zfs/zfs_module-zfs.o `test -f 'fs/zfs/zfs.c' || echo './'`fs/zfs/zfs.c
7| fs/zfs/zfs.c: In function 'get_filesystem_dnode':
8| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
9| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
10| fs/zfs/zfs.c: In function 'make_mdn':
11| fs/zfs/zfs.c:1478:3: error: dereferencing type-punned pointer will break strict-alERROR: Function failed: do_compile (see /home/nitin/builds/build0/tmp/work/x86_64-linux/grub-efi-i586-native-1.99-r7/temp/log.do_compile.9293 for further information)
12| iasing rules [-Werror=strict-aliasing]
13| fs/zfs/zfs.c: In function 'dnode_get_fullpath':
14| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
15| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
16| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
17| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
18| fs/zfs/zfs.c: In function 'grub_zfs_open':
19| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
20| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
21| fs/zfs/zfs.c: In function 'fill_fs_info':
22| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
23| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
24| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
25| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
26| fs/zfs/zfs.c: In function 'iterate_zap':
27| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
28| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
29| fs/zfs/zfs.c: In function 'grub_zfs_dir':
30| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
31| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
32| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
33| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
34| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
35| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
36| cc1: all warnings being treated as errors
37| make[3]: *** [fs/zfs/zfs_module-zfs.o] Error 1
38
39Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
402012/04/13
41
42Index: grub-1.99/grub-core/fs/zfs/zfs.c
43===================================================================
44--- grub-1.99.orig/grub-core/fs/zfs/zfs.c
45+++ grub-1.99/grub-core/fs/zfs/zfs.c
46@@ -1446,7 +1446,8 @@ get_filesystem_dnode (dnode_end_t * mosm
47 ch = *fsname;
48 *fsname = 0;
49
50- childobj = grub_zfs_to_cpu64 ((((dsl_dir_phys_t *) DN_BONUS (&mdn->dn)))->dd_child_dir_zapobj, mdn->endian);
51+ dsl_dir_phys_t * tmp = DN_BONUS (&mdn->dn);
52+ childobj = grub_zfs_to_cpu64 (tmp->dd_child_dir_zapobj, mdn->endian);
53 err = dnode_get (mosmdn, childobj,
54 DMU_OT_DSL_DIR_CHILD_MAP, mdn, data);
55 if (err)
56@@ -1475,7 +1476,8 @@ make_mdn (dnode_end_t * mdn, struct grub
57
58 grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
59
60- bp = &(((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_bp);
61+ dsl_dataset_phys_t * tmp = DN_BONUS(&mdn->dn);
62+ bp = &(tmp->ds_bp);
63 err = zio_read (bp, mdn->endian, &osp, &ospsize, data);
64 if (err)
65 return err;
66@@ -1551,7 +1553,8 @@ dnode_get_fullpath (const char *fullpath
67
68 grub_dprintf ("zfs", "alive\n");
69
70- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&dn->dn))->dd_head_dataset_obj, dn->endian);
71+ dsl_dir_phys_t * tmp1 = DN_BONUS (&dn->dn);
72+ headobj = grub_zfs_to_cpu64 (tmp1->dd_head_dataset_obj, dn->endian);
73
74 grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
75
76@@ -1568,7 +1571,8 @@ dnode_get_fullpath (const char *fullpath
77 {
78 grub_uint64_t snapobj;
79
80- snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_snapnames_zapobj, mdn->endian);
81+ dsl_dataset_phys_t * tmp2 = DN_BONUS (&mdn->dn);
82+ snapobj = grub_zfs_to_cpu64 (tmp2->ds_snapnames_zapobj, mdn->endian);
83
84 err = dnode_get (&(data->mos), snapobj,
85 DMU_OT_DSL_DS_SNAP_MAP, mdn, data);
86@@ -2231,7 +2235,8 @@ grub_zfs_open (struct grub_file *file, c
87 }
88 else
89 {
90- file->size = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&data->dnode.dn))->zp_size, data->dnode.endian);
91+ znode_phys_t * tmp = DN_BONUS (&data->dnode.dn);
92+ file->size = grub_zfs_to_cpu64 (tmp->zp_size, data->dnode.endian);
93 }
94
95 file->data = data;
96@@ -2359,7 +2364,8 @@ fill_fs_info (struct grub_dirhook_info *
97
98 if (mdn.dn.dn_type == DMU_OT_DSL_DIR)
99 {
100- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&mdn.dn))->dd_head_dataset_obj, mdn.endian);
101+ dsl_dir_phys_t * tmp1 = DN_BONUS (&mdn.dn);
102+ headobj = grub_zfs_to_cpu64 (tmp1->dd_head_dataset_obj, mdn.endian);
103
104 err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &mdn, data);
105 if (err)
106@@ -2392,7 +2398,8 @@ fill_fs_info (struct grub_dirhook_info *
107 }
108
109 info->mtimeset = 1;
110- info->mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
111+ znode_phys_t * tmp2 = DN_BONUS (&dn.dn);
112+ info->mtime = grub_zfs_to_cpu64 (tmp2->zp_mtime[0], dn.endian);
113 return;
114 }
115
116@@ -2417,7 +2424,8 @@ grub_zfs_dir (grub_device_t device, cons
117
118 dnode_get (&(data->mdn), val, 0, &dn, data);
119 info.mtimeset = 1;
120- info.mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
121+ znode_phys_t * tmp1 = DN_BONUS (&dn.dn);
122+ info.mtime = grub_zfs_to_cpu64 (tmp1->zp_mtime[0], dn.endian);
123 info.dir = (dn.dn.dn_type == DMU_OT_DIRECTORY_CONTENTS);
124 grub_dprintf ("zfs", "type=%d, name=%s\n",
125 (int)dn.dn.dn_type, (char *)name);
126@@ -2480,8 +2488,9 @@ grub_zfs_dir (grub_device_t device, cons
127 fill_fs_info (&info, data->dnode, data);
128 hook ("@", &info);
129
130- childobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_child_dir_zapobj, data->dnode.endian);
131- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_head_dataset_obj, data->dnode.endian);
132+ dsl_dir_phys_t * tmp2 = DN_BONUS (&data->dnode.dn);
133+ childobj = grub_zfs_to_cpu64 (tmp2->dd_child_dir_zapobj, data->dnode.endian);
134+ headobj = grub_zfs_to_cpu64 (tmp2->dd_head_dataset_obj, data->dnode.endian);
135 err = dnode_get (&(data->mos), childobj,
136 DMU_OT_DSL_DIR_CHILD_MAP, &dn, data);
137 if (err)
138@@ -2499,7 +2508,8 @@ grub_zfs_dir (grub_device_t device, cons
139 return err;
140 }
141
142- snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&dn.dn))->ds_snapnames_zapobj, dn.endian);
143+ dsl_dataset_phys_t * tmp3 = DN_BONUS (&dn.dn);
144+ snapobj = grub_zfs_to_cpu64 (tmp3->ds_snapnames_zapobj, dn.endian);
145
146 err = dnode_get (&(data->mos), snapobj,
147 DMU_OT_DSL_DS_SNAP_MAP, &dn, data);
diff --git a/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch b/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch
deleted file mode 100644
index f8121476de..0000000000
--- a/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1Upstream-Status: Pending
2
3This patch quitens this error:
4
5| make[3]: Entering directory
6`/home/nitin/builds/build0/tmp/work/x86_64-linux/grub-efi-i586-native-1.99-r7/grub-1.99/grub-core'
7| gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include
8-DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -nostdinc -isystem
9/usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -DGRUB_FILE=\"fs/btrfs.c\" -I.
10-I. -I.. -I.. -I../include -I../include
11-isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2
12-pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith
13-Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1
14-falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow
15-fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror
16-Wno-trampolines -ffreestanding
17-isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2
18-pipe -c -o fs/btrfs_module-btrfs.o `test -f 'fs/btrfs.c' || echo
19'./'`fs/btrfs.c
20| fs/btrfs.c: In function 'grub_btrfs_read_logical':
21| fs/btrfs.c:791:5: error: 'err' may be used uninitialized in this function
22[-Werror=maybe-uninitialized]
23| fs/btrfs.c:592:18: note: 'err' was declared here
24| cc1: all warnings being treated as errors
25| make[3]: *** [fs/btrfs_module-btrfs.o] Error 1
26
27Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
282012/04/13
29Index: grub-1.99/grub-core/fs/btrfs.c
30===================================================================
31--- grub-1.99.orig/grub-core/fs/btrfs.c
32+++ grub-1.99/grub-core/fs/btrfs.c
33@@ -589,7 +589,7 @@ grub_btrfs_read_logical (struct grub_btr
34 struct grub_btrfs_key *key;
35 struct grub_btrfs_chunk_item *chunk;
36 grub_uint64_t csize;
37- grub_err_t err;
38+ grub_err_t err = 0;
39 struct grub_btrfs_key key_out;
40 int challoc = 0;
41 grub_device_t dev;
diff --git a/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch b/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch
deleted file mode 100644
index 545954a307..0000000000
--- a/meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1Upstream-Status: backport from fedora
2
32012/04/13
4Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
5
6From b0f4ef523b69a497d69820c09bbb07484a6b09cc Mon Sep 17 00:00:00 2001
7From: Peter Jones <pjones@redhat.com>
8Date: Wed, 7 Mar 2012 09:53:50 -0500
9Subject: [PATCH] Fix gcc error that kills build.
10
11---
12 conf/Makefile.common | 4 ++--
13 1 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/conf/Makefile.common b/conf/Makefile.common
16index 2040a2e..b3ba765 100644
17--- a/conf/Makefile.common
18+++ b/conf/Makefile.common
19@@ -11,10 +11,10 @@ if COND_i386_pc
20 CFLAGS_PLATFORM += -mrtd -mregparm=3
21 endif
22 if COND_i386_efi
23- LDFLAGS_PLATFORM = -melf_i386
24+ LDFLAGS_PLATFORM = -m32
25 endif
26 if COND_x86_64_efi
27- LDFLAGS_PLATFORM = -melf_x86_64
28+ LDFLAGS_PLATFORM = -m64
29 endif
30 if COND_i386_qemu
31 CFLAGS_PLATFORM += -mrtd -mregparm=3
32--
331.7.7.6
34
diff --git a/meta/recipes-bsp/grub/files/grub-1.99_fix_for_automake_1.11.2.patch b/meta/recipes-bsp/grub/files/grub-1.99_fix_for_automake_1.11.2.patch
deleted file mode 100644
index 459b4fc37b..0000000000
--- a/meta/recipes-bsp/grub/files/grub-1.99_fix_for_automake_1.11.2.patch
+++ /dev/null
@@ -1,179 +0,0 @@
1Upstream-Status: Backport
2
3http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/3766
4 Handle newer autotools. Add some missing quotes while on it.
5
6http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/3983
7 gentpl.py: Remove obsolete pkglib_DATA handling.
8
9Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
10
11diff --git a/Makefile.am b/Makefile.am
12index 9301c91..d706968 100644
13--- a/Makefile.am
14+++ b/Makefile.am
15@@ -101,8 +101,8 @@ CLEANFILES += widthspec.h
16 # Install config.h into platformdir
17 platform_HEADERS = config.h
18
19-pkglib_DATA += grub-mkconfig_lib
20-pkglib_DATA += update-grub_lib
21+pkgdata_DATA += grub-mkconfig_lib
22+pkgdata_DATA += update-grub_lib
23
24
25 if COND_i386_coreboot
26diff --git a/conf/Makefile.common b/conf/Makefile.common
27index 5aa13cd..2040a2e 100644
28--- a/conf/Makefile.common
29+++ b/conf/Makefile.common
30@@ -137,7 +137,7 @@ KERNEL_HEADER_FILES =
31
32 man_MANS =
33 noinst_DATA =
34-pkglib_DATA =
35+pkgdata_DATA =
36 bin_SCRIPTS =
37 sbin_SCRIPTS =
38 bin_PROGRAMS =
39@@ -147,7 +147,6 @@ check_SCRIPTS =
40 grubconf_DATA =
41 check_PROGRAMS =
42 noinst_SCRIPTS =
43-pkglib_SCRIPTS =
44 noinst_PROGRAMS =
45 grubconf_SCRIPTS =
46 noinst_LIBRARIES =
47diff --git a/gentpl.py b/gentpl.py
48index a42a606..7992376 100644
49--- a/gentpl.py
50+++ b/gentpl.py
51@@ -440,7 +440,7 @@ def script(platform):
52 r += "[+ ENDIF +]"
53
54 r += rule("[+ name +]", platform_sources(platform) + " $(top_builddir)/config.status", """
55-$(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
56+$(top_builddir)/config.status --file=$@:$<
57 chmod a+x [+ name +]
58 """)
59
60diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
61index afc66f8..0c81084 100644
62--- a/util/grub-mkconfig.in
63+++ b/util/grub-mkconfig.in
64@@ -95,7 +95,7 @@ do
65 esac
66 done
67
68-. ${libdir}/grub/grub-mkconfig_lib
69+. ${datadir}/grub/grub-mkconfig_lib
70
71 if [ "x$EUID" = "x" ] ; then
72 EUID=`id -u`
73diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
74index 9da1511..30d61f1 100644
75--- a/util/grub.d/00_header.in
76+++ b/util/grub.d/00_header.in
77@@ -25,7 +25,7 @@ libdir=@libdir@
78 locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
79 grub_lang=`echo $LANG | cut -d . -f 1`
80
81-. ${libdir}/grub/grub-mkconfig_lib
82+. @datadir@/grub/grub-mkconfig_lib
83
84 # Do this as early as possible, since other commands might depend on it.
85 # (e.g. the `loadfont' command might need lvm or raid modules)
86diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
87index 8c54eab..d823ba3 100644
88--- a/util/grub.d/10_hurd.in
89+++ b/util/grub.d/10_hurd.in
90@@ -20,7 +20,7 @@ set -e
91 prefix=@prefix@
92 exec_prefix=@exec_prefix@
93 libdir=@libdir@
94-. ${libdir}/grub/grub-mkconfig_lib
95+. @datadir@/grub/grub-mkconfig_lib
96
97 CLASS="--class gnu --class os"
98
99diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
100index 3600c74..fd8399b 100644
101--- a/util/grub.d/10_kfreebsd.in
102+++ b/util/grub.d/10_kfreebsd.in
103@@ -21,7 +21,7 @@ prefix=@prefix@
104 exec_prefix=@exec_prefix@
105 bindir=@bindir@
106 libdir=@libdir@
107-. ${libdir}/grub/grub-mkconfig_lib
108+. @datadir@/grub/grub-mkconfig_lib
109
110 export TEXTDOMAIN=@PACKAGE@
111 export TEXTDOMAINDIR=@localedir@
112diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
113index 1d1eb40..0977700 100644
114--- a/util/grub.d/10_linux.in
115+++ b/util/grub.d/10_linux.in
116@@ -21,7 +21,7 @@ prefix=@prefix@
117 exec_prefix=@exec_prefix@
118 bindir=@bindir@
119 libdir=@libdir@
120-. ${libdir}/grub/grub-mkconfig_lib
121+. @datadir@/grub/grub-mkconfig_lib
122
123 export TEXTDOMAIN=@PACKAGE@
124 export TEXTDOMAINDIR=@localedir@
125diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in
126index ffd31ad..ce77096 100644
127--- a/util/grub.d/10_netbsd.in
128+++ b/util/grub.d/10_netbsd.in
129@@ -21,7 +21,7 @@ prefix=@prefix@
130 exec_prefix=@exec_prefix@
131 bindir=@bindir@
132 libdir=@libdir@
133-. ${libdir}/grub/grub-mkconfig_lib
134+. @datadir@/grub/grub-mkconfig_lib
135
136 export TEXTDOMAIN=@PACKAGE@
137 export TEXTDOMAINDIR=@localedir@
138diff --git a/util/grub.d/10_windows.in b/util/grub.d/10_windows.in
139index fd068dd..9b73dc6 100644
140--- a/util/grub.d/10_windows.in
141+++ b/util/grub.d/10_windows.in
142@@ -20,7 +20,7 @@ set -e
143 prefix=@prefix@
144 exec_prefix=@exec_prefix@
145 libdir=@libdir@
146-. ${libdir}/grub/grub-mkconfig_lib
147+. @datadir@/grub/grub-mkconfig_lib
148
149 case "`uname 2>/dev/null`" in
150 CYGWIN*) ;;
151diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
152index a900760..aef5bea 100644
153--- a/util/grub.d/20_linux_xen.in
154+++ b/util/grub.d/20_linux_xen.in
155@@ -21,7 +21,7 @@ prefix=@prefix@
156 exec_prefix=@exec_prefix@
157 bindir=@bindir@
158 libdir=@libdir@
159-. ${libdir}/grub/grub-mkconfig_lib
160+. @datadir@/grub/grub-mkconfig_lib
161
162 export TEXTDOMAIN=@PACKAGE@
163 export TEXTDOMAINDIR=@localedir@
164diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
165index d9d4b0a..485b224 100644
166--- a/util/grub.d/30_os-prober.in
167+++ b/util/grub.d/30_os-prober.in
168@@ -21,7 +21,7 @@ prefix=@prefix@
169 exec_prefix=@exec_prefix@
170 libdir=@libdir@
171
172-. ${libdir}/grub/grub-mkconfig_lib
173+. @datadir@/grub/grub-mkconfig_lib
174
175 if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
176 exit 0
177--
1781.7.7
179
diff --git a/meta/recipes-bsp/grub/grub-1.99/grub-1.99-lazy_stat.patch b/meta/recipes-bsp/grub/grub-1.99/grub-1.99-lazy_stat.patch
deleted file mode 100644
index cde8b87a47..0000000000
--- a/meta/recipes-bsp/grub/grub-1.99/grub-1.99-lazy_stat.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1Upstream-Status: Backport
2
3Patch is a slightly edited version from debian. Upstream link is:
4http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/3318
5
6Description: Don't stat devices unless we have to
7Author: Vladimir Serbinenko <phcoder@gmail.com>
8Author: Colin Watson <cjwatson@ubuntu.com>
9Bug-Debian: http://bugs.debian.org/627587
10Forwarded: yes
11Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3318
12Last-Update: 2011-05-31
13
14Index: b/grub-core/kern/emu/getroot.c
15===================================================================
16--- a/grub-core/kern/emu/getroot.c
17+++ b/grub-core/kern/emu/getroot.c
18@@ -358,7 +358,7 @@
19
20 if (S_ISLNK (st.st_mode)) {
21 #ifdef __linux__
22- if (strcmp (dir, "mapper") == 0) {
23+ if (strcmp (dir, "mapper") == 0 || strcmp (dir, "/dev/mapper") == 0) {
24 /* Follow symbolic links under /dev/mapper/; the canonical name
25 may be something like /dev/dm-0, but the names under
26 /dev/mapper/ are more human-readable and so we prefer them if
27@@ -609,20 +609,27 @@
28
29 if (os_dev)
30 {
31- if (stat (os_dev, &st) >= 0)
32- dev = st.st_rdev;
33- else
34- grub_util_error ("cannot stat `%s'", os_dev);
35- free (os_dev);
36+ char *tmp = os_dev;
37+ os_dev = canonicalize_file_name (os_dev);
38+ free (tmp);
39 }
40- else
41+
42+ if (os_dev)
43 {
44- if (stat (dir, &st) >= 0)
45- dev = st.st_dev;
46- else
47- grub_util_error ("cannot stat `%s'", dir);
48+ if (strncmp (os_dev, "/dev/dm-", sizeof ("/dev/dm-") - 1) != 0)
49+ return os_dev;
50+ if (stat (os_dev, &st) < 0)
51+ grub_util_error ("cannot stat `%s'", os_dev);
52+ free (os_dev);
53+ dev = st.st_rdev;
54+ return grub_find_device ("/dev/mapper", dev);
55 }
56
57+ if (stat (dir, &st) < 0)
58+ grub_util_error ("cannot stat `%s'", dir);
59+
60+ dev = st.st_dev;
61+
62 #ifdef __CYGWIN__
63 /* Cygwin specific function. */
64 os_dev = grub_find_device (dir, dev);
diff --git a/meta/recipes-bsp/grub/grub-1.99/40_custom b/meta/recipes-bsp/grub/grub-2.00/40_custom
index ba488308b6..ba488308b6 100755
--- a/meta/recipes-bsp/grub/grub-1.99/40_custom
+++ b/meta/recipes-bsp/grub/grub-2.00/40_custom
diff --git a/meta/recipes-bsp/grub/grub-1.99/grub-install.in.patch b/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch
index 326951df44..326951df44 100644
--- a/meta/recipes-bsp/grub/grub-1.99/grub-install.in.patch
+++ b/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch
diff --git a/meta/recipes-bsp/grub/grub-1.99/remove-gets.patch b/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch
index 463f7847ad..463f7847ad 100644
--- a/meta/recipes-bsp/grub/grub-1.99/remove-gets.patch
+++ b/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch
diff --git a/meta/recipes-bsp/grub/grub_1.99.bb b/meta/recipes-bsp/grub/grub_2.00.bb
index 64cefe0cd2..c88e095d7d 100644
--- a/meta/recipes-bsp/grub/grub_1.99.bb
+++ b/meta/recipes-bsp/grub/grub_2.00.bb
@@ -13,25 +13,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13 13
14DEPENDS = "autogen-native flex-native" 14DEPENDS = "autogen-native flex-native"
15RDEPENDS_${PN} = "diffutils freetype" 15RDEPENDS_${PN} = "diffutils freetype"
16PR = "r12" 16PR = "r0"
17 17
18SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 18SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
19 file://grub-install.in.patch \ 19 file://grub-install.in.patch \
20 file://grub-1.99_fix_for_automake_1.11.2.patch \
21 file://grub-1.99-fpmath-sse-387-fix.patch \ 20 file://grub-1.99-fpmath-sse-387-fix.patch \
22 file://grub-1.99-gcc-4.7.0.patch \
23 file://grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch \
24 file://grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch \
25 file://grub-1.99-fix-enable_execute_stack-check.patch \
26 file://remove-gets.patch \ 21 file://remove-gets.patch \
27 file://grub-1.99-lazy_stat.patch \
28 file://40_custom" 22 file://40_custom"
29 23
30SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5" 24SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
31SRC_URI[sha256sum] = "b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff" 25SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
32 26
33COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' 27COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
34 28
29FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug"
30
31
35inherit autotools 32inherit autotools
36inherit gettext 33inherit gettext
37 34
@@ -43,3 +40,4 @@ do_install_append () {
43} 40}
44 41
45INSANE_SKIP_${PN} = "arch" 42INSANE_SKIP_${PN} = "arch"
43INSANE_SKIP_${PN}-dbg = "arch"