summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2016-08-17 04:57:30 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-23 17:44:39 +0100
commit86164406ddb8d4bb138eb3e992897f2eed422f3c (patch)
tree85303f34bdbabd6aebea5861decfd051086cdf92 /meta
parentddaf84ce8640034e028d794131d88a2453ab0bc9 (diff)
downloadpoky-86164406ddb8d4bb138eb3e992897f2eed422f3c.tar.gz
grub: fix load module all_video failed
While using oe-core toolchain to strip grub module 'all_video.mod', it stripped symbol table: -------------- root@localhost:~# objdump -t all_video.mod all_video.mod: file format elf64-x86-64 SYMBOL TABLE: no symbols -------------- It caused grub to load module all_video failed. (This module will be loaded by defalut which configed in grub.cfg) -------------- grub> insmod all_video error: no symbol table. -------------- Tweak strip option to keep symbol .module_license could workaround the issue. -------------- root@localhost:~# objdump -t all_video.mod all_video.mod: file format elf64-x86-64 SYMBOL TABLE: 0000000000000000 l d .text 0000000000000000 .text 0000000000000000 l d .data 0000000000000000 .data 0000000000000000 l d .module_license 0000000000000000 .module_license 0000000000000000 l d .bss 0000000000000000 .bss 0000000000000000 l d .moddeps 0000000000000000 .moddeps 0000000000000000 l d .modname 0000000000000000 .modname -------------- (From OE-Core rev: 17e7eb96e5446821ad81977ac9ccac26b05e67a7) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch61
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
2 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
new file mode 100644
index 0000000000..935c472cf8
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
@@ -0,0 +1,61 @@
1From 7461a3de38b66edbe2f5593f9bdab9f2704d32bc Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 17 Aug 2016 04:06:34 -0400
4Subject: [PATCH] grub module explicitly keeps symbole .module_license
5
6While using oe-core toolchain to strip grub module 'all_video.mod',
7it stripped symbol table:
8--------------
9root@localhost:~# objdump -t all_video.mod
10
11all_video.mod: file format elf64-x86-64
12
13SYMBOL TABLE:
14no symbols
15--------------
16
17It caused grub to load module all_video failed.
18--------------
19grub> insmod all_video
20error: no symbol table.
21--------------
22
23Tweak strip option to keep symbol .module_license could workaround
24the issue.
25--------------
26root@localhost:~# objdump -t all_video.mod
27
28all_video.mod: file format elf64-x86-64
29
30SYMBOL TABLE:
310000000000000000 l d .text 0000000000000000 .text
320000000000000000 l d .data 0000000000000000 .data
330000000000000000 l d .module_license 0000000000000000 .module_license
340000000000000000 l d .bss 0000000000000000 .bss
350000000000000000 l d .moddeps 0000000000000000 .moddeps
360000000000000000 l d .modname 0000000000000000 .modname
37--------------
38
39Upstream-Status: Pending
40
41Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
42---
43 grub-core/genmod.sh.in | 2 +-
44 1 file changed, 1 insertion(+), 1 deletion(-)
45
46diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
47index 76df0bb..39a9cfc 100644
48--- a/grub-core/genmod.sh.in
49+++ b/grub-core/genmod.sh.in
50@@ -59,7 +59,7 @@ if test x@TARGET_APPLE_CC@ != x1; then
51 if test x@platform@ != xemu; then
52 @STRIP@ --strip-unneeded \
53 -K grub_mod_init -K grub_mod_fini \
54- -K _grub_mod_init -K _grub_mod_fini \
55+ -K _grub_mod_init -K _grub_mod_fini -K .module_license \
56 -R .note.gnu.gold-version -R .note.GNU-stack \
57 -R .note -R .comment $tmpfile || exit 1
58 fi
59--
602.8.1
61
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index d77a0d4fd9..b10f633aae 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -12,6 +12,7 @@ LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13 13
14SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 14SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
15 file://grub-module-explicitly-keeps-symbole-.module_license.patch \
15 file://grub-2.00-fpmath-sse-387-fix.patch \ 16 file://grub-2.00-fpmath-sse-387-fix.patch \
16 file://check-if-liblzma-is-disabled.patch \ 17 file://check-if-liblzma-is-disabled.patch \
17 file://fix-issue-with-flex-2.5.37.patch \ 18 file://fix-issue-with-flex-2.5.37.patch \