public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH 0/1] grub: fix load module all_video failed
@ 2016-08-17  8:57 Hongxu Jia
  2016-08-17  8:57 ` [PATCH 1/1] " Hongxu Jia
  0 siblings, 1 reply; 2+ messages in thread
From: Hongxu Jia @ 2016-08-17  8:57 UTC (permalink / raw)
  To: openembedded-core, ross.burton


The following changes since commit 6b66e9317f4ec3a69f98f29836aafa35b52f3fc7:

  Allow for simultaneous do_rootfs tasks with rpm (2016-08-12 15:25:22 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib hongxu/fix-grub
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=hongxu/fix-grub

Hongxu Jia (1):
  grub: fix load module all_video failed

 ...-explicitly-keeps-symbole-.module_license.patch | 61 ++++++++++++++++++++++
 meta/recipes-bsp/grub/grub2.inc                    |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch

-- 
2.8.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] grub: fix load module all_video failed
  2016-08-17  8:57 [PATCH 0/1] grub: fix load module all_video failed Hongxu Jia
@ 2016-08-17  8:57 ` Hongxu Jia
  0 siblings, 0 replies; 2+ messages in thread
From: Hongxu Jia @ 2016-08-17  8:57 UTC (permalink / raw)
  To: openembedded-core, ross.burton

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
--------------

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...-explicitly-keeps-symbole-.module_license.patch | 61 ++++++++++++++++++++++
 meta/recipes-bsp/grub/grub2.inc                    |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch

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 0000000..935c472
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
@@ -0,0 +1,61 @@
+From 7461a3de38b66edbe2f5593f9bdab9f2704d32bc Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 17 Aug 2016 04:06:34 -0400
+Subject: [PATCH] grub module explicitly keeps symbole .module_license
+
+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.
+--------------
+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
+--------------
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ grub-core/genmod.sh.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
+index 76df0bb..39a9cfc 100644
+--- a/grub-core/genmod.sh.in
++++ b/grub-core/genmod.sh.in
+@@ -59,7 +59,7 @@ if test x@TARGET_APPLE_CC@ != x1; then
+ 	if test x@platform@ != xemu; then
+ 	    @STRIP@ --strip-unneeded \
+ 		-K grub_mod_init -K grub_mod_fini \
+-		-K _grub_mod_init -K _grub_mod_fini \
++		-K _grub_mod_init -K _grub_mod_fini -K .module_license \
+ 		-R .note.gnu.gold-version -R .note.GNU-stack \
+ 		-R .note -R .comment $tmpfile || exit 1
+ 	fi
+-- 
+2.8.1
+
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index d77a0d4..b10f633 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -12,6 +12,7 @@ LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+           file://grub-module-explicitly-keeps-symbole-.module_license.patch \
            file://grub-2.00-fpmath-sse-387-fix.patch \
            file://check-if-liblzma-is-disabled.patch \
            file://fix-issue-with-flex-2.5.37.patch \
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-17  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17  8:57 [PATCH 0/1] grub: fix load module all_video failed Hongxu Jia
2016-08-17  8:57 ` [PATCH 1/1] " Hongxu Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox