From e8a7fe3bd5c40168d531a6a4f00a7417a278d58c Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 25 Jan 2026 15:07:04 +0200 Subject: allow reading fdt in tests --- tests/scripts/makefile | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tests/scripts/makefile') diff --git a/tests/scripts/makefile b/tests/scripts/makefile index 2161427..1ba7615 100644 --- a/tests/scripts/makefile +++ b/tests/scripts/makefile @@ -28,7 +28,27 @@ QEMU := qemu-system-$(ARCH) -machine virt -kernel ../kmi.bin \ -initrd KMI := ../kmi.bin -COMMON := build/printf.o build/string.o + +# common tools available for tests, printf/fdt/initrd handling and common memory +# ops like memset and memcpy. Note that printf uses in-kernel printing at least +# for now, so testsuite must be run on kernels compiled with -DDEBUG=1 +COMMON := build/printf.o \ + build/string.o \ + build/fdt.o \ + build/fdt_ro.o \ + build/bits.o + +# reuse some common parts from source tree. Could maybe split these into a +# common directory to make it a bit easier to work with, but this is not too bad +# for now +build/bits.o: ../src/bits.c $(KMI) + $(COMPILE_TEST) -c ../src/bits.c -o build/bits.o + +build/fdt.o: ../lib/fdt.c $(KMI) + $(COMPILE_TEST) -c ../lib/fdt.c -o build/fdt.o + +build/fdt_ro.o: ../lib/fdt_ro.c $(KMI) + $(COMPILE_TEST) -c ../lib/fdt_ro.c -o build/fdt_ro.o build/printf.o: common/printf.c $(KMI) $(COMPILE_TEST) -c common/printf.c -o build/printf.o -- cgit v1.3