Skip to contentSkip to conversation

fixes for gummiboot and gnu-efi

PATCH In review Robert Yang 4 participants 12 messages Mar 27, 2014 – Mar 28, 2014

lore
Share & tools
lore
#0 lore raw

cover fixes for gummiboot and gnu-efi

The following changes since commit 109f6731210053ac6c490fc49956d0f65078f0ef:

util-linux-native: fix qsort_r for CentOS 5.10 (2014-03-27 03:45:56 -0400)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/gummiboot
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/gummiboot

Robert Yang (4):
gnu-efi: fix the LIBDIR
gummiboot: add COMPATIBLE_HOST
gummiboot: use objcopy from the env
gummiboot: fix the installed but not shipped warning

 meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb           |    2 +-
 .../gummiboot/gummiboot/fix-objcopy.patch          |   39 ++++++++++++++++++++
 meta/recipes-bsp/gummiboot/gummiboot_git.bb        |    8 +++-
 3 files changed, 47 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-bsp/gummiboot/gummiboot/fix-objcopy.patch
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/4 gnu-efi: fix the LIBDIR

Its LIBDIR in Makefile is:

LIBDIR = $(PREFIX)/lib

This is incorrect for 64 bit bsp, thus will cause build failures on gummiboot:

ld: cannot open linker script file /path/to/usr/lib64/elf_x86_64_efi.lds: No such file or directory

[YOCTO #6053]

---
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb +1 -1
index 0dbdba2..dbf2a07 100644
@@ -23,7 +23,7 @@ def gnu_efi_arch(d):
     return tarch
 
 EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
-                'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}'\
+                'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
                 "
 
 do_install() {
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/4 gummiboot: add COMPATIBLE_HOST

In reply to Robert Yang

The gummiboot depends on gnu-efi which had set:

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

We also need set this for gummiboot, otherwise there would be build failures for other non-x86 archs.

---
 meta/recipes-bsp/gummiboot/gummiboot_git.bb |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-bsp/gummiboot/gummiboot_git.bb +2 -0
index 5868a23..61de58c 100644
@@ -13,6 +13,8 @@ PV = "43+git${SRCPV}"
 SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
 SRC_URI = "git://anongit.freedesktop.org/gummiboot"
 
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+
 S = "${WORKDIR}/git"
 
 EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
Signature · 1 line
1.7.10.4
#3 lore raw

Re: [PATCH 2/4] gummiboot: add COMPATIBLE_HOST

Quoted 17 lines · Robert Yang

The gummiboot depends on gnu-efi which had set:

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

We also need set this for gummiboot, otherwise there would be build failures for other non-x86 archs.

---
 meta/recipes-bsp/gummiboot/gummiboot_git.bb |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-bsp/gummiboot/gummiboot_git.bb +0 -0
index 5868a23..61de58c 100644

meta/recipes-bsp/gummiboot/gummiboot_git.bb PV = "43+git${SRCPV}" · line 15

Quoted 3 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +0 -0
@@ -13,6 +13,8 @@ PV = "43+git${SRCPV}"
 SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
 SRC_URI = "git://anongit.freedesktop.org/gummiboot"
 

It would be good to add comment here saying it's only because of gnu-efi dependency (if gummiboot itself can in theory work on other hosts).

People won't notice it in commit message when they are looking at recipe.

Quoted 13 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +2 -0
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+
 S = "${WORKDIR}/git"
 
 EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
Signature · 7 lines
1.7.10.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw

Re: [PATCH 2/4] gummiboot: add COMPATIBLE_HOST

Quoted 13 lines · Martin Jansa
Quoted 12 lines · Robert Yang

The gummiboot depends on gnu-efi which had set:

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

We also need set this for gummiboot, otherwise there would be build failures for other non-x86 archs.

---
  meta/recipes-bsp/gummiboot/gummiboot_git.bb |    2 ++
  1 file changed, 2 insertions(+)
Quoted 12 lines

meta/recipes-bsp/gummiboot/gummiboot_git.bb PV = "43+git${SRCPV}" · line 15

Quoted 8 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +0 -0
index 5868a23..61de58c 100644
@@ -13,6 +13,8 @@ PV = "43+git${SRCPV}"
  SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
  SRC_URI = "git://anongit.freedesktop.org/gummiboot"
 

It would be good to add comment here saying it's only because of gnu-efi dependency (if gummiboot itself can in theory work on other hosts).

Sounds reasonable, updated:

git://git.openembedded.org/openembedded-core-contrib rbt/gummiboot

http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/gummiboot

meta/recipes-bsp/gummiboot/gummiboot_git.bb +3 -0
index 61de58c..035cec1 100644
@@ -13,6 +13,9 @@ PV = "43+git${SRCPV}"
 SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
 SRC_URI = "git://anongit.freedesktop.org/gummiboot"
 
+# Note: Add COMPATIBLE_HOST here is only because it depends on gnu-efi
+# which has set the COMPATIBLE_HOST, the gummiboot itself may work on
+# more hosts.
 COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
 
 S = "${WORKDIR}/git"

// Robert

Quoted 17 lines

People won't notice it in commit message when they are looking at recipe.

Quoted 13 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +2 -1
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+
  S = "${WORKDIR}/git"
 
  EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
--

1.7.10.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw

Re: [PATCH 2/4] gummiboot: add COMPATIBLE_HOST

Quoted 43 lines · Robert Yang
Quoted 13 lines · Martin Jansa
Quoted 12 lines · Robert Yang

The gummiboot depends on gnu-efi which had set:

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

We also need set this for gummiboot, otherwise there would be build failures for other non-x86 archs.

---
  meta/recipes-bsp/gummiboot/gummiboot_git.bb |    2 ++
  1 file changed, 2 insertions(+)
Quoted 13 lines

meta/recipes-bsp/gummiboot/gummiboot_git.bb PV = "43+git${SRCPV}" · line 15

Quoted 9 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +0 -0
index 5868a23..61de58c 100644
@@ -13,6 +13,8 @@ PV = "43+git${SRCPV}"
  SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
  SRC_URI = "git://anongit.freedesktop.org/gummiboot"
 

It would be good to add comment here saying it's only because of gnu-efi dependency (if gummiboot itself can in theory work on other hosts).

Sounds reasonable, updated:

git://git.openembedded.org/openembedded-core-contrib rbt/gummiboot

http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/gummiboot

meta/recipes-bsp/gummiboot/gummiboot_git.bb +0 -0
index 61de58c..035cec1 100644

meta/recipes-bsp/gummiboot/gummiboot_git.bb PV = "43+git${SRCPV}" · line 19

Quoted 7 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +3 -0
@@ -13,6 +13,9 @@ PV = "43+git${SRCPV}"
  SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
  SRC_URI = "git://anongit.freedesktop.org/gummiboot"
 
+# Note: Add COMPATIBLE_HOST here is only because it depends on gnu-efi
+# which has set the COMPATIBLE_HOST, the gummiboot itself may work on
+# more hosts.
  COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

Lacked a "+" here, it should be:

meta/recipes-bsp/gummiboot/gummiboot_git.bb +5 -0
index 5868a23..035cec1 100644
@@ -13,6 +13,11 @@ PV = "43+git${SRCPV}"
 SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
 SRC_URI = "git://anongit.freedesktop.org/gummiboot"
 
+# Note: Add COMPATIBLE_HOST here is only because it depends on gnu-efi
+# which has set the COMPATIBLE_HOST, the gummiboot itself may work on
+# more hosts.
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+
 S = "${WORKDIR}/git"
 
 EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \

// Robert

Quoted 23 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +0 -0
  S = "${WORKDIR}/git"
 

// Robert

Quoted 17 lines

People won't notice it in commit message when they are looking at recipe.

Quoted 13 lines
meta/recipes-bsp/gummiboot/gummiboot_git.bb +2 -1
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+
  S = "${WORKDIR}/git"
 
  EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
--

1.7.10.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw

Re: [PATCH 2/4] gummiboot: add COMPATIBLE_HOST

In reply to Robert Yang
Quoted 6 lines · Robert Yang

The gummiboot depends on gnu-efi which had set:

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

We also need set this for gummiboot, otherwise there would be build failures for other non-x86 archs.

isn't gnu-efi supported on arm too now ?

#7 lore raw

Re: [PATCH 2/4] gummiboot: add COMPATIBLE_HOST

Quoted 9 lines · Khem Raj
Quoted 6 lines · Robert Yang

The gummiboot depends on gnu-efi which had set:

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

We also need set this for gummiboot, otherwise there would be build failures for other non-x86 archs.

isn't gnu-efi supported on arm too now ?

on ARM, Tianocore EDK II is used with GRUB for the boot manager. I haven't heard about using EDK II with gummiboot... yet.

#8 lore raw

PATCH 3/4 gummiboot: use objcopy from the env

In reply to Robert Yang

Fix the error:
[snip]

| nm -D -u src/efi/gummiboot.so | grep ' U ' && exit 1 || :
| objcopy -j .text -j .sdata -j .data -j .dynamic \
|   -j .dynsym -j .rel -j .rela -j .reloc -j .eh_frame \
|   --target=efi-app-x86_64 src/efi/gummiboot.so gummibootx64.efi
| objcopy: src/efi/gummiboot.so: Invalid bfd target
| make[1]: *** [gummibootx64.efi] Error 1
| make[1]: *** Waiting for unfinished jobs....
| make: *** [all] Error 2

[snip]

It uses the "objcopy" directly, which is not suitable for cross compile.

[YOCTO #6054]

---
 .../gummiboot/gummiboot/fix-objcopy.patch          |   39 ++++++++++++++++++++
 meta/recipes-bsp/gummiboot/gummiboot_git.bb        |    4 +-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/gummiboot/gummiboot/fix-objcopy.patch
meta/recipes-bsp/gummiboot/gummiboot/fix-objcopy.patch new file +39 -0
new file mode 100644
index 0000000..2683f83
@@ -0,0 +1,39 @@
+From 0f7f9e3bb1d0e1b93f3ad8a1d5d7bdd3fbf27494 Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Thu, 27 Mar 2014 07:20:33 +0000
+Subject: [PATCH] Makefile.am: use objcopy from the env
+
+It uses the "objcopy" directly, which is not suitable for cross compile.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ Makefile.am | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d224418..dcd95b0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -19,6 +19,8 @@
+ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+ AM_MAKEFLAGS = --no-print-directory
+ 
++OBJCOPY ?= objcopy
++
+ gummibootlibdir = $(prefix)/lib/gummiboot
+ 
+ AM_CPPFLAGS = -include config.h
+@@ -143,7 +145,7 @@ $(efi_solib): $(efi_objects)
+ .DELETE_ON_ERROR: $(efi_solib)
+ 
+ $(efi_loadername): $(efi_solib)
+-	$(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
++	$(AM_V_GEN) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
+ 	  -j .dynsym -j .rel -j .rela -j .reloc -j .eh_frame \
+ 	  --target=efi-app-$(ARCH) $< $@
+ 
+-- 
+1.8.3.4
+
meta/recipes-bsp/gummiboot/gummiboot_git.bb +3 -1
index 61de58c..b0435f5 100644
@@ -11,7 +11,9 @@ inherit deploy
 
 PV = "43+git${SRCPV}"
 SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
-SRC_URI = "git://anongit.freedesktop.org/gummiboot"
+SRC_URI = "git://anongit.freedesktop.org/gummiboot \
+           file://fix-objcopy.patch \
+          "
 
 COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
 
Signature · 1 line
1.7.10.4
#9 lore raw

Re: [PATCH 3/4] gummiboot: use objcopy from the env

Quoted 1 line · Robert Yang

++OBJCOPY ?= objcopy

if it is a automake file you could also try

OBJCOPY = @OBJCOPY@

instead of above weak assignment.

#10 lore raw

Re: [PATCH 3/4] gummiboot: use objcopy from the env

Quoted 9 lines · Khem Raj
Quoted 1 line · Robert Yang

++OBJCOPY ?= objcopy

if it is a automake file you could also try

OBJCOPY = @OBJCOPY@

instead of above weak assignment.

Hello Khem,

I had tried that before, but it didn't work since the configure didn't check objcopy or there was no AC_SUBST([OBJCOPY])

// Robert

Quoted 1 line
#11 lore raw

PATCH 4/4 gummiboot: fix the installed but not shipped warning

In reply to Robert Yang

Fix the warning:
WARNING: QA Issue: gummiboot: Files/directories were installed but not shipped
/usr/lib
/usr/lib/gummiboot
/usr/lib/gummiboot/gummibootx64.efi

This is because it uses "/usr/lib" in gummibootlibdir, use ${libdir} to fix it.

---
 meta/recipes-bsp/gummiboot/gummiboot_git.bb |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-bsp/gummiboot/gummiboot_git.bb +2 -0
index b0435f5..8d93b20 100644
@@ -23,6 +23,8 @@ EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
                 --with-efi-ldsdir=${STAGING_LIBDIR} \
                 --with-efi-libdir=${STAGING_LIBDIR}"
 
+EXTRA_OEMAKE += "gummibootlibdir=${libdir}/gummiboot"
+
 do_deploy () {
         install ${B}/gummiboot*.efi ${DEPLOYDIR}
 }
Signature · 1 line
1.7.10.4