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

97 lines
2.1 KiB
Makefile
Raw Normal View History

include $(PWD)/src/toolchain/Makefile
2023-02-12 12:40:54 +00:00
.DEFAULT_GOAL :=
.PHONY: default
default: \
toolchain \
$(OUT_DIR)/airgap.iso \
$(OUT_DIR)/release.env \
$(OUT_DIR)/manifest.txt
.PHONY: clean
clean: toolchain
2023-02-13 00:57:02 +00:00
rm -rf $(CACHE_DIR)/buildroot-ccache
$(call toolchain,$(USER)," \
2023-02-11 03:44:30 +00:00
cd $(FETCH_DIR)/buildroot; \
make clean; \
")
2023-02-13 00:57:02 +00:00
$(MAKE) toolchain-clean
.PHONY: sign
sign:
set -e; \
git config --get user.signingkey 2>&1 >/dev/null || { \
echo "Error: git user.signingkey is not defined"; \
exit 1; \
}; \
fingerprint=$$(\
git config --get user.signingkey \
| sed 's/.*\([A-Z0-9]\{16\}\).*/\1/g' \
); \
gpg --armor \
--detach-sig \
2023-02-13 12:01:16 +00:00
--output $(DIST_DIR)/manifest.$${fingerprint}.asc \
$(DIST_DIR)/manifest.txt
.PHONY: verify
2023-02-13 12:01:16 +00:00
verify: | $(DIST_DIR)/manifest.txt
set -e; \
2023-02-13 12:01:16 +00:00
for file in $(DIST_DIR)/manifest.*.asc; do \
echo "\nVerifying: $${file}\n"; \
2023-02-13 12:01:16 +00:00
gpg --verify $${file} $(DIST_DIR)/manifest.txt; \
done;
2020-07-19 08:31:10 +00:00
.PHONY: mrproper
mrproper:
2020-07-24 10:07:39 +00:00
docker image rm -f $(IMAGE)
2022-12-25 10:12:11 +00:00
rm -rf $(CACHE_DIR) $(OUT_DIR)
2020-07-19 08:31:10 +00:00
.PHONY: menuconfig
menuconfig: toolchain
$(call toolchain,$(USER)," \
2023-02-11 03:44:30 +00:00
cd $(FETCH_DIR)/buildroot; \
make "airgap_$(TARGET)_defconfig"; \
make menuconfig; \
")
2023-02-11 03:44:30 +00:00
cp $(FETCH_DIR)/buildroot/.config \
"config/buildroot/configs/airgap_$(TARGET)_defconfig"
.PHONY: linux-menuconfig
linux-menuconfig: toolchain
$(call toolchain,$(USER),"\
2023-02-11 03:44:30 +00:00
cd $(FETCH_DIR)/buildroot; \
make linux-menuconfig; \
make linux-update-defconfig; \
")
.PHONY: vm
vm: toolchain
$(call toolchain,$(USER)," \
qemu-system-i386 \
-M pc \
-nographic \
-cdrom "$(OUT_DIR)/airgap.iso"; \
")
2020-07-24 10:07:39 +00:00
.PHONY: release
2023-02-12 22:29:54 +00:00
release: default
2023-02-13 05:41:33 +00:00
rm -rf $(DIST_DIR)/*
cp -R $(OUT_DIR)/* $(DIST_DIR)/
2020-07-24 10:07:39 +00:00
2023-02-11 03:44:30 +00:00
$(FETCH_DIR)/buildroot: toolchain
$(call git_clone,$(FETCH_DIR)/buildroot,$(BUILDROOT_REPO),$(BUILDROOT_REF))
$(OUT_DIR)/airgap.iso: \
2023-02-11 03:44:30 +00:00
$(FETCH_DIR)/buildroot \
$(OUT_DIR)/release.env
2024-01-25 08:38:12 +00:00
# $(call apply_patches,$(FETCH_DIR)/buildroot,$(CONFIG_DIR)/buildroot/patches)
$(call toolchain,$(USER)," \
cd $(FETCH_DIR)/buildroot; \
make "airgap_$(TARGET)_defconfig"; \
unset FAKETIME; \
make source; \
make; \
")
2023-02-11 03:44:30 +00:00
cp $(FETCH_DIR)/buildroot/output/images/rootfs.iso9660 \
$(OUT_DIR)/airgap.iso