Lines Matching +full:check +full:- +full:system +full:- +full:ubuntu
9 VM_VENV = check-venv
12 .PHONY: vm-build-all vm-clean-all
14 EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
20 ARM64_IMAGES += ubuntu.aarch64 centos.aarch64
24 HOST_ARCH = $(shell uname -m)
31 IMAGES_DIR := $(HOME)/.cache/qemu-vm/images
37 HAVE_PYTHON_YAML = $(shell $(PYTHON) -c "import yaml" 2> /dev/null && echo yes)
40 # 'vm-help' target was historically named 'vm-test'
41 vm-help vm-test:
42 @echo "vm-help: Test QEMU in preconfigured virtual machines"
44 @echo " vm-build-freebsd - Build QEMU in FreeBSD VM"
45 @echo " vm-build-netbsd - Build QEMU in NetBSD VM"
46 @echo " vm-build-openbsd - Build QEMU in OpenBSD VM"
49 @echo " vm-build-ubuntu.aarch64 - Build QEMU in ubuntu aarch64 VM"
50 @echo " vm-build-centos.aarch64 - Build QEMU in CentOS aarch64 VM"
52 @echo " (to build centos/ubuntu aarch64 images use configure --efi-aarch64)"
55 @echo " (install genisoimage to build centos/ubuntu images)"
57 @echo " vm-build-haiku.x86_64 - Build QEMU in Haiku VM"
59 @echo " vm-build-all - Build QEMU in: $(IMAGES)"
60 @echo " vm-clean-all - Clean up VM images"
62 @echo "For trouble-shooting:"
63 @echo " vm-boot-serial-<guest> - Boot guest, serial console on stdio"
64 @echo " vm-boot-ssh-<guest> - Boot guest and login via ssh"
67 @echo " BUILD_TARGET=foo - Override the build target"
68 @echo " DEBUG=1 - Enable verbose output on host and interactive debugging"
69 @echo ' EXTRA_CONFIGURE_OPTS="..." - Pass to configure step'
70 @echo " J=[0..9]* - Override the -jN parameter for make commands"
71 @echo " LOG_CONSOLE=1 - Log console to file in: ~/.cache/qemu-vm "
72 @echo " USE_TCG=1 - Use TCG for cross-arch images"
73 @echo " QEMU=/path/to/qemu - Change path to QEMU binary"
75 @echo " QEMU_CONFIG=/path/conf.yml - Change path to VM configuration .yml file."
77 @echo " (install python3-yaml to enable support for yaml file to configure a VM.)"
80 @echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool"
81 @echo " QEMU_LOCAL=1 - Use QEMU binary local to this build."
82 @echo " TARGET_LIST=a,b,c - Override target list in builds"
83 @echo " V=1 - Enable verbose output on host and guest commands"
85 vm-build-all: $(addprefix vm-build-, $(IMAGES))
87 vm-clean-all:
88 rm -f $(IMAGE_FILES)
94 @mkdir -p $(IMAGES_DIR)
95 $(call quiet-command, \
97 $(if $(V)$(DEBUG), --debug) \
98 $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \
99 $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \
100 $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \
101 $(if $(LOG_CONSOLE),--log-console) \
102 --source-path $(SRC_PATH) \
103 --image "$@" \
104 $(if $(filter-out check-venv, $?), --force) \
105 --build-image $@, \
106 " VM-IMAGE $*")
109 vm-build-%: $(IMAGES_DIR)/%.img $(VM_VENV)
110 $(call quiet-command, \
112 $(if $(V)$(DEBUG), --debug) \
113 $(if $(DEBUG), --interactive) \
114 $(if $(J),--jobs $(J)) \
115 $(if $(V),--verbose) \
116 $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \
117 $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \
118 $(if $(LOG_CONSOLE),--log-console) \
119 --image "$<" \
120 $(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
121 --snapshot \
122 --build-qemu $(SRC_PATH) -- \
123 $(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \
125 " VM-BUILD $*")
127 vm-boot-serial-%: $(IMAGES_DIR)/%.img
128 qemu-system-x86_64 -enable-kvm -m 4G -smp 2 -nographic \
129 -drive if=none,id=vblk,cache=writeback,file="$<" \
130 -netdev user,id=vnet \
131 -device virtio-blk-pci,drive=vblk \
132 -device virtio-net-pci,netdev=vnet \
135 vm-boot-ssh-%: $(IMAGES_DIR)/%.img $(VM_VENV)
136 $(call quiet-command, \
138 $(if $(J),--jobs $(J)) \
139 $(if $(V)$(DEBUG), --debug) \
140 $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \
141 $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \
142 $(if $(LOG_CONSOLE),--log-console) \
143 --image "$<" \
144 --interactive \
146 " VM-BOOT-SSH $*") || true