]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: lwip: add TFTPSERVERIP Kconfig option
authorJonas Karlman <jonas@kwiboo.se>
Tue, 6 Jan 2026 20:34:30 +0000 (20:34 +0000)
committerJerome Forissier <jerome.forissier@arm.com>
Wed, 4 Feb 2026 08:04:36 +0000 (09:04 +0100)
With the legacy networking stack, it is possible to use USE_SERVERIP,
SERVERIP and BOOTP_PREFER_SERVERIP Kconfg options to force use of a
specific TFTP server ip.

Using the lwIP networking stack use of the 'tftpserverip' environment
variable provide the closest equivalent functionality.

Add USE_TFTPSERVERIP and TFTPSERVERIP Kconfig options that can be used
to add the 'tftpserverip' environment variable to force use of a
specific TFTP server ip.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Acked-by: Jerome Forissier <jerome.forissier@arm.com>
include/env_default.h
net/lwip/Kconfig

index 7f8dc1c35a7428f9759c1092e843ba455227d3a5..014873e304d8e626d56010c23d07a51895224035 100644 (file)
@@ -58,6 +58,9 @@ const char default_environment[] = {
 #ifdef CONFIG_USE_SERVERIP
        "serverip="     CONFIG_SERVERIP                 "\0"
 #endif
+#ifdef CONFIG_USE_TFTPSERVERIP
+       "tftpserverip=" CONFIG_TFTPSERVERIP             "\0"
+#endif
 #ifdef CONFIG_SYS_DISABLE_AUTOLOAD
        "autoload=0\0"
 #endif
index 5789766fe624806856690bb3116b4656e4e9f2f3..0cfd3eb2684f78f59ccae1bcb30ecdfed30143c7 100644 (file)
@@ -72,4 +72,16 @@ config LWIP_TCP_WND
          but QEMU with "-net user" needs no more than a few KB or the
          transfer will stall and eventually time out.
 
+config USE_TFTPSERVERIP
+       bool "Set a default 'tftpserverip' value in the environment"
+       depends on CMD_TFTPBOOT
+       help
+         Defines a default value for the IP address of a TFTP server to
+         contact when using the "tftpboot" command.  (Environment variable
+         "tftpserverip")
+
+config TFTPSERVERIP
+       string "Value of the default 'tftpserverip' value in the environment"
+       depends on USE_TFTPSERVERIP
+
 endif # NET_LWIP