On 20/10/2024 03.29, jrossi@linux.ibm.com wrote:
From: Jared Rossi <jrossi@linux.ibm.com>
We are already using the libc from SLOF for the s390-netboot.img, and
this libc implementation is way more complete and accurate than the
simple implementation that we currently use for the s390-ccw.img binary.
Since we are now always assuming that the SLOF submodule is available
when building the s390-ccw bios (see commit bf6903f6944f), we can drop
the simple implementation and use the SLOF libc for the s390-ccw.img
binary, too.
Additionally replace sclp_print calls with puts/printf now that it is
avaliable.
Co-authored by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jared Rossi <jrossi@linux.ibm.com>
---
pc-bios/s390-ccw/netboot.mak | 3 --
pc-bios/s390-ccw/bootmap.h | 4 +-
pc-bios/s390-ccw/libc.h | 89 --------------------------------
I just had to discover that the removal of the old libc breaks "make
check-tcg" since it uses the sclp.c from the firmware for printing.
I'll squash this patch to fix it:
diff --git a/tests/tcg/s390x/console.c b/tests/tcg/s390x/console.c
--- a/tests/tcg/s390x/console.c
+++ b/tests/tcg/s390x/console.c
@@ -4,7 +4,10 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+
#include "../../../pc-bios/s390-ccw/sclp.c"
+#include "../../../roms/SLOF/lib/libc/string/memset.c"
+#include "../../../roms/SLOF/lib/libc/string/memcpy.c"
void __sys_outc(char c)
{
diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/
Makefile.softmmu-target
--- a/tests/tcg/s390x/Makefile.softmmu-target
+++ b/tests/tcg/s390x/Makefile.softmmu-target
@@ -3,7 +3,9 @@ VPATH+=$(S390X_SRC)
# EXTFLAGS can be passed by the user, e.g. to override the --accel
QEMU_OPTS+=-action panic=exit-failure -nographic -serial chardev:output
$(EXTFLAGS) -kernel
LINK_SCRIPT=$(S390X_SRC)/softmmu.ld
-CFLAGS+=-ggdb -O0
+CFLAGS+=-ggdb -O0 \
+ -I$(SRC_PATH)/roms/SLOF/lib/libc/include/ \