Skip to contentSkip to conversation

efivar: add

PATCH Superseded Ross Burton 2 participants 3 messages Jun 10, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 efivar: add

This was in meta-oe but EFI is sufficiently wide spread now that we need it in core.

---
 .../efivar/0001-efivar-fix-for-cross-compile.patch | 32 ++++++++++++++++
 .../0004-fix-unknow-option-for-gold-linker.patch   | 35 ++++++++++++++++++
 .../allow-multi-definitions-for-native.patch       | 36 ++++++++++++++++++
 meta/recipes-bsp/efivar/efivar_37.bb               | 43 ++++++++++++++++++++++
 4 files changed, 146 insertions(+)
 create mode 100644 meta/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
 create mode 100644 meta/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
 create mode 100644 meta/recipes-bsp/efivar/efivar/allow-multi-definitions-for-native.patch
 create mode 100644 meta/recipes-bsp/efivar/efivar_37.bb
meta/recipes-bsp/efivar/efivar/0001-efivar-fix-for-cross-compile.patch new file +32 -0
new file mode 100644
index 00000000000..251e50c902c
@@ -0,0 +1,32 @@
+From a9115d9e6f0f62d6bb735ce3698858d1f89f8d73 Mon Sep 17 00:00:00 2001
+From: Kai Kang <[email protected]>
+Date: Fri, 25 Sep 2015 18:14:31 +0800
+Subject: [PATCH] efivar: fix for cross compile
+
+It builds and calls elf file makeguids to generate a header file which
+doesn't work for cross compile. Fix it.
+
+Signed-off-by: Kai Kang <[email protected]>
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <[email protected]>
+
+---
+ src/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 0c16597..dcc7fc8 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -40,8 +40,8 @@ abicheck : $(patsubst %.so,%.abicheck,$(LIBTARGETS))
+ ./guid-symbols.c : include/efivar/efivar-guids.h
+ ./guids.bin : include/efivar/efivar-guids.h
+ ./names.bin : include/efivar/efivar-guids.h
+-include/efivar/efivar-guids.h : makeguids guids.txt
+-	./makeguids guids.txt guids.bin names.bin \
++include/efivar/efivar-guids.h : guids.txt
++	makeguids guids.txt guids.bin names.bin \
+ 		guid-symbols.c include/efivar/efivar-guids.h
+ 
+ makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT
meta/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch new file +35 -0
new file mode 100644
index 00000000000..96d0c6b3b28
@@ -0,0 +1,35 @@
+From b3d35e7dd27a755df5acbe050837885914dbb28b Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Tue, 10 May 2016 11:34:50 -0400
+Subject: [PATCH]  fix unknow option for gold linker
+
+- Revert the following patch, since oe-core work with gcc 5
+...
+commit 3055a3797f16693dfdd855fa68bc57fd900dc408
+Author: Peter Jones <[email protected]>
+Date:   Mon Feb 15 14:15:40 2016 -0500
+
+    Make gcc.specs work with gcc 6 / binutils 2.26
+
+    Apparently binutils 2.26 gets real picky about "ld -PIC" vs "ld -fPIC".
+
+    Signed-off-by: Peter Jones <[email protected]>
+...
+
+- Remove unknown option '--add-needed'
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ gcc.specs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/gcc.specs
+===================================================================
+--- git.orig/gcc.specs
++++ git/gcc.specs
+@@ -14,4 +14,4 @@
+ + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}
+ 
+ *link:
+-+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
+++ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie}
meta/recipes-bsp/efivar/efivar/allow-multi-definitions-for-native.patch new file +36 -0
new file mode 100644
index 00000000000..043b07a655c
@@ -0,0 +1,36 @@
+From c10368b397483a2fc7b493c099d8416d902f8cd8 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Tue, 31 Jul 2018 14:18:35 +0800
+Subject: [PATCH] allow multi definitions for native
+
+Upstream-Status: Pending
+
+It fails to create .so file when build efivar-native:
+
+| lib.o:(*IND*+0x0): multiple definition of `efi_set_variable'
+| lib.o:lib.c:(.text+0xa0): first defined here
+
+Add link option '-z muldefs' to fix it.
+
+Signed-off-by: Kai Kang <[email protected]>
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ Make.rules | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Make.rules b/Make.rules
+index 042585b..257ba45 100644
+--- a/Make.rules
++++ b/Make.rules
+@@ -20,6 +20,7 @@ include $(TOPDIR)/Make.version
+ 	$(CCLD) $(ccldflags) $(CPPFLAGS) $(SOFLAGS) \
+ 	  -Wl,-soname,[email protected] \
+ 	  -Wl,--version-script=$(MAP) \
++	  -Wl,-z,muldefs \
+ 	  -o $@ $^ $(LDLIBS)
+ 	ln -vfs $@ [email protected]
+ 
+-- 
+2.7.4
+
meta/recipes-bsp/efivar/efivar_37.bb new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 efibootmgr: add

This was in meta-oe but EFI is sufficiently wide spread now that we need it in core.

---
 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb       | 28 +++++++++++++++++++
 .../efibootmgr/files/0001-remove-extra-decl.patch  | 31 ++++++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
 create mode 100644 meta/recipes-bsp/efibootmgr/files/0001-remove-extra-decl.patch
meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +28 -0
new file mode 100644
index 00000000000..4edb2e6644f
@@ -0,0 +1,28 @@
+DESCRIPTION = "Linux user-space application to modify the EFI Boot Manager."
+SUMMARY = "EFI Boot Manager"
+HOMEPAGE = "https://github.com/rhinstaller/efibootmgr"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "pciutils zlib efivar"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
+SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \
+           file://0001-remove-extra-decl.patch \
+          "
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "'EFIDIR=/' 'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/include `pkg-config --cflags efivar`'"
+
+CFLAGS_append_toolchain-clang = " -Wno-error"
+do_install () {
+    install -D -p -m0755 ${B}/src/efibootmgr ${D}/${sbindir}/efibootmgr
+}
+
+CLEANBROKEN = "1"
meta/recipes-bsp/efibootmgr/files/0001-remove-extra-decl.patch new file +31 -0
new file mode 100644
index 00000000000..42f3a8182df
@@ -0,0 +1,31 @@
+From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00 2001
+From: Peter Jones <[email protected]>
+Date: Wed, 13 Jun 2018 09:41:01 -0400
+Subject: [PATCH] remove extra decl
+
+Signed-off-by: Peter Jones <[email protected]>
+
+Upstream-Status: Backport [git://github.com/rhinstaller/efibootmgr.git]
+Signed-off-by: Hongxu Jia <[email protected]>
+
+---
+ src/efibootmgr.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/efibootmgr.c b/src/efibootmgr.c
+index de38f01..4e1a680 100644
+--- a/src/efibootmgr.c
++++ b/src/efibootmgr.c
+@@ -1536,9 +1536,6 @@ parse_opts(int argc, char **argv)
+ 					       "invalid numeric value %s\n",
+ 					       optarg);
+ 			}
+-                        /* XXX efivar-36 accidentally doesn't have a public
+-                         * header for this */
+-			extern int efi_set_verbose(int verbosity, FILE *errlog);
+ 			efi_set_verbose(opts.verbose - 2, stderr);
+ 			break;
+ 		case 'V':
+-- 
+2.7.4
+
Signature · 1 line
2.11.0
#2 lore raw

✗ patchtest: failure for "efivar: add..." and 1 more

In reply to Ross Burton

== Series Details ==

Series: "efivar: add..." and 1 more
Revision: 1
URL : https://patchwork.openembedded.org/series/18066/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format]

  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-bsp/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe