build: scripts/nightly.sh -- the nightly snapshot of the board images, for Nexus
Three stages, each a step of the nightly workflow:
boot <amd64|aarch64|riscv64> qemu_session.py headless, one QEMU at a time,
in the acceptance order; amd64 keeps the ISO it
booted as build/nightly/StarshipOS.iso
images make boot_image for RASPI (Pi 5) and MILKV
(Mars) -> raspi5.img.xz, MilkV.img.xz (for
Raspberry Pi Imager), and SHA256SUMS
publish <url> mvn deploy:deploy-file (maven-deploy-plugin
3.1.2): org.starship:kernelImage:
<LITHOS_VERSION>-SNAPSHOT, classifier pc (iso),
raspi5 and milkv (img.xz), in one deploy
Classifier by board, not ISA: two aarch64 boards would collide. No Pi 4:
there is no BCM2711 port. QEMU boots the aarch64 and riscv64 kernels, not
the Pi 5 and Mars images, which are for hardware QEMU does not model.
make init takes INIT_DOCS=0: without the TeX and Doxygen packages and
Isabelle, which an image build does not need.
Checked here: the three boot checks pass (logs in the next commit), the
images build, and publish to a local file:// repository gives the
timestamped snapshot files, the POM and maven-metadata.xml with one
snapshotVersion per classifier. Not checked: Nexus itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5b58b0b16e
commit
ca95567d14
@@ -43,7 +43,12 @@
|
||||
# three, for the full acceptance. syft and
|
||||
# Isabelle/HOL, not packaged, are downloaded,
|
||||
# checked by SHA-256 and linked into
|
||||
# /usr/local/bin (build/cache/tools)
|
||||
# /usr/local/bin (build/cache/tools).
|
||||
# INIT_DOCS=0: without the documents' and
|
||||
# proofs' tools (TeX, Doxygen, Isabelle)
|
||||
# scripts/nightly.sh boot <arch> | images | publish <url>
|
||||
# the nightly snapshot: boot-check, the
|
||||
# board images, and Nexus
|
||||
# make <other goal> goes to v3/Makefile (make help-hosted)
|
||||
# ==============================================================================
|
||||
|
||||
@@ -252,8 +257,12 @@ write_stick:
|
||||
# tools in build/cache/tools, which make clean keeps; each is linked into /usr/local/bin. syft's
|
||||
# sums are its release's checksums.txt; Isabelle publishes none, so its sums are of the archives
|
||||
# as downloaded on 2026-11-06 -- a download that differs is refused.
|
||||
INIT_COMMON := build-essential make git git-lfs python3 curl ca-certificates xorriso mtools gdisk dosfstools fdisk \
|
||||
pandoc latexmk texlive-xetex texlive-latex-base texlive-latex-recommended \
|
||||
# INIT_DOCS=0 leaves out what only the documents and the proofs need (the TeX and Doxygen
|
||||
# packages, and Isabelle): what a build of the images needs, as the nightly (scripts/nightly.sh).
|
||||
INIT_DOCS ?= 1
|
||||
INIT_COMMON := build-essential make git git-lfs python3 curl ca-certificates xz-utils \
|
||||
xorriso mtools gdisk dosfstools fdisk
|
||||
INIT_DOCPKGS := pandoc latexmk texlive-xetex texlive-latex-base texlive-latex-recommended \
|
||||
texlive-latex-extra texlive-pictures texlive-fonts-recommended lmodern \
|
||||
fonts-dejavu fonts-dejavu-extra doxygen graphviz
|
||||
INIT_amd64 := qemu-system-x86 ovmf
|
||||
@@ -301,20 +310,26 @@ init:
|
||||
echo "init: needs apt-get (Debian/Ubuntu). The packages are listed in the Makefile, at init."; exit 1; }
|
||||
$(SUDO) env DEBIAN_FRONTEND=noninteractive apt-get update -qq
|
||||
$(SUDO) env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
|
||||
$(INIT_COMMON) $(foreach a,$(INIT_ARCHES),$(INIT_$(a)))
|
||||
$(INIT_COMMON) $(if $(filter 0,$(INIT_DOCS)),,$(INIT_DOCPKGS)) $(foreach a,$(INIT_ARCHES),$(INIT_$(a)))
|
||||
git lfs install --local
|
||||
$(call fetch,$(SYFT_TGZ),$(SYFT_URL),$(SYFT_SHA_$(SYFT_ARCH)))
|
||||
@mkdir -p $(INIT_TOOLS)/syft-$(SYFT_VERSION)
|
||||
tar -xzf $(INIT_DL)/$(SYFT_TGZ) -C $(INIT_TOOLS)/syft-$(SYFT_VERSION) syft
|
||||
$(SUDO) ln -sf $(abspath $(INIT_TOOLS))/syft-$(SYFT_VERSION)/syft /usr/local/bin/syft
|
||||
@syft version | sed -n 's/^Version: */ syft /p'
|
||||
ifneq ($(INIT_DOCS),0)
|
||||
$(call fetch,$(ISABELLE_TGZ),$(ISABELLE_URL),$(ISABELLE_SHA_$(patsubst $(ISABELLE)_%.tar.gz,%,$(ISABELLE_TGZ))))
|
||||
@[ -x $(INIT_TOOLS)/$(ISABELLE)/bin/isabelle ] || { mkdir -p $(INIT_TOOLS) && tar -xzf $(INIT_DL)/$(ISABELLE_TGZ) -C $(INIT_TOOLS); }
|
||||
$(SUDO) ln -sf $(abspath $(INIT_TOOLS))/$(ISABELLE)/bin/isabelle /usr/local/bin/isabelle
|
||||
@syft version | sed -n 's/^Version: */ syft /p'
|
||||
@echo " isabelle $$(isabelle version)"
|
||||
@echo ""
|
||||
@echo "Ready for $(INIT_ARCHES): make ARCH=<arch> clean qemu, make -C v4 test, make docs,"
|
||||
@echo " make sbom, isabelle build -D proof/"
|
||||
else
|
||||
@echo ""
|
||||
@echo "Ready for $(INIT_ARCHES), without the documents' and proofs' tools: make ARCH=<arch> clean qemu,"
|
||||
@echo " make boot_image TARGET=<board>, make sbom"
|
||||
endif
|
||||
|
||||
help:
|
||||
@sed -n '/^# TARGET is/,/^# =====/p' Makefile | sed '$$d; s/^# \{0,1\}//'
|
||||
|
||||
Reference in New Issue
Block a user