summaryrefslogtreecommitdiff
path: root/config/submodule/coreboot/default/vboot
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-21 23:32:18 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-21 23:40:25 +0100
commite5a5935d8d99dccf66067b5e907d1df81b4a15c4 (patch)
treed2343288aac67ff418897937348f3884920d14f5 /config/submodule/coreboot/default/vboot
parenta2ac4d13981dcb0aa4e5644a9999e55e32a125ec (diff)
fix building coreboot images on i686 hosts
firstly, memtest86+ is currently not cross compiled and relies on 64-bit headers (x86_64 only). a 32-bit distro is unlikely to be able to build 64-bit binaries. secondly: vboot throws a build error due to -Werror when building on 32-bit hosts. we rely on vboot code to build cbfstool, so turn off -Werror on vboot that's all. 32-bit hosts are not recommended; it is assumed that you are building on an x86_64 host. work will go into the build system at a later date to make it more portable, by cross compiling everything, but this should fix 32-bit for now. there are some x60/t60 users who still want to build roms, so let's allow them that possibility. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/submodule/coreboot/default/vboot')
-rw-r--r--config/submodule/coreboot/default/vboot/patches/0001-don-t-treat-warnings-as-errors.patch35
-rw-r--r--config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch26
2 files changed, 35 insertions, 26 deletions
diff --git a/config/submodule/coreboot/default/vboot/patches/0001-don-t-treat-warnings-as-errors.patch b/config/submodule/coreboot/default/vboot/patches/0001-don-t-treat-warnings-as-errors.patch
new file mode 100644
index 00000000..9e14dc7d
--- /dev/null
+++ b/config/submodule/coreboot/default/vboot/patches/0001-don-t-treat-warnings-as-errors.patch
@@ -0,0 +1,35 @@
+From d94300a671688746f2fb3d77eefa631a3ed90306 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <info@minifree.org>
+Date: Sun, 19 May 2024 23:35:52 +0100
+Subject: [PATCH 1/1] don't treat warnings as errors
+
+Signed-off-by: Leah Rowe <info@minifree.org>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4cb265b2..4ba8b2da 100644
+--- a/Makefile
++++ b/Makefile
+@@ -114,7 +114,7 @@ endif
+ # Provide default CC and CFLAGS for firmware builds; if you have any -D flags,
+ # please add them after this point (e.g., -DVBOOT_DEBUG).
+ DEBUG_FLAGS := $(if $(filter-out 0,${DEBUG}),-g -Og,-g -Os)
+-WERROR := -Werror
++WERROR := -Wno-error -w
+ FIRMWARE_FLAGS := -nostdinc -ffreestanding -fno-builtin -fno-stack-protector
+ COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \
+ -Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \
+@@ -128,7 +128,7 @@ COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \
+ # returns: $(1) if compiler was successful, empty string otherwise
+ test_ccflag = $(shell \
+ printf "$(2)\nvoid _start(void) {}\n" | \
+- $(CC) -nostdlib -Werror $(1) -xc -c - -o /dev/null \
++ $(CC) -nostdlib -Wno-error -w $(1) -xc -c - -o /dev/null \
+ >/dev/null 2>&1 && echo "$(1)")
+
+ COMMON_FLAGS += $(call test_ccflag,-Wimplicit-fallthrough)
+--
+2.39.2
+
diff --git a/config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch b/config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch
deleted file mode 100644
index 66428b56..00000000
--- a/config/submodule/coreboot/default/vboot/patches/0001-test-patch.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 68f99140dda455a4f4e9d73df6d7b0a504494e95 Mon Sep 17 00:00:00 2001
-From: Leah Rowe <info@minifree.org>
-Date: Sun, 19 May 2024 23:35:52 +0100
-Subject: [PATCH 1/1] test patch
-
-Signed-off-by: Leah Rowe <info@minifree.org>
----
- Makefile | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Makefile b/Makefile
-index 4cb265b2..ef29489f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2,6 +2,8 @@
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
-
-+# test
-+
- # This Makefile normally builds in a 'build' subdir, but use
- #
- # make BUILD=<dir>
---
-2.39.2
-