2026-06-16 14:07:52 -04:00
|
|
|
SHELL := /usr/bin/env bash
|
|
|
|
|
|
2026-06-17 12:16:09 -04:00
|
|
|
export ARCH ?= arm64
|
2026-06-16 14:07:52 -04:00
|
|
|
export KERNEL_VERSION ?= 7.1
|
2026-06-17 12:55:11 -04:00
|
|
|
export BUSYBOX_VERSION ?= 1.36.1
|
|
|
|
|
export SYSTEMD_VERSION ?= 256
|
2026-06-16 18:26:55 -04:00
|
|
|
export NIX_VERSION ?= 2.34.0
|
2026-06-17 12:16:09 -04:00
|
|
|
export NIX_SYSTEM ?= aarch64-linux
|
2026-06-16 14:07:52 -04:00
|
|
|
export DESKTOP ?= console
|
|
|
|
|
export ROOT_LABEL ?= FORGE_ROOT
|
|
|
|
|
export EFI_LABEL ?= FORGE_EFI
|
2026-06-17 12:55:11 -04:00
|
|
|
export IMAGE_SIZE_MIB ?= 4096
|
2026-06-16 14:07:52 -04:00
|
|
|
export ESP_SIZE_MIB ?= 256
|
|
|
|
|
export JOBS ?= $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
|
|
|
|
|
export SECURE_BOOT ?= 0
|
|
|
|
|
export SECURE_BOOT_KEY ?=
|
|
|
|
|
export SECURE_BOOT_CERT ?=
|
|
|
|
|
|
2026-06-17 12:55:11 -04:00
|
|
|
.PHONY: help deps image-deps fetch kernel rootfs image secure-boot-keys run run-image list-disks install clean distclean
|
2026-06-16 14:07:52 -04:00
|
|
|
|
|
|
|
|
help:
|
|
|
|
|
@printf '%s\n' \
|
2026-06-17 12:16:09 -04:00
|
|
|
'ForgeOS ARM64 targets:' \
|
2026-06-17 12:55:11 -04:00
|
|
|
' make deps - install host deps for ARM64 systemd/Nix builds' \
|
2026-06-17 12:16:09 -04:00
|
|
|
' make image-deps - install ARM64 image + QEMU deps' \
|
2026-06-17 12:55:11 -04:00
|
|
|
' make fetch - download Linux, BusyBox, systemd, and Nix payloads' \
|
2026-06-17 12:16:09 -04:00
|
|
|
' make kernel - build the ARM64 Linux kernel and modules' \
|
2026-06-17 12:55:11 -04:00
|
|
|
' make rootfs - build systemd rootfs, stage Nix, and make initramfs' \
|
2026-06-17 12:16:09 -04:00
|
|
|
' make image - build a bootable ARM64 GPT/UEFI disk image' \
|
2026-06-16 14:07:52 -04:00
|
|
|
' make secure-boot-keys - generate a local Secure Boot signing keypair' \
|
2026-06-17 12:16:09 -04:00
|
|
|
' make run - boot kernel + initramfs in qemu-system-aarch64' \
|
|
|
|
|
' make run-image - boot the ARM64 UEFI disk image in QEMU' \
|
2026-06-16 14:07:52 -04:00
|
|
|
' make list-disks - list candidate installation disks' \
|
2026-06-17 12:16:09 -04:00
|
|
|
' sudo make install DISK=/dev/sdX - install ForgeOS ARM64 to a real disk' \
|
2026-06-16 14:07:52 -04:00
|
|
|
' make clean - remove build, staging, and output artifacts' \
|
|
|
|
|
' make distclean - also remove downloaded and extracted sources'
|
|
|
|
|
|
2026-06-16 15:21:12 -04:00
|
|
|
deps:
|
|
|
|
|
@./scripts/install-deps.sh
|
|
|
|
|
|
2026-06-16 15:36:43 -04:00
|
|
|
image-deps:
|
|
|
|
|
@./scripts/install-image-deps.sh
|
|
|
|
|
|
2026-06-16 14:07:52 -04:00
|
|
|
fetch:
|
|
|
|
|
@./scripts/fetch-sources.sh
|
|
|
|
|
|
|
|
|
|
kernel: fetch
|
|
|
|
|
@./scripts/build-kernel.sh
|
|
|
|
|
|
|
|
|
|
rootfs:
|
|
|
|
|
@./scripts/build-rootfs.sh
|
|
|
|
|
|
|
|
|
|
image:
|
|
|
|
|
@./scripts/build-image.sh
|
|
|
|
|
|
|
|
|
|
secure-boot-keys:
|
|
|
|
|
@./scripts/generate-secure-boot-keys.sh
|
|
|
|
|
|
|
|
|
|
run:
|
|
|
|
|
@./scripts/run-qemu.sh direct
|
|
|
|
|
|
|
|
|
|
run-image:
|
|
|
|
|
@./scripts/run-qemu.sh image
|
|
|
|
|
|
|
|
|
|
list-disks:
|
|
|
|
|
@./scripts/install-to-disk.sh --list
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
@./scripts/install-to-disk.sh --device "$(DISK)" $(INSTALL_ARGS)
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
@./scripts/clean.sh
|
|
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
|
@rm -rf downloads sources
|