mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.4 KiB
Makefile
45 lines
1.4 KiB
Makefile
#
|
|
# x86_64 system tests
|
|
#
|
|
|
|
X64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/x86_64/system
|
|
X64_SYSTEM_TESTS=$(patsubst $(X64_SYSTEM_SRC)/%.c, %, $(wildcard $(X64_SYSTEM_SRC)/*.c))
|
|
|
|
VPATH+=$(X64_SYSTEM_SRC)
|
|
|
|
# These objects provide the basic boot code and helper functions for all tests
|
|
CRT_OBJS=boot.o
|
|
|
|
CRT_PATH=$(X64_SYSTEM_SRC)
|
|
LINK_SCRIPT=$(X64_SYSTEM_SRC)/kernel.ld
|
|
LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_x86_64
|
|
CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
|
|
LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
|
|
|
|
TESTS+=$(MULTIARCH_TESTS) $(X64_SYSTEM_TESTS)
|
|
EXTRA_RUNS+=$(MULTIARCH_RUNS)
|
|
|
|
# building head blobs
|
|
.PRECIOUS: $(CRT_OBJS)
|
|
|
|
%.o: $(CRT_PATH)/%.S
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack -c $< -o $@
|
|
|
|
# Build and link the tests
|
|
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
|
|
|
memory: CFLAGS+=-DCHECK_UNALIGNED=1
|
|
|
|
# Running
|
|
QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel
|
|
|
|
ifeq ($(CONFIG_PLUGIN),y)
|
|
run-plugin-patch-target-with-libpatch.so: \
|
|
PLUGIN_ARGS=$(COMMA)target=ffc0$(COMMA)patch=9090$(COMMA)use_hwaddr=true
|
|
run-plugin-patch-target-with-libpatch.so: \
|
|
CHECK_PLUGIN_OUTPUT_COMMAND=$(X64_SYSTEM_SRC)/validate-patch.py $@.out
|
|
run-plugin-patch-target-with-libpatch.so: patch-target libpatch.so
|
|
EXTRA_RUNS_WITH_PLUGIN+=run-plugin-patch-target-with-libpatch.so
|
|
endif
|