Commit a10feb4
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):
- 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
extensions/netboot/README.md covers server setup (tftpd-hpa +
nfs-kernel-server), the TFTP tree layout, DHCP options 66/67 on the
network, userpatches.conf knobs, the netboot_artifacts_ready hook, a
full end-to-end helios64 walkthrough, and a troubleshooting section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 71655d8 commit a10feb4
4 files changed
Lines changed: 792 additions & 6 deletions
File tree
- extensions/netboot
- lib/functions
- configuration
- image
0 commit comments