Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ BBFILE_PRIORITY_coreboot = "85"

LAYERVERSION_coreboot = "1"

LAYERSERIES_COMPAT_coreboot = "scarthgap master"
LAYERSERIES_COMPAT_coreboot = "whinlatter"
1 change: 1 addition & 0 deletions recipes-bsp/coreboot-utils/amdtool_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ SRC_URI = " \
git://github.com/coreboot/coreboot.git;branch=main;protocol=https \
file://coreboot-amdtool.patch \
"
SRC_URI:remove = "file://0002-treewide-Work-around-GCC-15-Werror-unterminated-stri.patch;patchdir=${PATCHDIR}"

SRCREV = "e59c5abd13e6be052281a77c076037bc85de7084"

Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/coreboot-utils/cbfstool_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require coreboot-utils.inc
SUMMARY = "Tool for manipulating CBFS file"

SRC_URI += " \
git://review.coreboot.org/vboot.git;destsuffix=git/3rdparty/vboot;name=vboot;protocol=https;branch=main \
git://review.coreboot.org/vboot.git;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/3rdparty/vboot;name=vboot;protocol=https;branch=main \
"

SRCREV_vboot = "0c11187c755394683d1b75bdb103cb1959fa6d40"
Expand Down
7 changes: 5 additions & 2 deletions recipes-bsp/coreboot-utils/coreboot-utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ PV = "4.21+git${SRCPV}"

SRC_URI = " \
git://github.com/Dasharo/coreboot.git;protocol=https;branch=dasharo-4.21\
"
"
SRC_URI:append = " \
file://0002-treewide-Work-around-GCC-15-Werror-unterminated-stri.patch;patchdir=${PATCHDIR} \
"

SRCREV = "d08d5eaa98b1204b5e665d3ae4f63fb6f84a0d77"

S = "${WORKDIR}/git"
PATCHDIR = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ From: wkawka <wiktor.kawka@3mdeb.com>
Date: Fri, 16 Sep 2022 11:09:29 +0200
Subject: [PATCH] Makefile: disable deprecated warnings as errors

Upstream-Status: Pending
Signed-off-by: wkawka <wiktor.kawka@3mdeb.com>
---
Makefile | 2 +-
Expand All @@ -21,5 +22,5 @@ index 7f38bd6b..e3615a11 100644
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 \
--
--
2.25.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
From 0c60beac7c621abe22c96b06f42e55b26c83d686 Mon Sep 17 00:00:00 2001
From: Kas User <kas@example.com>
Date: Sat, 21 Mar 2026 14:42:56 +0000
Subject: [PATCH] treewide: Work around GCC 15
Werror=unterminated-string-initialization

GCC 15 added a new `unterminated-string-initialization` warning. Even
though crossgcc is still using GCC 14, some Linux distributions (e.g.
Arch Linux) already started shipping GCC 15. Given that coreboot uses
`-Werror` (warnings are errors), this new warning causes build errors
for things built using the host toolchain, such as utilities. In this
case, cbfstool is affected, which prevents building coreboot images.

The nonstring attribute is used to tell the compiler whether or not a
string is intentionally not null terminated. Since the attribute is
only included in GCC 15 for multidimensional character arrays (and even
later for clang) we need to check the GCC version before using the
attribute.

On GCC version prior to GCC 15 the nonstring attribute will not be used,
but that is not a problem since the unterminated-string-initialization
warning only exists since GCC 15. So you can still build on all GCC
versions as before. This way it also works if your host toolchain is GCC
15 (which builds commonlib code for cbfstool) and your coreboot cross
toolchain is GCC 14 (which builds commonlib code for coreboot).
Clang is a different matter. According to the documentation, the nonstring
attribute only exists in version 21 which is not yet released by LLVM.

TEST=Build qemu/Q35 successfully

Change-Id: I919d71cb2811e91869ba1ff493a0719ddcc86c36

Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87825
Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>

Upstream-Status: Backport [25.06]
Signed-off-by: Kas User <kas@example.com>
---
src/commonlib/bsd/include/commonlib/bsd/compiler.h | 7 +++++++
src/commonlib/include/commonlib/loglevel.h | 2 +-
util/cbfstool/common.c | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/commonlib/bsd/include/commonlib/bsd/compiler.h b/src/commonlib/bsd/include/commonlib/bsd/compiler.h
index 6bde28db0e..a06ffc22de 100644
--- a/src/commonlib/bsd/include/commonlib/bsd/compiler.h
+++ b/src/commonlib/bsd/include/commonlib/bsd/compiler.h
@@ -62,6 +62,13 @@
#define __printf(a, b) __attribute__((format(printf, a, b)))
#endif

+/* This checks the support for the nonstring attribute on multidimensional character arrays. */
+#if (defined(__GNUC__) && __GNUC__ >= 15) || (defined(__clang__) && __clang_major__ >= 21)
+#define __nonstring __attribute__((__nonstring__))
+#else
+#define __nonstring
+#endif
+
/*
* This evaluates to the type of the first expression, unless that is constant
* in which case it evaluates to the type of the second. This is useful when
diff --git a/src/commonlib/include/commonlib/loglevel.h b/src/commonlib/include/commonlib/loglevel.h
index 34d9824179..5975ebb037 100644
--- a/src/commonlib/include/commonlib/loglevel.h
+++ b/src/commonlib/include/commonlib/loglevel.h
@@ -165,7 +165,7 @@
*/
#define BIOS_LOG_PREFIX_PATTERN "[%.5s] "
#define BIOS_LOG_PREFIX_MAX_LEVEL BIOS_SPEW
-static const char bios_log_prefix[BIOS_LOG_PREFIX_MAX_LEVEL + 1][5] = {
+static const char __nonstring bios_log_prefix[BIOS_LOG_PREFIX_MAX_LEVEL + 1][5] = {
/* Note: These strings are *not* null-terminated to save space. */
[BIOS_EMERG] = "EMERG",
[BIOS_ALERT] = "ALERT",
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index 7154bc9d54..d5eb87ca25 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -192,7 +192,7 @@ uint64_t intfiletype(const char *name)

char *bintohex(uint8_t *data, size_t len)
{
- static const char translate[16] = "0123456789abcdef";
+ static const char __nonstring translate[16] = "0123456789abcdef";

char *result = malloc(len * 2 + 1);
if (result == NULL)
--
2.39.2
2 changes: 0 additions & 2 deletions recipes-bsp/coreboot-utils/futil_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ SRC_URI = " \
"
SRCREV = "dc68f9f1b56d92f76026dca490e79493599ff4cf"

S = "${WORKDIR}/git"

inherit pkgconfig

TARGET_CC_ARCH += "${LDFLAGS}"
Expand Down
5 changes: 3 additions & 2 deletions recipes-bsp/coreboot-utils/intelp2m_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ GO_IMPORT = "github.com/dasharo/coreboot/"
# directory as expected by the go bbclass
SRC_URI = " \
git://github.com/dasharo/coreboot.git;protocol=https;branch=dasharo-4.21;destsuffix=${GO_IMPORT} \
"
"

S = "${WORKDIR}/${GO_IMPORT}/util/intelp2m"
S = "${UNPACKDIR}/${GO_IMPORT}/util/intelp2m"
PATCHDIR = "${UNPACKDIR}/${GO_IMPORT}"

inherit goarch
inherit go
Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/coreboot-utils/msrtool_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ require coreboot-utils.inc

SUMMARY = "Dumps chipset-specific MSR registers."
DEPENDS += "pciutils"
S = "${WORKDIR}/git/util/msrtool"
S = "${UNPACKDIR}/${BP}/util/msrtool"
export PREFIX = "${prefix}"
inherit autotools-brokensep
6 changes: 3 additions & 3 deletions recipes-bsp/coreboot-utils/txesbmantool_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ HOMEPAGE = "https://github.com/Dasharo/coreboot"

LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "\
file://${WORKDIR}/git/LICENSES/GPL-2.0-only.txt;md5=5430828348d2cf7d4b5e8395f774a68e\
file://${UNPACKDIR}/${BP}/LICENSES/GPL-2.0-only.txt;md5=5430828348d2cf7d4b5e8395f774a68e\
"

DEPENDS += "wolfssl"

PV = "1.0+git${SRCPV}"

SRC_URI = "\
git://github.com/Dasharo/coreboot.git;branch=dasharo;protocol=https\
git://github.com/Dasharo/coreboot.git;branch=dasharo;protocol=https \
"

SRCREV = "0c63e7441c20e8a96ca110f53a08db3ac7e5e7fd"

S = "${WORKDIR}/git/util/txesbmantool"
S = "${UNPACKDIR}/${BP}/util/txesbmantool"

inherit pkgconfig

Expand Down