Drop users into tmux upon boot #50
27
Makefile
27
Makefile
|
@ -4,6 +4,7 @@ GIT_AUTHOR := $(shell git log -1 --format=%an)
|
|||
GIT_PUBKEY := $(shell git log -1 --format=%GK)
|
||||
GIT_TIMESTAMP := $(shell git log -1 --format=%cd --date=iso)
|
||||
EFI := false
|
||||
GUI := false
|
||||
,:=,
|
||||
export
|
||||
|
||||
|
@ -51,6 +52,32 @@ out/dev-shell.digest: Containerfile | out
|
|||
shell: out/dev-shell.digest
|
||||
docker run -it $(shell cat $<) /bin/sh
|
||||
|
||||
.PHONY: system-vm
|
||||
system-vm:
|
||||
qemu-system-x86_64 \
|
||||
-m 4G \
|
||||
-machine q35,kernel-irqchip=split \
|
||||
-usb \
|
||||
-device sdhci-pci \
|
||||
-device sd-card,drive=external \
|
||||
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
||||
-device usb-storage,drive=usbdrive \
|
||||
-device intel-iommu,intremap=on \
|
||||
-netdev user,id=net0 \
|
||||
-device e1000,netdev=net0 \
|
||||
-chardev socket,path=out/qga.sock,server=on,wait=off,id=qga0 \
|
||||
-device virtio-serial \
|
||||
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \
|
||||
$(if $(filter $(EFI),true) ,\
|
||||
-bios /usr/share/ovmf/OVMF.fd \
|
||||
-drive id=boot$(,)if=virtio$(,)format=raw$(,)file=out/airgap.iso \
|
||||
,\
|
||||
-drive id=usbdrive,if=none,format=raw,file=out/airgap.iso \
|
||||
-boot order=c \
|
||||
) \
|
||||
$(if (,$(wildcard /dev/kvm)),-cpu host --accel kvm,) \
|
||||
$(if $(filter $(GUI),true),,-nographic)
|
||||
|
||||
.PHONY: vm
|
||||
vm: out/dev-shell.digest out/airgap.iso out/sdcard.img
|
||||
docker run -it -v ./out:/out $(shell cat $<) sh -c "\
|
||||
|
|
Loading…
Reference in New Issue