Commit fec99ac
feat(extensions): add netboot extension for full TFTP+NFS boot
Adds ROOTFS_TYPE=nfs-root — a new rootfs type for full network boot
where the only thing on the device's local storage is U-Boot itself.
The kernel, DTB, optional uInitrd and PXE config come from TFTP;
rootfs is mounted over NFS.
A new case branch in do_main_configuration auto-enables the netboot
extension, symmetric with existing fs-f2fs-support / fs-btrfs wiring.
The legacy ROOTFS_TYPE=nfs (hybrid: kernel on local storage, only /
over NFS) is untouched — both paths coexist.
extensions/netboot/netboot.sh hooks:
- extension_prepare_config: validate variables, compute defaults for
NETBOOT_TFTP_PREFIX / NETBOOT_NFS_PATH (shared by
LINUXFAMILY/BOARD/BRANCH/RELEASE, or per-host when NETBOOT_HOSTNAME
is set), normalize NETBOOT_CLIENT_MAC to PXELINUX 01-<mac> form,
fail fast on bad ROOTFS_COMPRESSION/ROOTFS_EXPORT_DIR combinations.
- custom_kernel_config: enable ROOT_NFS, NFS_FS, NFS_V3, IP_PNP,
IP_PNP_DHCP so root=/dev/nfs ip=dhcp works without an initrd.
- post_customize_image: drop armbian-resize-filesystem.service
(meaningless on NFS root) and /root/.not_logged_in_yet (the
armbian-firstlogin interactive wizard blocks bring-up when there is
no interactive console). armbian-firstrun.service stays — it only
regenerates SSH host keys.
- host_pre_docker_launch: bind-mount ROOTFS_EXPORT_DIR into the build
container when it lives outside ${SRC}.
- pre_umount_final_image: assemble the TFTP tree (Image/zImage, dtb/,
uInitrd), write pxelinux.cfg/{default.example | 01-<mac>} with the
right FDT/FDTDIR line and explicit INITRD directive when uInitrd is
present, expose a netboot_artifacts_ready hook for userpatches.
Core plumbing (main-config.sh, partitioning.sh, rootfs-to-image.sh):
- nfs-root case branch in ROOTFS_TYPE dispatch enables the extension
- prepare_partitions skips root partition and SD-size sanity check
- check_filesystem_compatibility_on_host skipped for nfs-root
- ROOTFS_COMPRESSION=gzip|zstd|none with ROOTFS_EXPORT_DIR support
- pipefail around tar|pv|compressor pipeline
- rsync --delete on ROOTFS_EXPORT_DIR to prevent stale files
- ROOTFS_ARCHIVE_PATH exported for downstream hooks
Directory-based extension layout (extensions/netboot/) so the usage
guide (README.md) lives next to the code.
No console= in APPEND — hardcoding a baud breaks boards with
non-standard UART speeds; the kernel resolves console from DTB
/chosen/stdout-path, earlycon keeps early output.
Validated end-to-end on helios64 (Armbian 26.05 edge/resolute):
archive-workflow and tree-workflow both boot cleanly over TFTP+NFS
to a login prompt with no armbian-firstlogin wizard and no resize2fs
errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3f017e3 commit fec99ac
File tree
5 files changed
+841
-14
lines changed- extensions/netboot
- lib/functions
- configuration
- image
5 files changed
+841
-14
lines changed
0 commit comments