diff options
| author | Benjamin Hahn <[email protected]> | 2025-10-21 16:34:17 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-24 13:47:50 -0600 |
| commit | fae6c54d238279bf79c66ca65330425dff2c952f (patch) | |
| tree | 813cf6aced3b0b62a91d28f234806373c84db07e /boot/bootmeth_script.c | |
| parent | 8506cf58ffa2029f168cc64089763084b408051d (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 'boot/bootmeth_script.c')
| -rw-r--r-- | boot/bootmeth_script.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/boot/bootmeth_script.c b/boot/bootmeth_script.c index 020cb8a7aec..cd50977cc40 100644 --- a/boot/bootmeth_script.c +++ b/boot/bootmeth_script.c @@ -129,7 +129,11 @@ static int script_read_bootflow_net(struct bootflow *bflow) if (!fname) return log_msg_ret("dhc", -EINVAL); - ret = dhcp_run(addr, fname, true); + if (IS_ENABLED(CONFIG_CMD_TFTPBOOT) && env_get_yesno("ip_dyn") == 0) + ret = tftpb_run(addr, fname); + else + ret = dhcp_run(addr, fname, true); + if (ret) return log_msg_ret("dhc", ret); |
