Skip to contentSkip to conversation

efivar: add

PATCH In review Ross Burton 3 participants 4 messages Jun 12, 2019 – Jun 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 efivar: add

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

The recipe is based on the one in meta-oe but with several updates.

---
 meta/recipes-bsp/efivar/efivar/no-werror.patch | 18 +++++++++++++
 meta/recipes-bsp/efivar/efivar_37.bb           | 37 ++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 meta/recipes-bsp/efivar/efivar/no-werror.patch
 create mode 100644 meta/recipes-bsp/efivar/efivar_37.bb
meta/recipes-bsp/efivar/efivar/no-werror.patch new file +18 -0
new file mode 100644
index 00000000000..50a0b1023a5
@@ -0,0 +1,18 @@
+Don't use -Werror because newer compilers introduce newer warnings.
+
+Upstream-Status: Inappropriate [https://github.com/rhboot/efivar/issues/131]
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/gcc.specs b/gcc.specs
+index 45d43d1..1baf11a 100644
+--- a/gcc.specs
++++ b/gcc.specs
+@@ -2,7 +2,7 @@
+ + -D_GNU_SOURCE
+ 
+ *efivar_cpp_options:
+- -Werror -Wall -std=gnu11 -Wextra
++ -Wall -std=gnu11 -Wextra
+ 
+ *cpp_options:
+ + %(efivar_cpp_options)
meta/recipes-bsp/efivar/efivar_37.bb new file +37 -0
new file mode 100644
index 00000000000..c4254c70d91
@@ -0,0 +1,37 @@
+SUMMARY = "Tools to manipulate UEFI variables"
+DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility"
+HOMEPAGE = "https://github.com/rhboot/efivar"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRC_URI = "git://github.com/rhinstaller/efivar.git \
+           file://no-werror.patch"
+SRCREV = "c1d6b10e1ed4ba2be07f385eae5bceb694478a10"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+export CCLD_FOR_BUILD = "${BUILD_CCLD}"
+
+# Upstream uses --add-needed in gcc.specs which gold doesn't support, so
+# enforce BFD.
+LDFLAGS += "-fuse-ld=bfd"
+
+do_compile_prepend() {
+    # Remove when https://github.com/rhboot/efivar/issues/130 is fixed
+    oe_runmake CFLAGS="${BUILD_CFLAGS}" -C src makeguids
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D}
+}
+
+BBCLASSEXTEND = "native"
+
+RRECOMMENDS_${PN}_class-target = "kernel-module-efivarfs"
+
+CLEANBROKEN = "1"
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 2/2 efibootmgr: add

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

The recipe is based on the one in meta-oe but with several updates.

---
 .../efibootmgr/0001-remove-extra-decl.patch        | 31 ++++++++++++++++++++
 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb       | 34 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch
 create mode 100644 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
meta/recipes-bsp/efibootmgr/efibootmgr/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
+
meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +34 -0
new file mode 100644
index 00000000000..0e5a81e3166
@@ -0,0 +1,34 @@
+DESCRIPTION = "Linux user-space application to modify the EFI Boot Manager."
+SUMMARY = "EFI Boot Manager"
+HOMEPAGE = "https://github.com/rhboot/efibootmgr"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "efivar popt"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \
+           file://0001-remove-extra-decl.patch \
+          "
+SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+# The directory under the ESP that the default bootloader is found in.  When
+# wic uses a subdirectory, this should use the same one too.
+EFIDIR ?= "/"
+
+EXTRA_OEMAKE += "'EFIDIR=${EFIDIR}'"
+
+CFLAGS += " -Wno-error"
+
+do_install () {
+	oe_runmake install DESTDIR="${D}"
+}
+
+CLEANBROKEN = "1"
Signature · 1 line
2.11.0
#2 lore raw

Re: [PATCH v2 2/2] efibootmgr: add

These would need an entry in maintainers.inc as well.

https://autobuilder.yoctoproject.org/typhoon/#/builders/56/builds/519/steps/7/logs/step2d

Thanks,

Anuj

Quoted 110 lines · Ross Burton

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

The recipe is based on the one in meta-oe but with several updates.

---
 .../efibootmgr/0001-remove-extra-decl.patch        | 31
++++++++++++++++++++
 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb       | 34
++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 meta/recipes-bsp/efibootmgr/efibootmgr/0001-
remove-extra-decl.patch
 create mode 100644 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
(quoted diff) +0 -0

extra-decl.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/0001- remove-extra-decl.patch
new file mode 100644
index 00000000000..42f3a8182df

meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra- new file +0 -0

decl.patch

meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra- new file +1 -0
@@ -0,0 +1,31 @@
+From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00

2001

meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra- new file +7 -0
+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]

meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra- new file +12 -0
+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",

meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra- new file +3 -0
+ 					       optarg);
+ 			}
+-                        /* XXX efivar-36 accidentally doesn't have

a public

+-                         * header for this */
+-			extern int efi_set_verbose(int verbosity, FILE

*errlog);

meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra- new file +6 -0
+ 			efi_set_verbose(opts.verbose - 2, stderr);
+ 			break;
+ 		case 'V':
+-- 
+2.7.4
+
meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +1 -0
new file mode 100644
index 00000000000..0e5a81e3166
@@ -0,0 +1,34 @@
+DESCRIPTION = "Linux user-space application to modify the EFI Boot

Manager."

meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +6 -0
+SUMMARY = "EFI Boot Manager"
+HOMEPAGE = "https://github.com/rhboot/efibootmgr"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM =

"file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"

meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +6 -0
+
+DEPENDS = "efivar popt"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRC_URI =

"git://github.com/rhinstaller/efibootmgr.git;protocol=https \

meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +9 -0
+           file://0001-remove-extra-decl.patch \
+          "
+SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+# The directory under the ESP that the default bootloader is found

in. When

meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +12 -0
+# wic uses a subdirectory, this should use the same one too.
+EFIDIR ?= "/"
+
+EXTRA_OEMAKE += "'EFIDIR=${EFIDIR}'"
+
+CFLAGS += " -Wno-error"
+
+do_install () {
+	oe_runmake install DESTDIR="${D}"
+}
+
+CLEANBROKEN = "1"
Signature · 1 line
2.11.0
#3 lore raw

Re: [PATCH v2 2/2] efibootmgr: add

In reply to Ross Burton
Quoted 6 lines · Ross Burton

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

The recipe is based on the one in meta-oe but with several updates.

now there is a patch to meta-oe to remove it and I see built failure with clang/musl on x86_64

make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'. Stop.

see
https://errors.yoctoproject.org/Errors/Details/249267/

meta-oe one did not have this error.

Quoted 93 lines
---
 .../efibootmgr/0001-remove-extra-decl.patch        | 31 ++++++++++++++++++++
 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb       | 34 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch
 create mode 100644 meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
meta/recipes-bsp/efibootmgr/efibootmgr/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
+
meta/recipes-bsp/efibootmgr/efibootmgr_17.bb new file +34 -1
new file mode 100644
index 00000000000..0e5a81e3166
@@ -0,0 +1,34 @@
+DESCRIPTION = "Linux user-space application to modify the EFI Boot Manager."
+SUMMARY = "EFI Boot Manager"
+HOMEPAGE = "https://github.com/rhboot/efibootmgr"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "efivar popt"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \
+           file://0001-remove-extra-decl.patch \
+          "
+SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig
+
+# The directory under the ESP that the default bootloader is found in.  When
+# wic uses a subdirectory, this should use the same one too.
+EFIDIR ?= "/"
+
+EXTRA_OEMAKE += "'EFIDIR=${EFIDIR}'"
+
+CFLAGS += " -Wno-error"
+
+do_install () {
+       oe_runmake install DESTDIR="${D}"
+}
+
+CLEANBROKEN = "1"
--

2.11.0

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