2017-01-08 05:31:34 +08:00
|
|
|
#
|
|
|
|
# Copyright (c) 2017 Intel Corporation
|
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2017-01-08 05:31:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Abstraction of 'run' goal with Qemu
|
|
|
|
|
|
|
|
QEMU_FLAGS = $(QEMU_FLAGS_$(ARCH)) -pidfile qemu.pid
|
|
|
|
|
|
|
|
ifneq ($(QEMU_PTY),)
|
|
|
|
QEMU_FLAGS += -serial pty
|
|
|
|
else
|
|
|
|
ifneq ($(QEMU_PIPE),)
|
|
|
|
# Send console output to a pipe, used for running automated sanity tests
|
|
|
|
QEMU_FLAGS += -serial pipe:$(QEMU_PIPE)
|
|
|
|
else
|
|
|
|
QEMU_FLAGS += -serial mon:stdio
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
qemu: run
|
|
|
|
run: zephyr
|
|
|
|
$(if $(QEMU_PIPE),,@echo "To exit from QEMU enter: 'CTRL+a, x'")
|
|
|
|
@echo '[QEMU] CPU: $(QEMU_CPU_TYPE_$(ARCH))'
|
|
|
|
$(if $(CONFIG_X86_IAMCU),python $(ZEPHYR_BASE)/scripts/qemu-machine-hack.py $(KERNEL_ELF_NAME))
|
|
|
|
$(Q)$(QEMU) $(QEMU_FLAGS) $(QEMU_EXTRA_FLAGS) -kernel $(KERNEL_ELF_NAME)
|