Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/actions/buildroot-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,13 @@ runs:
# this is shell, and both halves read the same env var either way.
# See docs/ci.md#cache-keys.
tc_hash=$(sha256sum .br-toolchain-fingerprint | cut -d' ' -f1)
ir_hash=$(sha256sum configs/mister_initramfs_defconfig | cut -d' ' -f1)
# The stage-1 configuration is the initramfs-de10nano fragment stack
# (configs/fragments/stacks.mk), read through the same helper as the
# image/kernel stacks above so a fragment added to the stack moves this
# key without anyone editing a list here.
mapfile -t ir_files < <(config_stack_files INITRAMFS_DE10NANO)
[ "${#ir_files[@]}" -gt 0 ] || { echo "::error::configs/fragments/stacks.mk names no fragments for INITRAMFS_DE10NANO" >&2; exit 1; }
ir_hash=$(cat "${ir_files[@]}" | sha256sum | cut -d' ' -f1)
echo "BR_INITRAMFS_HOST_KEY=br-initramfs-host-${ws_fp}-${ver}-${ir_hash}" >> "$GITHUB_ENV"

# Variant-resolved host-toolchain key + paths (main's key STRING
Expand Down
191 changes: 151 additions & 40 deletions Makefile

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,11 @@ configs/fragments/ stacks.mk (which fragments form which
de10nano-image.fragment (the shipped image: hooks, ext4, packages)
kernel-only.fragment (kernel-only base, shared by variants)
de25nano.fragment (DE25-Nano developer OS, aarch64)
initramfs-common.fragment (stage-1 cpio: everything but the arch)
initramfs-de10nano.fragment / initramfs-de25nano.fragment
(stage-1 arch/ABI + headers, per board)
golden.sha256 (resolved-config hashes CI asserts)
configs/ mister_rt.fragment (PREEMPT_RT / 7.x delta)
mister_initramfs_defconfig (stage-1 cpio)
mister_installer_defconfig (SD-card installer cpio)
-> docs/buildroot-config.md has the rationale for every line
board/mister/de10nano/
Expand Down Expand Up @@ -763,6 +765,7 @@ Two things that will bite you otherwise:
| `make rt` | Kernel-only `PREEMPT_RT` build → `zImage_dtb-rt` + module overlay |
| `make sdcard` | Full `sdcard.img(.xz)` — run **after** `make all`. The card carries no variant kernel, so `make rt` is not required first; if you *do* build RT, run it before `make all` so its modules land in the image |
| `make initramfs` | Stage-1 cpio only, and print its size |
| `make de25-initramfs` | The same stage 1 built for aarch64 (`output-initramfs-de25/`), verified; boot-test it with `scripts/test-initramfs.sh --board de25nano` |
| `make menuconfig` / `linux-menuconfig` | Interactive Buildroot / kernel config |
| `make savedefconfig` | Write the config back to the defconfig (**always** do this after editing) |
| `make buildroot-verify` | Download + SHA-256-verify the pinned Buildroot tarball |
Expand Down Expand Up @@ -802,7 +805,8 @@ broke and why, without grepping):
- the image-contract checks — `check-zimage-dtb.sh`, `check-linux-img.sh`,
`check-size-budget.sh`
- the structural initramfs checks, plus a **full QEMU boot test of the initramfs `/init`**
(booted six times, across the failure paths)
(eight cases, across the failure paths — and the same eight again on
`qemu-system-aarch64` for the aarch64 build of the same `/init`, when it has been built)
- an ABI smoke test running the **stock `MiSTer` binary** under `qemu-user` against the
built rootfs: dynamic linking must resolve clean, and it must die at FPGA access and not
one instruction earlier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Stage-1 (initramfs) post-build hook. Runs after the cpio's target tree is
# assembled and before the cpio is generated (BR2_ROOTFS_POST_BUILD_SCRIPT in
# configs/mister_initramfs_defconfig). Reproducible: no timestamps, no
# configs/fragments/initramfs-common.fragment). Reproducible: no timestamps, no
# randomness, no network -- it only deletes files (A9).
#
# WHY THIS EXISTS -- exfatprogs ships six binaries and /init calls one.
Expand Down Expand Up @@ -55,7 +55,7 @@ done
# it exists to catch. Keep the two in step if either ever moves.
[ -x "${TARGET_DIR}/usr/sbin/fsck.exfat" ] || {
echo "FATAL: initramfs-post-build.sh: no ${TARGET_DIR}/usr/sbin/fsck.exfat." >&2
echo " BR2_PACKAGE_EXFATPROGS is set in configs/mister_initramfs_defconfig," >&2
echo " BR2_PACKAGE_EXFATPROGS is set in configs/fragments/initramfs-common.fragment," >&2
echo " so the package moved its install path. The initramfs /init hardcodes" >&2
echo " FSCK_EXFAT=/usr/sbin/fsck.exfat; update both together. See ADR 0026." >&2
exit 1
Expand Down
2 changes: 1 addition & 1 deletion board/mister/de10nano/installer-busybox.config
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
# ############################################################################
#
#
# Hand-derived from board/mister/de10nano/initramfs-busybox.config
# Hand-derived from board/mister/common/initramfs-busybox.config
# (see header above for the diff and rationale); NOT regenerated verbatim by
# `make busybox-update-config` — do that, then re-apply this file's five
# additions, after any BusyBox version bump.
Expand Down
2 changes: 1 addition & 1 deletion board/mister/de10nano/installer-overlay/init
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
# copy the base and SKIP the cores with a loud message rather than OOM-bricking.
# update_all.sh on the installed card fetches cores anyway.
# * DEFENSIVE LIKE THE STAGE-1 init. Same contract as
# board/mister/de10nano/initramfs-overlay/init: early proc/sys/dev mounts, parse
# board/mister/common/initramfs-overlay/init: early proc/sys/dev mounts, parse
# the cmdline (never hardcode the device), and on ANY fatal error print a banner
# and drop to a RESPAWNING rescue shell. PID 1 must NEVER exit (that is an instant
# kernel panic). A half-reformatted card must give a diagnosable message, not a
Expand Down

This file was deleted.

Loading
Loading