2024-06-18 08:45:21 +00:00
|
|
|
VERSION := $(shell git tag --points-at HEAD)
|
|
|
|
GIT_REF := $(shell git log -1 --format=%H)
|
|
|
|
GIT_AUTHOR := $(shell git log -1 --format=%an)
|
|
|
|
GIT_KEY := $(shell git log -1 --format=%GP)
|
|
|
|
GIT_TIMESTAMP := $(shell git log -1 --format=%cd --date=iso)
|
|
|
|
|
2023-02-12 12:40:54 +00:00
|
|
|
.DEFAULT_GOAL :=
|
|
|
|
.PHONY: default
|
|
|
|
default: \
|
2024-06-11 21:07:13 +00:00
|
|
|
out/airgap.iso
|
2023-01-30 23:17:54 +00:00
|
|
|
|
|
|
|
.PHONY: vm
|
2024-06-17 18:56:18 +00:00
|
|
|
vm: vm-bios
|
|
|
|
|
|
|
|
.PHONY: vm-bios
|
|
|
|
vm-bios: out/airgap.iso
|
2024-06-11 21:07:13 +00:00
|
|
|
qemu-system-x86_64 \
|
2024-06-17 18:56:18 +00:00
|
|
|
-m 4G \
|
2024-06-11 21:07:13 +00:00
|
|
|
-machine pc \
|
2024-06-17 18:56:18 +00:00
|
|
|
-serial stdio \
|
2024-06-26 07:46:56 +00:00
|
|
|
-usb \
|
|
|
|
-device sdhci-pci \
|
|
|
|
-device sd-card,drive=external \
|
2024-06-27 07:14:34 +00:00
|
|
|
-usbdevice tablet \
|
2024-06-26 07:46:56 +00:00
|
|
|
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
2024-06-27 07:14:34 +00:00
|
|
|
-display gtk,show-menubar=off,zoom-to-fit=on \
|
2024-06-11 21:07:13 +00:00
|
|
|
-cdrom "out/airgap.iso"
|
2020-07-24 10:07:39 +00:00
|
|
|
|
2024-06-17 18:56:18 +00:00
|
|
|
.PHONY: vm-efi
|
2024-06-18 08:45:21 +00:00
|
|
|
vm-efi: out/airgap.iso
|
2024-06-11 21:07:13 +00:00
|
|
|
qemu-system-x86_64 \
|
|
|
|
-m 4G \
|
2024-06-17 18:56:18 +00:00
|
|
|
-machine pc \
|
|
|
|
-serial stdio \
|
2024-06-11 21:07:13 +00:00
|
|
|
-bios /usr/share/ovmf/OVMF.fd \
|
2024-06-26 07:46:56 +00:00
|
|
|
-usb \
|
|
|
|
-device sdhci-pci \
|
|
|
|
-device sd-card,drive=external \
|
2024-06-27 07:14:34 +00:00
|
|
|
-usbdevice tablet \
|
2024-06-26 07:46:56 +00:00
|
|
|
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
2024-06-27 07:14:34 +00:00
|
|
|
-display gtk,show-menubar=off,zoom-to-fit=on \
|
2024-06-11 21:07:13 +00:00
|
|
|
-cdrom "out/airgap.iso"
|
|
|
|
|
2024-06-18 08:45:21 +00:00
|
|
|
out/airgap.iso: Containerfile $(shell git ls-files rootfs)
|
2024-03-01 18:51:15 +00:00
|
|
|
docker build \
|
|
|
|
--progress=plain \
|
2024-06-11 21:07:13 +00:00
|
|
|
--output type=local,dest=out \
|
2024-06-18 08:45:21 +00:00
|
|
|
--build-arg VERSION="$(or $(VERSION),"development")" \
|
|
|
|
--build-arg GIT_REF="$(GIT_REF)" \
|
|
|
|
--build-arg GIT_AUTHOR="$(GIT_AUTHOR)" \
|
|
|
|
--build-arg GIT_KEY="$(GIT_KEY)" \
|
|
|
|
--build-arg GIT_TIMESTAMP="$(GIT_TIMESTAMP)" \
|
2024-06-11 21:07:13 +00:00
|
|
|
-f Containerfile \
|
|
|
|
.
|