Commit 818010d9 authored by Grant Likely's avatar Grant Likely
Browse files

Collect common QEMU arguments into common place



Use a single variable for the common QEMU arguments and document how to
run U-Boot in QEMU.

Signed-off-by: Grant Likely's avatarGrant Likely <grant.likely@arm.com>
parent d01f29d6
...@@ -31,14 +31,18 @@ ifeq ($(CONFIG_OPTEE),y) ...@@ -31,14 +31,18 @@ ifeq ($(CONFIG_OPTEE),y)
endif endif
cp $(UBOOT_OUTPUT)/u-boot.bin output/bl33.bin cp $(UBOOT_OUTPUT)/u-boot.bin output/bl33.bin
# Core QEMU configuration.
QEMU_BASE_CONFIG += -machine virt,secure=on -cpu cortex-a57
QEMU_BASE_CONFIG += -smp 2 -m 1024 -d unimp -monitor null -no-acpi
QEMU_BASE_CONFIG += -nographic
QEMU_BASE_CONFIG += -serial stdio # Non-secure; u-boot console
QEMU_BASE_CONFIG += -serial tcp::5000,server,nowait # Secure; optee
ifneq ($(VIRTDISK),)
QEMU_BASE_CONFIG += -drive if=virtio,format=raw,file=$(VIRTDISK)
endif
qemu-fip: qemu-fip:
qemu-system-aarch64 -nographic -machine virt,secure=on -cpu cortex-a57 \ qemu-system-aarch64 $(QEMU_BASE_CONFIG) -bios $(FLASH_IMAGE) $(QEMU_EXTRA)
-no-acpi -smp 2 -m 1024 -bios $(FLASH_IMAGE) -d unimp \
-monitor null -serial stdio -serial tcp::5000,server,nowait
qemu-semihosting: qemu-semihosting:
cd output && qemu-system-aarch64 -nographic -machine virt,secure=on -cpu cortex-a57 \ cd output && qemu-system-aarch64 $(QEMU_BASE_CONFIG) -bios bl1.bin -semihosting-config enable,target=native $(QEMU_EXTRA)
-no-acpi -smp 2 -m 1024 -bios bl1.bin -d unimp \
-monitor null -serial stdio -serial tcp::5000,server,nowait \
-semihosting-config enable,target=native
...@@ -60,6 +60,17 @@ help: ...@@ -60,6 +60,17 @@ help:
@echo ' devicetree/<name> - Build Devicetree target <name> *' @echo ' devicetree/<name> - Build Devicetree target <name> *'
@echo ' * Can only be called if U-Boot is configured' @echo ' * Can only be called if U-Boot is configured'
@echo '' @echo ''
@echo 'Emulation targets (if available for given u-boot configuration:'
@echo ''
@echo ' qemu-fip: - Boot in QEMU using FIP image as -bios'
@echo ' qemu-semihosting: - Boot in QEMU with semihosting'
@echo ''
@echo ' QEMU configuration can be manipulated with environmental variables:'
@echo ' VIRTDISK Path to a raw disk image. Could be an ISO, or a GPT or MBR'
@echo ' partitioned disk image. The image will be passed to QEMU as a'
@echo ' virtio block device'
@echo ' QEMU_EXTRA List of extra command line options passed to QEMU'
@echo ''
@echo 'Other targets:' @echo 'Other targets:'
@echo '' @echo ''
@echo ' help - This help text' @echo ' help - This help text'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment