mirror of
https://github.com/blazblue547-afk/ForgeOS-ARM64.git
synced 2026-12-02 14:44:17 -05:00
Use an ARM64 Debian rootfs bootstrap because the original source-built userspace path depends on native x86_64 host runtime libraries.
95 lines
2.7 KiB
Makefile
95 lines
2.7 KiB
Makefile
SHELL := /usr/bin/env bash
|
|
|
|
export ARCH ?= arm64
|
|
export KERNEL_VERSION ?= 7.1
|
|
export NIX_VERSION ?= 2.34.0
|
|
export NIX_SYSTEM ?= aarch64-linux
|
|
export DESKTOP ?= console
|
|
export ROOT_LABEL ?= FORGE_ROOT
|
|
export EFI_LABEL ?= FORGE_EFI
|
|
export IMAGE_SIZE_MIB ?= $(if $(filter gnome,$(DESKTOP)),12288,4096)
|
|
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
|
|
|
|
.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
|
|
|
|
help:
|
|
@printf '%s\n' \
|
|
'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' \
|
|
' make secure-boot-keys - generate a local Secure Boot signing keypair' \
|
|
' 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' \
|
|
' make list-disks - list candidate installation disks' \
|
|
' sudo make install DISK=/dev/sdX - install ForgeOS ARM64 to a real disk' \
|
|
' make clean - remove build, staging, and output artifacts' \
|
|
' make distclean - also remove downloaded and extracted sources'
|
|
|
|
deps:
|
|
@./scripts/install-deps.sh
|
|
|
|
image-deps:
|
|
@./scripts/install-image-deps.sh
|
|
|
|
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
|