summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2019-11-04 13:17:00 -0800
committerJia Zhang <zhang.jia@linux.alibaba.com>2019-11-08 13:27:23 +0800
commitfab7b8d93da0d7aad865d98b61c33e0529a44437 (patch)
treec85e684b7e6d7d778ace2be3fae31099ab8bf28b
parent1473c05286859f4b2ed7c7e97422f1fa226c9dfb (diff)
downloadmeta-secure-core-fab7b8d93da0d7aad865d98b61c33e0529a44437.tar.gz
shim: Fix compilation problem with latest /usr/include/efi
| x86_64-poky-linux-gcc -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -Wall -Wsign-compare -Werror -fno-builtin -Werror=sign-compare -ffreestanding -std=gnu89 -I/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/9.2.0/include -DDEFAULT_LOADER=L"\SELoaderx64.efi" -DDEFAULT_LOADER_CHAR="\SELoaderx64.efi" -nostdinc -I/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/git/Cryptlib -I/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/git/Cryptlib/Include -I/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/recipe-sysroot/usr/include/efi -I/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/recipe-sysroot/usr/include/efi/x86_64 -I/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/recipe-sysroot/usr/include/efi/protocol -I/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/git/include -iquote /opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/git -iquote /opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/git -DOVERRIDE_SECURITY_POLICY -DENABLE_HTTPBOOT -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -DNO_BUILTIN_VA_FUNCS -DMDE_CPU_X64 -DPAGE_SIZE=4096 -DEFI_ARCH=L"x64" -DDEBUGDIR=L"/usr/lib/debug/usr/share/shim/x64-12-_poky_3.0/" -DVENDOR_CERT_FILE="/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/vendor_cert.cer" -c -o console.o console.c | console.c:363:5: error: 'EFI_WARN_UNKOWN_GLYPH' undeclared here (not in a function); did you mean 'EFI_WARN_UNKNOWN_GLYPH'? | 363 | { EFI_WARN_UNKOWN_GLYPH, L"Warning Unknown Glyph"}, | | ^~~~~~~~~~~~~~~~~~~~~ | | EFI_WARN_UNKNOWN_GLYPH | <builtin>: recipe for target 'console.o' failed | make[1]: *** [console.o] Error 1 | make[1]: Leaving directory '/opt/tmp/work/core2-64-poky-linux/shim/12+gitAUTOINC+5202f80c32-r0/git/lib' | Makefile:223: recipe for target 'lib/lib.a' failed | make: *** [lib/lib.a] Error 2 | WARNING: exit code 1 from a shell command. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-rw-r--r--meta-efi-secure-boot/recipes-bsp/shim/shim/0001-console.c-Fix-compilation-against-latest-usr-include.patch39
-rw-r--r--meta-efi-secure-boot/recipes-bsp/shim/shim_git.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-efi-secure-boot/recipes-bsp/shim/shim/0001-console.c-Fix-compilation-against-latest-usr-include.patch b/meta-efi-secure-boot/recipes-bsp/shim/shim/0001-console.c-Fix-compilation-against-latest-usr-include.patch
new file mode 100644
index 0000000..fb7ac4b
--- /dev/null
+++ b/meta-efi-secure-boot/recipes-bsp/shim/shim/0001-console.c-Fix-compilation-against-latest-usr-include.patch
@@ -0,0 +1,39 @@
1From: Jason Wessel <jason.wessel@windriver.com>
2Date: Mon, 4 Nov 2019 12:42:49 -0800
3Subject: [PATCH] console.c: Fix compilation against latest /usr/include/efi
4MIME-Version: 1.0
5Content-Type: text/plain; charset=UTF-8
6Content-Transfer-Encoding: 8bit
7
8| gcc -I/opt/tmp/work/x86_64-linux/efitools-native/1.9.2+gitAUTOINC+392836a46c-r0/git/include/ -I/opt/tmp/work/x86_64-linux/efitools-native/1.9.2+gitAUTOINC+392836a46c-r0/recipe-sysroot-native/usr/include -I/opt/tmp/work/x86_64-linux/efitools-native/1.9.2+gitAUTOINC+392836a46c-r0/recipe-sysroot-native/usr/include/efi -I/opt/tmp/work/x86_64-linux/efitools-native/1.9.2+gitAUTOINC+392836a46c-r0/recipe-sysroot-native/usr/include/efi/x86_64 -I/opt/tmp/work/x86_64-linux/efitools-native/1.9.2+gitAUTOINC+392836a46c-r0/recipe-sysroot-native/usr/include/efi/protocol -O2 -g -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -fno-toplevel-reorder -DBUILD_EFI -c console.c -o console.efi.o
9| console.c:360:5: error: ‘EFI_WARN_UNKOWN_GLYPH’ undeclared here (not in a function); did you mean ‘EFI_WARN_UNKNOWN_GLYPH’?
10| { EFI_WARN_UNKOWN_GLYPH, L"Warning Unknown Glyph"},
11| ^~~~~~~~~~~~~~~~~~~~~
12| EFI_WARN_UNKNOWN_GLYPH
13| ../Make.rules:113: recipe for target 'console.efi.o' failed
14|
15
16
17Upstream-Status: Pending
18
19Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
20---
21 lib/console.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/lib/console.c b/lib/console.c
25index 9c10560..b932a44 100644
26--- a/lib/console.c
27+++ b/lib/console.c
28@@ -357,7 +357,7 @@ static struct {
29 { EFI_SECURITY_VIOLATION, L"Security Violation"},
30
31 // warnings
32- { EFI_WARN_UNKOWN_GLYPH, L"Warning Unknown Glyph"},
33+ { EFI_WARN_UNKNOWN_GLYPH, L"Warning Unknown Glyph"},
34 { EFI_WARN_DELETE_FAILURE, L"Warning Delete Failure"},
35 { EFI_WARN_WRITE_FAILURE, L"Warning Write Failure"},
36 { EFI_WARN_BUFFER_TOO_SMALL, L"Warning Buffer Too Small"},
37--
382.23.0
39
diff --git a/meta-efi-secure-boot/recipes-bsp/shim/shim_git.bb b/meta-efi-secure-boot/recipes-bsp/shim/shim_git.bb
index b5b71c9..e7eef0c 100644
--- a/meta-efi-secure-boot/recipes-bsp/shim/shim_git.bb
+++ b/meta-efi-secure-boot/recipes-bsp/shim/shim_git.bb
@@ -28,6 +28,7 @@ SRC_URI = "\
28 file://0011-Update-verification_method-if-the-loaded-image-is-si.patch;apply=0 \ 28 file://0011-Update-verification_method-if-the-loaded-image-is-si.patch;apply=0 \
29 file://0012-netboot-replace-the-depreciated-EFI_PXE_BASE_CODE.patch \ 29 file://0012-netboot-replace-the-depreciated-EFI_PXE_BASE_CODE.patch \
30 file://0001-MokManager-Use-CompareMem-on-MokListNode.Type-instea.patch \ 30 file://0001-MokManager-Use-CompareMem-on-MokListNode.Type-instea.patch \
31 file://0001-console.c-Fix-compilation-against-latest-usr-include.patch \
31" 32"
32SRC_URI_append_x86-64 = "\ 33SRC_URI_append_x86-64 = "\
33 ${@bb.utils.contains('DISTRO_FEATURES', 'msft', \ 34 ${@bb.utils.contains('DISTRO_FEATURES', 'msft', \