Boot Linux faster!

Check our new training course

Boot Linux faster!

Check our new training course
and Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

#
# Copyright (c) 2017 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0


# 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)