Skip to content

Commit

Permalink
qemu: cleanup qemu configurations
Browse files Browse the repository at this point in the history
Move all QEMU related defines to the boards and cleanup xtensa platforms
which were marked to be QEMU capable by mistake.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif authored and andrewboie committed Sep 23, 2017
1 parent 10b24a8 commit 66f1f89
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,6 @@ ifdef MAKEFILE_TOOLCHAIN_DO_PASS2
include $(srctree)/scripts/Makefile.toolchain.$(ZEPHYR_GCC_VARIANT)
endif

QEMU = $(addsuffix /,$(QEMU_BIN_PATH))$(QEMU_$(ARCH))

# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
Expand Down
7 changes: 0 additions & 7 deletions arch/xtensa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,3 @@ cflags-$(CONFIG_LTO) += $(call cc-option,-flto,)

KBUILD_CFLAGS += $(cflags-y)
KBUILD_CXXFLAGS += $(cflags-y)

QEMU_CPU_TYPE_xtensa ?= unsupported
QEMU_FLAGS_xtensa = -cpu $(QEMU_CPU_TYPE_xtensa) \
-machine sim -semihosting -nographic
QEMU_xtensa = qemu-system-xtensa

export QEMU_FLAGS_xtensa QEMU_xtensa
2 changes: 0 additions & 2 deletions arch/xtensa/soc/D_233L/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
obj- = soc.o

QEMU_CPU_TYPE_xtensa = dc233c
1 change: 0 additions & 1 deletion arch/xtensa/soc/sample_controller/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
obj- = soc.o

QEMU_CPU_TYPE_xtensa = sample_controller
2 changes: 1 addition & 1 deletion boards/arm/qemu_cortex_m3/Makefile.board
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ QEMU_arm = qemu-system-arm
DEBUG_SCRIPT = qemu.sh

debugserver: QEMU_EXTRA_FLAGS += -s -S
debugserver: qemu
debugserver: run

export QEMU_FLAGS_arm QEMU_arm
2 changes: 1 addition & 1 deletion boards/nios2/qemu_nios2/Makefile.board
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ QEMU_nios2 = qemu-system-nios2
DEBUG_SCRIPT = qemu.sh

debugserver: QEMU_EXTRA_FLAGS += -s -S
debugserver: qemu
debugserver: run
2 changes: 1 addition & 1 deletion boards/riscv32/qemu_riscv32/Makefile.board
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ QEMU_riscv32 = qemu-system-riscv32
DEBUG_SCRIPT = qemu.sh

debugserver: QEMU_EXTRA_FLAGS += -s -S
debugserver: qemu
debugserver: run
2 changes: 1 addition & 1 deletion boards/x86/qemu_x86/Makefile.board
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ QEMU_x86 = qemu-system-i386
DEBUG_SCRIPT = qemu.sh

debugserver: QEMU_EXTRA_FLAGS += -s -S
debugserver: qemu
debugserver: run

export QEMU_FLAGS_x86 QEMU_x86 QEMU_CPU_TYPE_x86
11 changes: 11 additions & 0 deletions boards/xtensa/qemu_xtensa/Makefile.board
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
EMU_PLATFORM ?= qemu

QEMU_CPU_TYPE_xtensa = sample_controller
QEMU_FLAGS_xtensa = -cpu $(QEMU_CPU_TYPE_xtensa) \
-machine sim -semihosting -nographic
QEMU_xtensa = qemu-system-xtensa

DEBUG_SCRIPT = qemu.sh

debugserver: QEMU_EXTRA_FLAGS += -s -S
debugserver: run

export QEMU_FLAGS_xtensa QEMU_xtensa
1 change: 1 addition & 0 deletions scripts/Makefile.qemu
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# QEMU_INSTANCE is a command line argument to make. By appending the instance
# name to the pid file we can easily run more instances of the same sample.
QEMU_FLAGS = $(QEMU_FLAGS_$(ARCH)) -pidfile qemu$(QEMU_INSTANCE).pid
QEMU = $(addsuffix /,$(QEMU_BIN_PATH))$(QEMU_$(ARCH))

ifneq ($(QEMU_PTY),)
QEMU_FLAGS += -serial pty
Expand Down

0 comments on commit 66f1f89

Please sign in to comment.