You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): introduce ROOTFS_TYPE=nfs-root for full netboot
`nfs-root` is a new rootfs type distinct from the existing `nfs` hybrid
mode. Selecting it wires the `netboot` extension from the core
`ROOTFS_TYPE` dispatch in `do_main_configuration`, so callers no longer
need a separate `ENABLE_EXTENSIONS=netboot`. The legacy `nfs` branch
(kernel+DTB on local boot partition, `/` over NFS) is untouched — both
paths coexist until the hybrid mode's future is decided.
Core plumbing mirrors the `nfs` branch for all paths where local root
storage would be meaningless: partition layout skip
(`prepare_partitions`), archive/export gate and version suffix
(`rootfs-to-image.sh`), and the host-side filesystem compatibility
check in `main-config.sh`.
Extension hooks now key on `ROOTFS_TYPE=nfs-root` instead of guessing
from `nfs`, removing the `force ROOTFS_TYPE=nfs` shim that ran too
late relative to `do_main_configuration`.
Also folded in from CodeRabbit review on PR #9656:
- pipefail around tar|pv|compressor so truncated archives no longer
slip through on an intermediate stage failure
- `rsync --delete` on `ROOTFS_EXPORT_DIR` so stale files from a
previous build don't linger in the NFS export tree
- explicit `INITRD` directive in extlinux when `uInitrd` is staged;
U-Boot only loads an initramfs when the stanza names it
- README updated to document `ROOTFS_TYPE=nfs-root` as the single
switch
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`ROOTFS_TYPE=nfs` alone produces a hybrid image: kernel and DTB still
30
-
live on a local boot partition (SD/eMMC), only `/` comes over NFS. This
31
-
extension takes it further — kernel, DTB and PXE config are also staged
32
-
for TFTP, and the only thing the target needs to boot is a network with
33
-
working DHCP+TFTP+NFS.
30
+
live on a local boot partition (SD/eMMC), only `/` comes over NFS.
31
+
`ROOTFS_TYPE=nfs-root` takes it further — kernel, DTB and PXE config
32
+
are also staged for TFTP, and the only thing the target needs to boot
33
+
is a network with working DHCP+TFTP+NFS. Selecting `nfs-root` is the
34
+
single switch that turns this extension on; it is auto-enabled from
35
+
the core `ROOTFS_TYPE` dispatch, no separate `ENABLE_EXTENSIONS` flag
36
+
is needed.
34
37
35
38
Use cases:
36
39
@@ -48,7 +51,7 @@ to come over the wire.
48
51
## Build-time variables
49
52
50
53
All variables are optional. The only required step is
51
-
`ENABLE_EXTENSIONS=netboot`; defaults give you a single shared rootfs
54
+
`ROOTFS_TYPE=nfs-root`; defaults give you a single shared rootfs
52
55
per `BOARD × BRANCH × RELEASE` and a `pxelinux.cfg/default.example`
53
56
file to copy into place.
54
57
@@ -59,7 +62,7 @@ file to copy into place.
59
62
|`NETBOOT_NFS_PATH`| see below | Absolute NFS path of the rootfs on the server. The APPEND line uses exactly this string for `nfsroot=...`. |
60
63
|`NETBOOT_HOSTNAME`|_(empty)_| Per-host deployment. When set, the default `NETBOOT_NFS_PATH` becomes `/srv/netboot/rootfs/hosts/<hostname>` — each machine owns its own writable rootfs copy. When empty, the default is `/srv/netboot/rootfs/shared/${LINUXFAMILY}/${BOARD}/${BRANCH}-${RELEASE}` (one image, potentially reused by identical boards). |
61
64
|`NETBOOT_CLIENT_MAC`|_(empty)_| Client MAC (`aa:bb:cc:dd:ee:ff` or `aa-bb-cc-dd-ee-ff`). When set, the PXE config is written as `pxelinux.cfg/01-<mac>` (the PXELINUX per-MAC override) instead of `default.example`; multiple boards then coexist on one TFTP root, each picking its own extlinux. |
62
-
|`ROOTFS_COMPRESSION`|`gzip`| Format of the rootfs archive produced by `create_image_from_sdcard_rootfs` when `ROOTFS_TYPE=nfs`. `gzip` → `.tar.gz`, `zstd` → `.tar.zst`, `none` → no archive at all. The `none` case requires `ROOTFS_EXPORT_DIR`. |
65
+
|`ROOTFS_COMPRESSION`|`gzip`| Format of the rootfs archive produced by `create_image_from_sdcard_rootfs`. `gzip` → `.tar.gz`, `zstd` → `.tar.zst`, `none` → no archive at all. The `none` case requires `ROOTFS_EXPORT_DIR`. |
63
66
|`ROOTFS_EXPORT_DIR`|_(empty)_| Absolute path. When set, the rootfs tree is rsync'd directly into this directory in addition to (or instead of) the archive. Primary use: builder host is also the NFS server — single-step `build → boot` loop with no tar/unpack/rsync step. If this path is outside `${SRC}`, the extension bind-mounts it into the build container so the same path works on host and inside Docker. |
0 commit comments