From 551137d4ebfd410a4995f705e70a85e4fa0192f4 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Wed, 16 Jun 2021 20:58:49 -0700 Subject: [PATCH] sbsigntool: Fix for target build * Remove unnecessary inherit native This is a target recipe, the "inherit native" is not needed, the sbsigntool-native is extended by BBCLASSEXTEND which is already present. Fixed when multilib is enabled: $ bitbake lib32-sbsigntool ERROR: Nothing PROVIDES 'lib32-sbsigntool'. * Add util-linux-libuuid to DEPENDS since it is required by target build * Add read_write_all.c to common_SOURCES to fix build errors. Signed-off-by: Robert Yang --- ...Add-read_write_all.c-to-common_SOURC.patch | 33 +++++++++++++++++++ .../sbsigntool/sbsigntool_git.bb | 7 ++-- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 meta-signing-key/recipes-devtools/sbsigntool/sbsigntool/0001-src-Makefile.am-Add-read_write_all.c-to-common_SOURC.patch diff --git a/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool/0001-src-Makefile.am-Add-read_write_all.c-to-common_SOURC.patch b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool/0001-src-Makefile.am-Add-read_write_all.c-to-common_SOURC.patch new file mode 100644 index 0000000..70438f1 --- /dev/null +++ b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool/0001-src-Makefile.am-Add-read_write_all.c-to-common_SOURC.patch @@ -0,0 +1,33 @@ +From c86fa2201f864585f470f33cec4f6d0bf10475a1 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Thu, 17 Jun 2021 08:05:25 +0000 +Subject: [PATCH] src/Makefile.am: Add read_write_all.c to common_SOURCES + +It is required by image.c. + +Fixed: +src/image.c:659: undefined reference to `write_all' + +Upstream-Status: Pending + +Signed-off-by: Robert Yang +--- + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index e3f039b..34a0beb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -5,7 +5,7 @@ coff_headers = coff/external.h coff/pe.h + AM_CFLAGS = -Wall -Wextra --std=gnu99 + + common_SOURCES = idc.c idc.h image.c image.h fileio.c fileio.h \ +- efivars.h $(coff_headers) ++ ../lib/ccan.git/ccan/read_write_all/read_write_all.c efivars.h $(coff_headers) + common_LDADD = ../lib/ccan/libccan.a $(libcrypto_LIBS) + common_CFLAGS = -I$(top_srcdir)/lib/ccan/ -Werror + +-- +2.29.2 + diff --git a/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb index c9cc615..c38fa42 100644 --- a/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb +++ b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "\ file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \ " -DEPENDS += "binutils openssl gnu-efi gnu-efi-native" +DEPENDS += "binutils openssl gnu-efi gnu-efi-native util-linux-libuuid" DEPENDS += "binutils-native help2man-native coreutils-native openssl-native util-linux-native" SRC_URI = " \ @@ -15,7 +15,8 @@ SRC_URI = " \ git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan \ file://0001-configure-Dont-t-check-for-gnu-efi.patch \ file://0002-docs-Don-t-build-man-pages.patch \ - file://0003-sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \ + file://0003-sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \ + file://0001-src-Makefile.am-Add-read_write_all.c-to-common_SOURC.patch \ " SRCREV_sbsigntools ?= "f12484869c9590682ac3253d583bf59b890bb826" SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" @@ -25,7 +26,7 @@ PV = "0.9.2-git${SRCPV}" S = "${WORKDIR}/git" -inherit autotools-brokensep pkgconfig native +inherit autotools-brokensep pkgconfig def efi_arch(d): import re