bootstd: make it possible to use tftp for netboot with standardboot

Add the option to load the bootscript with the tftp command (static IP)
instead of the dhcp command (dynamic IP). For this a new function
tftpb_run similar to dhcp_run, is needed. The selection of which command
to use can be done with the ip_dyn environment variable, which can be
set to yes or no. The ip_dyn variable was chosen as it is already in use
on the imx platforms.
Also edit the bootstd doc.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
This commit is contained in:
Benjamin Hahn
2025-10-21 16:34:17 +02:00
committed by Tom Rini
parent 8506cf58ff
commit fae6c54d23
5 changed files with 43 additions and 3 deletions

View File

@@ -12,8 +12,10 @@ list of prefixes (``{"/", "/boot"}`` by default) and can be adjust with the
`filename-prefixes` property in the bootstd device.
For a network device, the filename is obtained from the `boot_script_dhcp`
environment variable and the file is read using tftp. It must be in the
top-level directory of the tftp server.
environment variable. By setting the `ip_dyn` environment variable it can be
decided if dynamic ip (dhcp command) or static ip (tftp command) is used for
reading the file. By default dhcp is used. The file must be in the top-level
directory of the tftp server.
In either case (file or network), the bootmeth searches for the file and creates
a bootflow if found. The bootmeth searches for "boot.scr.uimg" first, then