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
Copy file name to clipboardExpand all lines: extensions/netboot/README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,8 +62,8 @@ file to copy into place.
62
62
|`NETBOOT_NFS_PATH`| see below | Absolute NFS path of the rootfs on the server. The APPEND line uses exactly this string for `nfsroot=...`. |
63
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). |
64
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. |
65
-
|`ROOTFS_COMPRESSION`|`zstd`| Format of the rootfs archive produced by `create_image_from_sdcard_rootfs`. `zstd` → `.tar.zst`, `gzip` → `.tar.gz`, `none` → no archive at all. The `none` case requires `ROOTFS_EXPORT_DIR`. |
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. |
65
+
|`ROOTFS_COMPRESSION`|`zstd`| Format of the rootfs archive produced by `create_image_from_sdcard_rootfs`. `zstd`(alias `zst`) → `.tar.zst`, `gzip` → `.tar.gz`, `none` → no archive at all. The `none` case requires `ROOTFS_EXPORT_DIR`. |
66
+
|`ROOTFS_EXPORT_DIR`|_(empty)_|Path suffix under the fixed base `${SRC}/output/netboot-export/`. When set, the rootfs tree is rsync'd directly into `${SRC}/output/netboot-export/${ROOTFS_EXPORT_DIR}`in addition to (or instead of) the archive. The path is always confined to that base — an absolute value like `/srv/nfs` is treated as a sub-directory (`${SRC}/output/netboot-export//srv/nfs`) so `rsync --delete` can never escape the netboot-export tree. If a NFS server on the build host expects `/srv/...`, symlink the base there once. Primary use: builder host is also the NFS server — single-step `build → boot` loop with no tar/unpack/rsync step. |
67
67
68
68
### Hook: `netboot_artifacts_ready`
69
69
@@ -77,7 +77,8 @@ the TFTP tree and rootfs archive/export are staged. Exposed context:
77
77
|`NETBOOT_NFS_PATH`| As above. |
78
78
|`NETBOOT_PXE_FILE`|`default.example` or `01-<mac>` — the file that was written under `pxelinux.cfg/`. |
79
79
|`NETBOOT_ROOTFS_ARCHIVE`| Full path to the produced rootfs archive (empty when `ROOTFS_COMPRESSION=none`). |
80
-
|`NETBOOT_HOSTNAME`, `NETBOOT_CLIENT_MAC`| The sanitized values the extension used. |
80
+
|`NETBOOT_HOSTNAME`| Passed through verbatim — no sanitization. Hook code that embeds it in a shell command or a path must quote/escape itself. |
81
+
|`NETBOOT_CLIENT_MAC`| The raw user value (`aa:bb:cc:dd:ee:ff` or `aa-bb-cc-dd-ee-ff`); also available as `NETBOOT_CLIENT_MAC_NORMALIZED` (lowercase, dashes) — the form used for the `pxelinux.cfg/01-<mac>` filename. |
81
82
|`BOARD`, `LINUXFAMILY`, `BRANCH`, `RELEASE`| Standard build variables. |
82
83
83
84
Implement this hook in `userpatches/extensions/` to rsync the TFTP
0 commit comments