From thuth at redhat.com Fri Oct 17 17:33:20 2025 From: thuth at redhat.com (Thomas Huth) Date: Fri, 17 Oct 2025 08:33:20 +0200 Subject: [SLOF] [PATCH] Silence initializer-string warnings Message-ID: <20251017063320.512189-1-thuth@redhat.com> From: Thomas Huth Recent versions GCC (v15.2) started to complain with a lot of warnings like these: ./dict.xt:1510:115: warning: initializer-string for array of ?unsigned char? truncates NUL terminator but destination lacks ?nonstring? attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 1510 | _gpt_X2d_add_X2d_entry, { .a = xt_tpm_X2d_gpt_X2d_set_X2d_lba1 }, { .c = "\000\021tpm-gp" }, { .c = "t-add-en" }, { .c = "try" },) cod(tpm_X2d_gpt_X2d_add_X2d_entry) | ^~~~~~~~~~ .../slof/slof/prep.h:23:62: note: in definition of macro ?header? 23 | #define header(_xt, _header...) static cell xt_ ## _xt[] = { _header | ^~~~~~~ ./dict.xt:1512:83: warning: initializer-string for array of ?unsigned char? truncates NUL terminator but destination lacks ?nonstring? attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 1512 | header(tpm_X2d_measure_X2d_gpt, { .a = xt_tpm_X2d_gpt_X2d_add_X2d_entry }, { .c = "\000\017tpm-me" }, { .c = "asure-gp" }, { .c = "t" },) cod(tpm_X2d_measure_X2d_gpt) | ^~~~~~~~~~~~~~~~ .../slof/slof/prep.h:23:62: note: in definition of macro ?header? 23 | #define header(_xt, _header...) static cell xt_ ## _xt[] = { _header | ^~~~~~~ etc. It's one of those new extra warnings that are enabled by -Wextra. Of course we could try to go through the code bit by bit, trying to fix those warnings, but in my experience -Wextra often causes more hassle than being really helpful. Thus let's simply drop it from our CFLAGS. We can then also remove the -Wno-unused-parameter which we already had to use to tame the warnings that were enabled by -Wextra. Signed-off-by: Thomas Huth --- make.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make.rules b/make.rules index aea57fe..3505da5 100644 --- a/make.rules +++ b/make.rules @@ -32,7 +32,7 @@ endif CELLSIZE ?= 64 HOSTCC ?= gcc -HOSTCFLAGS = -g -Wall -W -O2 -I. -I../include +HOSTCFLAGS = -g -Wall -O2 -I. -I../include DD = dd ONLY_CC = $(CROSS)gcc -m$(CELLSIZE) $(EXTRA_CC) @@ -72,7 +72,7 @@ AR ?= $(CROSS)ar RANLIB ?= $(CROSS)ranlib CPP ?= $(CROSS)cpp -WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter +WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -Wformat-security CFLAGS ?= -g -O2 -fno-builtin -ffreestanding -nostdinc -msoft-float \ -fno-strict-aliasing -mno-altivec -mabi=no-altivec \ -fno-stack-protector -fno-asynchronous-unwind-tables $(WARNFLAGS) \ -- 2.51.0 From thuth at redhat.com Fri Oct 17 19:21:35 2025 From: thuth at redhat.com (Thomas Huth) Date: Fri, 17 Oct 2025 10:21:35 +0200 Subject: [SLOF] [PATCH] Add a simple .gitlab-ci.yml file for CI compile testing Message-ID: <20251017082135.525320-1-thuth@redhat.com> From: Thomas Huth Now that we've got the SLOF repository on Gitlab, we can use its CI to make sure that both boards can always be compiled properly. For board-qemu, we can also run simple tests, like checking that the nvramrc works as expected. Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2f0131e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +before_script: + - apt-get update -qq + - apt-get install -y --no-install-recommends gcc-powerpc64-linux-gnu make + +board-js2x: + script: + - make -j$(nproc) js2x CROSS=powerpc64-linux-gnu- + +board-qemu: + script: + - apt-get install -y --no-install-recommends qemu-system-ppc seabios + - make -j$(nproc) qemu CROSS=powerpc64-linux-gnu- + - qemu-system-ppc64 -nographic -bios boot_rom.bin + -prom-env 'use-nvramrc?=true' -prom-env 'nvramrc=." SUCCESS" cr halt' + | tee log.txt + - grep -q SUCCESS log.txt -- 2.51.0