2023-01-30 23:17:54 +00:00
|
|
|
include $(PWD)/src/toolchain/Makefile
|
2022-12-24 05:15:00 +00:00
|
|
|
|
2023-01-30 23:17:54 +00:00
|
|
|
.DEFAULT_GOAL := $(OUT_DIR)/airgap.iso
|
2020-06-15 08:08:20 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
2023-01-30 23:17:54 +00:00
|
|
|
clean: toolchain
|
2023-02-12 11:00:11 +00:00
|
|
|
rm -rf $(OUT_DIR) $(CACHE_DIR)/buildroot-ccache || :
|
2023-01-30 23:17:54 +00:00
|
|
|
$(call toolchain,$(USER)," \
|
2023-02-11 03:44:30 +00:00
|
|
|
cd $(FETCH_DIR)/buildroot; \
|
2023-01-30 23:17:54 +00:00
|
|
|
make clean; \
|
|
|
|
")
|
2020-06-15 08:08:20 +00:00
|
|
|
|
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
|
|
|
|
2023-01-30 23:17:54 +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"; \
|
2023-01-30 23:17:54 +00:00
|
|
|
make menuconfig; \
|
|
|
|
")
|
2023-02-11 03:44:30 +00:00
|
|
|
cp $(FETCH_DIR)/buildroot/.config \
|
2023-01-30 23:17:54 +00:00
|
|
|
"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; \
|
2023-01-30 23:17:54 +00:00
|
|
|
make linux-menuconfig; \
|
|
|
|
make linux-update-defconfig; \
|
|
|
|
")
|
|
|
|
|
|
|
|
.PHONY: vm
|
|
|
|
vm: toolchain
|
|
|
|
$(call toolchain,$(USER)," \
|
|
|
|
qemu-system-i386 \
|
|
|
|
-M pc \
|
|
|
|
-nographic \
|
2023-02-12 11:00:11 +00:00
|
|
|
-cdrom "$(OUT_DIR)/airgap.iso"; \
|
2023-01-30 23:17:54 +00:00
|
|
|
")
|
2020-07-24 10:07:39 +00:00
|
|
|
|
2022-12-24 23:56:16 +00:00
|
|
|
.PHONY: release
|
2023-02-12 11:00:11 +00:00
|
|
|
release: \
|
2022-12-31 00:57:44 +00:00
|
|
|
$(OUT_DIR)/airgap.iso \
|
|
|
|
$(OUT_DIR)/manifest.txt
|
2023-02-11 03:44:30 +00:00
|
|
|
mkdir -p $(DIST_DIR)
|
|
|
|
cp $(OUT_DIR)/release.env $(DIST_DIR)/release.env
|
|
|
|
cp $(OUT_DIR)/airgap.iso $(DIST_DIR)/airgap.iso
|
|
|
|
cp $(OUT_DIR)/manifest.txt $(DIST_DIR)/manifest.txt
|
2020-07-24 10:07:39 +00:00
|
|
|
|
2023-02-11 03:44:30 +00:00
|
|
|
$(FETCH_DIR)/buildroot: toolchain
|
2023-02-12 11:00:11 +00:00
|
|
|
$(call git_clone,$(FETCH_DIR)/buildroot,$(BUILDROOT_REPO),$(BUILDROOT_REF))
|
2022-12-24 05:15:00 +00:00
|
|
|
|
2022-12-24 23:56:16 +00:00
|
|
|
$(OUT_DIR)/airgap.iso: \
|
2023-02-11 03:44:30 +00:00
|
|
|
$(FETCH_DIR)/buildroot \
|
2022-12-24 23:56:16 +00:00
|
|
|
$(OUT_DIR)/release.env
|
2023-02-12 11:00:11 +00:00
|
|
|
$(call apply_patches,$(FETCH_DIR)/buildroot,$(CONFIG_DIR)/buildroot/patches)
|
2022-12-24 05:15:00 +00:00
|
|
|
$(call toolchain,$(USER)," \
|
2023-02-12 11:00:11 +00:00
|
|
|
cd $(FETCH_DIR)/buildroot; \
|
|
|
|
make "airgap_$(TARGET)_defconfig"; \
|
2022-12-24 05:15:00 +00:00
|
|
|
unset FAKETIME; \
|
2022-12-31 00:57:44 +00:00
|
|
|
make source; \
|
2022-12-24 05:15:00 +00:00
|
|
|
make; \
|
|
|
|
")
|
2023-02-11 03:44:30 +00:00
|
|
|
cp $(FETCH_DIR)/buildroot/output/images/rootfs.iso9660 \
|
2022-12-24 05:15:00 +00:00
|
|
|
$(OUT_DIR)/airgap.iso
|