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
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ jobs:
)
sh_relpaths=(
post-build.sh
post-image.sh
initramfs-post-build.sh
initramfs-overlay/init
)
Expand Down Expand Up @@ -249,6 +250,7 @@ jobs:
fat-payload/Scripts/check_storage.sh
fat-payload/Scripts/pair_logitech.sh
post-build.sh
post-image.sh
initramfs-post-build.sh
initramfs-overlay/init
rootfs-overlay/usr/sbin/mister-fsck-exfat
Expand Down
66 changes: 53 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ CONFIG_CHECK_DIR := $(ROOT_DIR)/output-config-check
# every directory above builds for the DE10-Nano's armv7 Cyclone V. This one
# builds for a DIFFERENT BOARD — the Terasic DE25-Nano, an Intel/Altera
# Agilex 5 whose HPS is aarch64 (2x Cortex-A76 + 2x Cortex-A55). Different
# architecture, different toolchain, different kernel line (mainline 7.2.2),
# architecture, different toolchain, different kernel line (mainline 7.2.3),
# different rootfs. It shares with the main build exactly two things: the
# pinned Buildroot tree and the dl/ download cache.
#
Expand Down Expand Up @@ -814,22 +814,61 @@ de25: $(DE25_OUTPUT_DIR)/.config hostshim
echo " BR2_LINUX_KERNEL_CUSTOM_DTS_PATH did not build." >&2; exit 1; \
fi; \
echo ""; \
echo "==> DE25 kernel: $(DE25_OUTPUT_DIR)/images/Image ($$(stat -c %s $(DE25_OUTPUT_DIR)/images/Image) bytes)"; \
for d in "$$@"; do echo "==> DE25 dtb: $$d ($$(stat -c %s $$d) bytes)"; done; \
echo "==> DE25 kernel: $(DE25_OUTPUT_DIR)/images/Image ($$(stat -L -c %s $(DE25_OUTPUT_DIR)/images/Image) bytes)"; \
for d in "$$@"; do echo "==> DE25 dtb: $$d ($$(stat -L -c %s $$d) bytes)"; done; \
test -f $(DE25_OUTPUT_DIR)/images/rootfs.ext4 || { \
echo "FATAL: de25 build finished but produced no $(DE25_OUTPUT_DIR)/images/rootfs.ext4" >&2; \
echo " (BR2_TARGET_ROOTFS_EXT2 + _EXT2_4 select it -- a config that emits no" >&2; \
echo " rootfs is not a green build, whatever the kernel did.)" >&2; exit 1; }; \
echo "==> DE25 rootfs: $(DE25_OUTPUT_DIR)/images/rootfs.ext4 ($$(stat -c %s $(DE25_OUTPUT_DIR)/images/rootfs.ext4) bytes)"; \
echo " Bare developer OS -- no MiSTer binaries, no bootloader yet (D2.2)."; \
echo ""
echo "==> DE25 rootfs: $(DE25_OUTPUT_DIR)/images/rootfs.ext4 ($$(stat -L -c %s $(DE25_OUTPUT_DIR)/images/rootfs.ext4) bytes)"; \
if [ "$${DE25_ALLOW_NO_UBOOT:-0}" = 1 ] && [ ! -f $(DE25_OUTPUT_DIR)/images/u-boot.itb ]; then \
echo "==> DE25 bl31/FIT: SKIPPED (DE25_ALLOW_NO_UBOOT=1 and no u-boot.itb was built)"; \
else \
test -f $(DE25_OUTPUT_DIR)/images/bl31.bin || { \
echo "FATAL: de25 build finished but produced no $(DE25_OUTPUT_DIR)/images/bl31.bin" >&2; \
echo " (BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31 + _IMAGES=\"bl31.bin\" select it.)" >&2; \
echo " BL31 is what goes INSIDE u-boot.itb as the 'atf' image, so a missing" >&2; \
echo " bl31.bin means the FIT below is either absent or built around a" >&2; \
echo " binman-faked zero blob -- which boots nothing and says nothing." >&2; exit 1; }; \
echo "==> DE25 bl31: $(DE25_OUTPUT_DIR)/images/bl31.bin ($$(stat -L -c %s $(DE25_OUTPUT_DIR)/images/bl31.bin) bytes)"; \
test -f $(DE25_OUTPUT_DIR)/images/u-boot.itb || { \
echo "FATAL: de25 build finished but produced no $(DE25_OUTPUT_DIR)/images/u-boot.itb" >&2; \
echo " This is THE artifact of the bootloader half of the build: the factory" >&2; \
echo " SPL in QSPI looks for a file of exactly that name on FAT partition 1" >&2; \
echo " (SPL_FS_LOAD_PAYLOAD_NAME under SPL_LOAD_FIT, boot partition 1)." >&2; \
echo " The usual cause is CONFIG_BINMAN having gone off: it is selected only" >&2; \
echo " as 'select BINMAN if SPL_ATF' and it has no prompt, so anything that" >&2; \
echo " turns CONFIG_SPL off takes the FIT with it, silently and with a green" >&2; \
echo " U-Boot build. See board/mister/de25nano/uboot.fragment, SPL block." >&2; exit 1; }; \
echo "==> DE25 FIT: $(DE25_OUTPUT_DIR)/images/u-boot.itb ($$(stat -L -c %s $(DE25_OUTPUT_DIR)/images/u-boot.itb) bytes)"; \
echo " Verify its shape against the factory SPL contract with:"; \
echo " $(DE25_OUTPUT_DIR)/host/bin/dumpimage -l $(DE25_OUTPUT_DIR)/images/u-boot.itb"; \
echo " Bare developer OS -- no MiSTer binaries."; \
echo ""; \
fi
@if [ -f $(DE25_OUTPUT_DIR)/images/sdcard-de25.img ]; then \
echo "==> DE25 card: $(DE25_OUTPUT_DIR)/images/sdcard-de25.img ($$(stat -L -c %s $(DE25_OUTPUT_DIR)/images/sdcard-de25.img) bytes)"; \
echo " dd it to a card; docs/de25-sdcard.md."; \
echo ""; \
elif [ "$${DE25_ALLOW_NO_UBOOT:-0}" = 1 ] && [ ! -f $(DE25_OUTPUT_DIR)/images/u-boot.itb ]; then \
echo "==> DE25 card: SKIPPED (DE25_ALLOW_NO_UBOOT=1 and no u-boot.itb) -- nothing"; \
echo " this build produced can boot a board."; \
echo ""; \
else \
echo "FATAL: de25 build finished but produced no $(DE25_OUTPUT_DIR)/images/sdcard-de25.img" >&2; \
echo " (BR2_ROOTFS_POST_IMAGE_SCRIPT runs board/mister/de25nano/post-image.sh," >&2; \
echo " which assembles the card and hands it to scripts/check-sdcard-de25.sh." >&2; \
echo " A build that emits no card is not a green build.)" >&2; exit 1; \
fi

# Escape hatches for iterating without hand-editing the checked-in fragments.
# Both write to output-de25/; fold the result back into
# configs/fragments/de25nano.fragment by hand (a `savedefconfig` of
# output-de25/ is unordered, comment-free and NOT tracked --
# docs/buildroot-config.md §1) or into board/mister/de25nano/linux.fragment
# by hand.
# docs/buildroot-config.md §1), into board/mister/de25nano/linux.config, or --
# carefully, it is SHARED with the DE10 and must stay a no-op there
# (scripts/check-kernel-fragment-noop.sh) -- into
# board/mister/common/linux-mister.fragment.
#
# de25-linux-menuconfig exists as its own target for the same reason
# rt-menuconfig does: the `%:` catch-all would forward a bare
Expand Down Expand Up @@ -1013,11 +1052,12 @@ help:
@echo ""
@echo "DE25-Nano developer OS (aarch64 / Agilex 5 -- docs/de25-nano-tasks.md D2.1):"
@echo " make de25 - build the DE25-Nano image into output-de25/"
@echo " (aarch64 toolchain + mainline 7.2.2 kernel +"
@echo " minimal BusyBox ext4 rootfs; asserts images/Image"
@echo " and a .dtb exist). BARE DEVELOPER OS: no MiSTer"
@echo " binaries, no bootloader yet. Does NOT run"
@echo " 'initramfs' -- that cpio is armv7."
@echo " (aarch64 toolchain + mainline 7.2.3 kernel +"
@echo " minimal BusyBox ext4 rootfs + TF-A/U-Boot FIT +"
@echo " the SD-card image; asserts images/Image, a .dtb,"
@echo " bl31.bin, u-boot.itb and sdcard-de25.img exist)."
@echo " BARE DEVELOPER OS: no MiSTer binaries. Does NOT"
@echo " run 'initramfs' -- that cpio is armv7."
@echo " make de25nano-defconfig - (re)generate output-de25/.config from its"
@echo " fragment stack (common + de25nano)"
@echo " make de25-menuconfig - Buildroot menuconfig for the DE25 config"
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,14 @@ driver-defined and there is nothing generic to wrap, and the internal `vfs_ioctl
in-kernel on a 64-bit ARM SoC is the rewrite this project already had to do for 6.18:
export a purpose-built attach helper from the loop driver itself and call it with
`filp_open()`ed files instead of descriptors (`linux-patches-upstream/0100-…`, carried
for the upstream fork, not shipped in this image). The initramfs design, by contrast,
for the upstream fork, not shipped in this image). That rewrite contains no syscall and
no architecture-specific line, and it does compile for aarch64: applied to a pristine
6.18.48 tree with an arm64 toolchain, `init/do_mounts.o` and `drivers/block/loop.o`
build clean, referencing only `filp_open()`, `init_mount()` and the two exported loop
helpers. So the *rewritten* patch is portable; it is the *stock* patch that is not, and
the rewrite still has to be re-anchored on every kernel line it is carried to (it
already needs a context refresh for 7.x, where the `load_ramdisk=` block it sits next
to was removed). The initramfs design, by contrast,
contains no architecture-specific line at all: `mount`, `losetup`, and
`switch_root` behave identically on any CPU the kernel runs on. Should this image ever
need to boot something that is not a Cyclone V, the boot path comes along unchanged, and
Expand Down
Loading
Loading