aboutsummaryrefslogtreecommitdiff
path: root/tests/scripts/makefile
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-01-25 15:07:04 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2026-01-25 15:07:04 +0200
commite8a7fe3bd5c40168d531a6a4f00a7417a278d58c (patch)
treeddbbead310cd8951ea277eb4e1a13dff7d1a3dd9 /tests/scripts/makefile
parent783e615ca031045eaa979532fc2c2b762ed8593f (diff)
downloadkmi-e8a7fe3bd5c40168d531a6a4f00a7417a278d58c.tar.gz
kmi-e8a7fe3bd5c40168d531a6a4f00a7417a278d58c.zip
allow reading fdt in tests
Diffstat (limited to 'tests/scripts/makefile')
-rw-r--r--tests/scripts/makefile22
1 files changed, 21 insertions, 1 deletions
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