summaryrefslogtreecommitdiff
path: root/include/net-common.h
diff options
context:
space:
mode:
authorBenjamin Hahn <[email protected]>2025-10-21 16:34:17 +0200
committerTom Rini <[email protected]>2025-10-24 13:47:50 -0600
commitfae6c54d238279bf79c66ca65330425dff2c952f (patch)
tree813cf6aced3b0b62a91d28f234806373c84db07e /include/net-common.h
parent8506cf58ffa2029f168cc64089763084b408051d (diff)
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 <[email protected]> Signed-off-by: Benjamin Hahn <[email protected]>
Diffstat (limited to 'include/net-common.h')
-rw-r--r--include/net-common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net-common.h b/include/net-common.h
index 78d98e5bba0..f5cff3e7c0c 100644
--- a/include/net-common.h
+++ b/include/net-common.h
@@ -491,6 +491,15 @@ int dhcp_run(ulong addr, const char *fname, bool autoload);
int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
/**
+ * tftpb_run() - Run TFTP on the current ethernet device
+ *
+ * @addr: Address to load the file into
+ * @fname: Filename of file to load (NULL to use the default filename)
+ * @return 0 if OK, -ENOENT if ant file was not found
+ */
+int tftpb_run(ulong addr, const char *fname);
+
+/**
* do_ping - Run the ping command
*
* @cmdtp: Unused