From 60665cdd6b1bbed29b919328ab34827c055ed729 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 19 Jan 2022 11:40:42 +0100 Subject: 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. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../0001-docs-do-not-build-efisecdb-manpage.patch | 26 ++++++++++++++ ...ile-build-util.c-separately-for-makeguids.patch | 38 ++++++++++++++++++++ meta/recipes-bsp/efivar/efivar/determinism.patch | 18 ---------- meta/recipes-bsp/efivar/efivar/no-werror.patch | 18 ---------- meta/recipes-bsp/efivar/efivar_37.bb | 41 ---------------------- meta/recipes-bsp/efivar/efivar_38.bb | 40 +++++++++++++++++++++ 6 files changed, 104 insertions(+), 77 deletions(-) create mode 100644 meta/recipes-bsp/efivar/efivar/0001-docs-do-not-build-efisecdb-manpage.patch create mode 100644 meta/recipes-bsp/efivar/efivar/0001-src-Makefile-build-util.c-separately-for-makeguids.patch delete mode 100644 meta/recipes-bsp/efivar/efivar/determinism.patch delete mode 100644 meta/recipes-bsp/efivar/efivar/no-werror.patch delete mode 100644 meta/recipes-bsp/efivar/efivar_37.bb create mode 100644 meta/recipes-bsp/efivar/efivar_38.bb (limited to 'meta/recipes-bsp/efivar') 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 @@ +From f39a1481a9e465387901d52b07ae56dedcc3838b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sun, 16 Jan 2022 18:25:33 +0100 +Subject: [PATCH] docs: do not build efisecdb manpage + +It requires mandoc, which oe-core does not have. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + docs/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/Makefile b/docs/Makefile +index c9bf585..91a6078 100644 +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -5,7 +5,7 @@ include $(TOPDIR)/src/include/version.mk + include $(TOPDIR)/src/include/rules.mk + include $(TOPDIR)/src/include/defaults.mk + +-MAN1TARGETS = efisecdb.1 \ ++MAN1TARGETS = \ + efivar.1 + + 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 @@ +From 80f11fcb46f6b52e13501cb323ca1a849c3f6e88 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 18 Jan 2022 11:53:41 +0100 +Subject: [PATCH] src/Makefile: build util.c separately for makeguids + +util.c needs to be built twice when cross-compiling: +for the build machine to be able to link with +makeguids which then runs during the same build, +and then for the actual target. + +Upstream-Status: Submitted [https://github.com/rhboot/efivar/pull/203] +Signed-off-by: Alexander Kanavin +--- + src/Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 0e423c4..b10051b 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -28,10 +28,13 @@ EFIVAR_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFIVAR_SOURCES))) + EFISECDB_SOURCES = efisecdb.c guid-symbols.c secdb-dump.c util.c + EFISECDB_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFISECDB_SOURCES))) + GENERATED_SOURCES = include/efivar/efivar-guids.h guid-symbols.c +-MAKEGUIDS_SOURCES = makeguids.c util.c ++MAKEGUIDS_SOURCES = makeguids.c util-makeguids.c + MAKEGUIDS_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(MAKEGUIDS_SOURCES))) + MAKEGUIDS_OUTPUT = $(GENERATED_SOURCES) guids.lds + ++util-makeguids.c : ++ cp util.c util-makeguids.c ++ + ALL_SOURCES=$(LIBEFISEC_SOURCES) $(LIBEFIBOOT_SOURCES) $(LIBEFIVAR_SOURCES) \ + $(MAKEGUIDS_SOURCES) $(GENERATED_SOURCES) $(EFIVAR_SOURCES) \ + $(sort $(wildcard include/efivar/*.h)) +-- +2.20.1 + 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 @@ -Fix reproducibility issue caused by unsorted wildcard expansion. - -Upstream-Status: Pending -RP 2021/3/1 - -Index: git/src/Makefile -=================================================================== ---- git.orig/src/Makefile -+++ git/src/Makefile -@@ -15,7 +15,7 @@ TARGETS=$(LIBTARGETS) $(BINTARGETS) $(PC - STATICTARGETS=$(STATICLIBTARGETS) $(STATICBINTARGETS) - - LIBEFIBOOT_SOURCES = crc32.c creator.c disk.c gpt.c loadopt.c path-helpers.c \ -- linux.c $(wildcard linux-*.c) -+ linux.c $(sort $(wildcard linux-*.c)) - LIBEFIBOOT_OBJECTS = $(patsubst %.c,%.o,$(LIBEFIBOOT_SOURCES)) - LIBEFIVAR_SOURCES = dp.c dp-acpi.c dp-hw.c dp-media.c dp-message.c \ - 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 @@ -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 - -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) diff --git a/meta/recipes-bsp/efivar/efivar_37.bb b/meta/recipes-bsp/efivar/efivar_37.bb deleted file mode 100644 index fc36913f30..0000000000 --- a/meta/recipes-bsp/efivar/efivar_37.bb +++ /dev/null @@ -1,41 +0,0 @@ -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;branch=master;protocol=https \ - file://determinism.patch \ - 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}" \ - LDFLAGS="${BUILD_LDFLAGS}" \ - -C src makeguids -} - -do_install() { - oe_runmake install DESTDIR=${D} -} - -BBCLASSEXTEND = "native" - -RRECOMMENDS:${PN}:class-target = "kernel-module-efivarfs" - -CLEANBROKEN = "1" diff --git a/meta/recipes-bsp/efivar/efivar_38.bb b/meta/recipes-bsp/efivar/efivar_38.bb new file mode 100644 index 0000000000..5d2cd470ce --- /dev/null +++ b/meta/recipes-bsp/efivar/efivar_38.bb @@ -0,0 +1,40 @@ +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;branch=main;protocol=https \ + file://0001-docs-do-not-build-efisecdb-manpage.patch \ + file://0001-src-Makefile-build-util.c-separately-for-makeguids.patch \ + " +SRCREV = "1753149d4176ebfb2b135ac0aaf79340bf0e7a93" + +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() { + oe_runmake ERRORS= HOST_CFLAGS="${BUILD_CFLAGS}" HOST_LDFLAGS="${BUILD_LDFLAGS}" +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + +BBCLASSEXTEND = "native" + +RRECOMMENDS:${PN}:class-target = "kernel-module-efivarfs" + +CLEANBROKEN = "1" +# https://github.com/rhboot/efivar/issues/202 +COMPATIBLE_HOST:libc-musl = 'null' -- cgit 1.2.3-korg