Files
ForgeOS-ARM64/Makefile
T

94 lines
2.7 KiB
Makefile
Raw Normal View History

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-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:16:09 -04:00
export IMAGE_SIZE_MIB ?= $(if $(filter gnome,$(DESKTOP)),12288,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 ?=
export GNOME_SUITE ?= trixie
export GNOME_MIRROR ?= http://deb.debian.org/debian
2026-06-17 12:16:09 -04:00
.PHONY: help deps image-deps fetch kernel rootfs gnome-rootfs image gnome-image secure-boot-keys run run-image run-gnome 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:' \
' make deps - install Debian/Ubuntu host deps for ARM64 builds' \
' make image-deps - install ARM64 image + QEMU deps' \
' make fetch - download Linux and ARM64 Nix payloads' \
' make kernel - build the ARM64 Linux kernel and modules' \
' make rootfs - assemble the ARM64 console rootfs and initramfs' \
' make gnome-rootfs - assemble an ARM64 Debian GNOME rootfs' \
' make image - build a bootable ARM64 GPT/UEFI disk image' \
' make gnome-image - build a bootable ARM64 GNOME 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' \
' make run-gnome - boot the ARM64 GNOME image in graphical 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
gnome-rootfs: DESKTOP = gnome
gnome-rootfs: IMAGE_SIZE_MIB = 12288
gnome-rootfs:
@./scripts/build-gnome-rootfs.sh
image:
@./scripts/build-image.sh
gnome-image: DESKTOP = gnome
gnome-image: IMAGE_SIZE_MIB = 12288
gnome-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
run-gnome: DESKTOP = gnome
run-gnome: IMAGE_SIZE_MIB = 12288
run-gnome: MEMORY_MB = 4096
run-gnome: gnome-image
@./scripts/run-qemu.sh image-gui
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