forked from public/airgap
1
0
Fork 0
airgap/Makefile

55 lines
1.4 KiB
Makefile
Raw Normal View History

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: \
out/airgap.iso
.PHONY: vm
2024-06-17 18:56:18 +00:00
vm: vm-bios
.PHONY: vm-bios
vm-bios: out/airgap.iso
qemu-system-x86_64 \
2024-06-17 18:56:18 +00:00
-m 4G \
-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 \
-usbdevice tablet \
2024-06-26 07:46:56 +00:00
-drive id=external,if=none,format=raw,file=out/sdcard.img \
-display gtk,show-menubar=off,zoom-to-fit=on \
-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
qemu-system-x86_64 \
-m 4G \
2024-06-17 18:56:18 +00:00
-machine pc \
-serial stdio \
-bios /usr/share/ovmf/OVMF.fd \
2024-06-26 07:46:56 +00:00
-usb \
-device sdhci-pci \
-device sd-card,drive=external \
-usbdevice tablet \
2024-06-26 07:46:56 +00:00
-drive id=external,if=none,format=raw,file=out/sdcard.img \
-display gtk,show-menubar=off,zoom-to-fit=on \
-cdrom "out/airgap.iso"
2024-06-18 08:45:21 +00:00
out/airgap.iso: Containerfile $(shell git ls-files rootfs)
docker build \
--progress=plain \
--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)" \
-f Containerfile \
.