summaryrefslogtreecommitdiff
path: root/boot/bootmeth_script.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/bootmeth_script.c')
-rw-r--r--boot/bootmeth_script.c6
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);