summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-01-19 11:40:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-20 11:57:28 +0000
commit14e27297f4c14fdb64ce1e7c250d2c81aa766a0c (patch)
treefa7627bd224425888b4f2b8ff0737a614b4cb468
parent80a6e76eb4cac62721a1a7d63f17bcaab25a6550 (diff)
downloadpoky-14e27297f4c14fdb64ce1e7c250d2c81aa766a0c.tar.gz
efivar: update 37 -> 38
Drop determinism.patch, resolved by https://github.com/rhboot/efivar/commit/641a1626543ca3bf0cdd5ea0bd6cc3a82462521a Drop no-werror.patch, can now be replaced by ERRORS= in make invocation. Add a patch to efibootmgr to address build failures with new version. (From OE-Core rev: 60665cdd6b1bbed29b919328ab34827c055ed729) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch47
-rw-r--r--meta/recipes-bsp/efibootmgr/efibootmgr_17.bb6
-rw-r--r--meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch26
-rw-r--r--meta/recipes-bsp/efivar/efivar/0001-src-Makefile-build-util.c-separately-for-makeguids.patch38
-rw-r--r--meta/recipes-bsp/efivar/efivar/determinism.patch18
-rw-r--r--meta/recipes-bsp/efivar/efivar/no-werror.patch18
-rw-r--r--meta/recipes-bsp/efivar/efivar_38.bb (renamed from meta/recipes-bsp/efivar/efivar_37.bb)19
7 files changed, 125 insertions, 47 deletions
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch
new file mode 100644
index 0000000000..f8d912391e
--- /dev/null
+++ b/meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch
@@ -0,0 +1,47 @@
1From 07f080184d067c1ebc3fec1b53dd4a06d1a2566a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 17 Jan 2022 23:24:34 +0100
4Subject: [PATCH] src: make compatible with efivar 38
5
6Upstream-Status: Backport
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 src/efibootdump.c | 2 +-
10 src/efibootmgr.c | 4 ++--
11 2 files changed, 3 insertions(+), 3 deletions(-)
12
13diff --git a/src/efibootdump.c b/src/efibootdump.c
14index eceffd6..09bd76e 100644
15--- a/src/efibootdump.c
16+++ b/src/efibootdump.c
17@@ -69,7 +69,7 @@ print_boot_entry(efi_load_option *loadopt, size_t data_size)
18 text_path = alloca(text_path_len);
19 if (!text_path)
20 error(100, "Couldn't allocate memory");
21- rc = efidp_format_device_path(text_path, text_path_len,
22+ rc = efidp_format_device_path((unsigned char *)text_path, text_path_len,
23 dp, pathlen);
24 if (rc < 0) {
25 printf("<bad device path>");
26diff --git a/src/efibootmgr.c b/src/efibootmgr.c
27index 4e1a680..b77b1fb 100644
28--- a/src/efibootmgr.c
29+++ b/src/efibootmgr.c
30@@ -949,7 +949,7 @@ show_vars(const char *prefix)
31 pathlen = efi_loadopt_pathlen(load_option,
32 boot->data_size);
33 dp = efi_loadopt_path(load_option, boot->data_size);
34- rc = efidp_format_device_path(text_path, text_path_len,
35+ rc = efidp_format_device_path((unsigned char *)text_path, text_path_len,
36 dp, pathlen);
37 if (rc < 0)
38 error(18, "Could not parse device path");
39@@ -960,7 +960,7 @@ show_vars(const char *prefix)
40 if (!text_path)
41 error(19, "Could not parse device path");
42
43- rc = efidp_format_device_path(text_path, text_path_len,
44+ rc = efidp_format_device_path((unsigned char *)text_path, text_path_len,
45 dp, pathlen);
46 if (rc < 0)
47 error(20, "Could not parse device path");
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb b/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
index e9dfa0770e..3f883122e0 100644
--- a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
+++ b/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
@@ -13,7 +13,8 @@ COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
13SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https;branch=master \ 13SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https;branch=master \
14 file://0001-remove-extra-decl.patch \ 14 file://0001-remove-extra-decl.patch \
15 file://97668ae0bce776a36ea2001dea63d376be8274ac.patch \ 15 file://97668ae0bce776a36ea2001dea63d376be8274ac.patch \
16 " 16 file://0001-src-make-compatible-with-efivar-38.patch \
17 "
17SRCREV = "e067160ecef8208e1944002e5d50b275733211fb" 18SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
18 19
19S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
@@ -33,3 +34,6 @@ do_install () {
33} 34}
34 35
35CLEANBROKEN = "1" 36CLEANBROKEN = "1"
37# https://github.com/rhboot/efivar/issues/202
38COMPATIBLE_HOST:libc-musl = 'null'
39
diff --git a/meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch b/meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch
new file mode 100644
index 0000000000..cb30d3c430
--- /dev/null
+++ b/meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch
@@ -0,0 +1,26 @@
1From f39a1481a9e465387901d52b07ae56dedcc3838b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sun, 16 Jan 2022 18:25:33 +0100
4Subject: [PATCH] docs: do not build efisecdb manpage
5
6It requires mandoc, which oe-core does not have.
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10---
11 docs/Makefile | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/docs/Makefile b/docs/Makefile
15index c9bf585..91a6078 100644
16--- a/docs/Makefile
17+++ b/docs/Makefile
18@@ -5,7 +5,7 @@ include $(TOPDIR)/src/include/version.mk
19 include $(TOPDIR)/src/include/rules.mk
20 include $(TOPDIR)/src/include/defaults.mk
21
22-MAN1TARGETS = efisecdb.1 \
23+MAN1TARGETS = \
24 efivar.1
25
26 MAN3TARGETS = efi_append_variable.3 \
diff --git a/meta/recipes-bsp/efivar/efivar/0001-src-Makefile-build-util.c-separately-for-makeguids.patch b/meta/recipes-bsp/efivar/efivar/0001-src-Makefile-build-util.c-separately-for-makeguids.patch
new file mode 100644
index 0000000000..02781eb67d
--- /dev/null
+++ b/meta/recipes-bsp/efivar/efivar/0001-src-Makefile-build-util.c-separately-for-makeguids.patch
@@ -0,0 +1,38 @@
1From 80f11fcb46f6b52e13501cb323ca1a849c3f6e88 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 18 Jan 2022 11:53:41 +0100
4Subject: [PATCH] src/Makefile: build util.c separately for makeguids
5
6util.c needs to be built twice when cross-compiling:
7for the build machine to be able to link with
8makeguids which then runs during the same build,
9and then for the actual target.
10
11Upstream-Status: Submitted [https://github.com/rhboot/efivar/pull/203]
12Signed-off-by: Alexander Kanavin <alex@linutronix.de>
13---
14 src/Makefile | 5 ++++-
15 1 file changed, 4 insertions(+), 1 deletion(-)
16
17diff --git a/src/Makefile b/src/Makefile
18index 0e423c4..b10051b 100644
19--- a/src/Makefile
20+++ b/src/Makefile
21@@ -28,10 +28,13 @@ EFIVAR_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFIVAR_SOURCES)))
22 EFISECDB_SOURCES = efisecdb.c guid-symbols.c secdb-dump.c util.c
23 EFISECDB_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFISECDB_SOURCES)))
24 GENERATED_SOURCES = include/efivar/efivar-guids.h guid-symbols.c
25-MAKEGUIDS_SOURCES = makeguids.c util.c
26+MAKEGUIDS_SOURCES = makeguids.c util-makeguids.c
27 MAKEGUIDS_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(MAKEGUIDS_SOURCES)))
28 MAKEGUIDS_OUTPUT = $(GENERATED_SOURCES) guids.lds
29
30+util-makeguids.c :
31+ cp util.c util-makeguids.c
32+
33 ALL_SOURCES=$(LIBEFISEC_SOURCES) $(LIBEFIBOOT_SOURCES) $(LIBEFIVAR_SOURCES) \
34 $(MAKEGUIDS_SOURCES) $(GENERATED_SOURCES) $(EFIVAR_SOURCES) \
35 $(sort $(wildcard include/efivar/*.h))
36--
372.20.1
38
diff --git a/meta/recipes-bsp/efivar/efivar/determinism.patch b/meta/recipes-bsp/efivar/efivar/determinism.patch
deleted file mode 100644
index bdf6bfc4a8..0000000000
--- a/meta/recipes-bsp/efivar/efivar/determinism.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1Fix reproducibility issue caused by unsorted wildcard expansion.
2
3Upstream-Status: Pending
4RP 2021/3/1
5
6Index: git/src/Makefile
7===================================================================
8--- git.orig/src/Makefile
9+++ git/src/Makefile
10@@ -15,7 +15,7 @@ TARGETS=$(LIBTARGETS) $(BINTARGETS) $(PC
11 STATICTARGETS=$(STATICLIBTARGETS) $(STATICBINTARGETS)
12
13 LIBEFIBOOT_SOURCES = crc32.c creator.c disk.c gpt.c loadopt.c path-helpers.c \
14- linux.c $(wildcard linux-*.c)
15+ linux.c $(sort $(wildcard linux-*.c))
16 LIBEFIBOOT_OBJECTS = $(patsubst %.c,%.o,$(LIBEFIBOOT_SOURCES))
17 LIBEFIVAR_SOURCES = dp.c dp-acpi.c dp-hw.c dp-media.c dp-message.c \
18 efivarfs.c error.c export.c guid.c guids.S guid-symbols.c \
diff --git a/meta/recipes-bsp/efivar/efivar/no-werror.patch b/meta/recipes-bsp/efivar/efivar/no-werror.patch
deleted file mode 100644
index 50a0b1023a..0000000000
--- a/meta/recipes-bsp/efivar/efivar/no-werror.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1Don't use -Werror because newer compilers introduce newer warnings.
2
3Upstream-Status: Inappropriate [https://github.com/rhboot/efivar/issues/131]
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6diff --git a/gcc.specs b/gcc.specs
7index 45d43d1..1baf11a 100644
8--- a/gcc.specs
9+++ b/gcc.specs
10@@ -2,7 +2,7 @@
11 + -D_GNU_SOURCE
12
13 *efivar_cpp_options:
14- -Werror -Wall -std=gnu11 -Wextra
15+ -Wall -std=gnu11 -Wextra
16
17 *cpp_options:
18 + %(efivar_cpp_options)
diff --git a/meta/recipes-bsp/efivar/efivar_37.bb b/meta/recipes-bsp/efivar/efivar_38.bb
index fc36913f30..5d2cd470ce 100644
--- a/meta/recipes-bsp/efivar/efivar_37.bb
+++ b/meta/recipes-bsp/efivar/efivar_38.bb
@@ -7,10 +7,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"
7 7
8COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" 8COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
9 9
10SRC_URI = "git://github.com/rhinstaller/efivar.git;branch=master;protocol=https \ 10SRC_URI = "git://github.com/rhinstaller/efivar.git;branch=main;protocol=https \
11 file://determinism.patch \ 11 file://0001-docs-do-not-build-efisecdb-manpage.patch \
12 file://no-werror.patch" 12 file://0001-src-Makefile-build-util.c-separately-for-makeguids.patch \
13SRCREV = "c1d6b10e1ed4ba2be07f385eae5bceb694478a10" 13 "
14SRCREV = "1753149d4176ebfb2b135ac0aaf79340bf0e7a93"
14 15
15S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
16 17
@@ -22,12 +23,8 @@ export CCLD_FOR_BUILD = "${BUILD_CCLD}"
22# enforce BFD. 23# enforce BFD.
23LDFLAGS += "-fuse-ld=bfd" 24LDFLAGS += "-fuse-ld=bfd"
24 25
25do_compile:prepend() { 26do_compile() {
26 # Remove when https://github.com/rhboot/efivar/issues/130 is fixed 27 oe_runmake ERRORS= HOST_CFLAGS="${BUILD_CFLAGS}" HOST_LDFLAGS="${BUILD_LDFLAGS}"
27 oe_runmake \
28 CFLAGS="${BUILD_CFLAGS}" \
29 LDFLAGS="${BUILD_LDFLAGS}" \
30 -C src makeguids
31} 28}
32 29
33do_install() { 30do_install() {
@@ -39,3 +36,5 @@ BBCLASSEXTEND = "native"
39RRECOMMENDS:${PN}:class-target = "kernel-module-efivarfs" 36RRECOMMENDS:${PN}:class-target = "kernel-module-efivarfs"
40 37
41CLEANBROKEN = "1" 38CLEANBROKEN = "1"
39# https://github.com/rhboot/efivar/issues/202
40COMPATIBLE_HOST:libc-musl = 'null'