Skip to content

Add TFTP server and DHCP bootfile support - #1647

Open
troglobit wants to merge 15 commits into
mainfrom
tftp-server
Open

troglobit wants to merge 15 commits into
mainfrom
tftp-server

Conversation

@troglobit

Copy link
Copy Markdown
Contributor

Description

Add support for acting as a TFTP server so an Infix unit can hand out boot images, configs, and firmware to downstream devices on an isolated or provisioning network

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@troglobit troglobit linked an issue Sep 18, 2026 that may be closed by this pull request
@troglobit troglobit added the cn:delta Common Name: Delta Project label Sep 18, 2026
Adding a label fires a second pull_request event in the same
concurrency group, cancelling the run from 'opened'.  Only ci:main is
meant to start a run, so the PR ends up with no CI at all.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Changes that cannot affect the image, e.g. a ChangeLog fixup after
another branch landed, should not spend an hour of CI.  Adding the
label to an open PR also stops a build already running.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Staging a file for another service, or copying a log off the system,
was not possible.  Only /cfg, /media and the user's home were
accepted, a directory destination was refused, and the refusal said
"no such file" about a file that was there.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
copy ended a completed directory with a space, so the path could not
be typed further, show offered six of its twenty subcommands, and
neither erase nor rpc had any.  The files also sat in two places,
installed two ways.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Completing a directory or a URI scheme ended the word with a space, so
the path could not be typed any further.  Also brings unambiguous
command-name prefixes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Tab on "copy /", "remove /" or "dir /" gave nothing, the CLI has no
shell to do it.  Limited to the directories copy and erase accept.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
There was no way to set a configuration aside from the CLI, only copy
and remove, so the way to start from a clean slate was to remove the
one file that holds the system's configuration.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
It is the one file most likely to be removed, and the only one whose
removal changes what the system boots.  Offer it, and say so before
asking.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Devices that netboot from the system, or fetch their configuration
over TFTP, need a local server.  Read-only, serving /var/lib/tftpboot
by default, or a directory on USB media.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Operators need to see what the server hands out, in particular when a
device fails to boot from it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Devices that netboot as a fallback read the boot file and server
address from the BOOTP header fields, which the option list cannot
set.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
dir listed three of the places copy accepts, and with no argument it
stopped after the first one.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Cover the TFTP server end to end, and the BOOTP header fields a
netbooting client sees, including which scope wins.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Where files live, how to get them there, per-client directories, and
the scope precedence for boot parameters.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Regression introduced in 0b026fa

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cn:delta Common Name: Delta Project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for acting as a TFTP server

1 participant