aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/common/dev_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/common/dev_net.c')
-rw-r--r--sys/boot/common/dev_net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/boot/common/dev_net.c b/sys/boot/common/dev_net.c
index ed07a2cfc15b..733e3c327f12 100644
--- a/sys/boot/common/dev_net.c
+++ b/sys/boot/common/dev_net.c
@@ -167,8 +167,13 @@ net_open(struct open_file *f, ...)
setenv("boot.netif.ip", inet_ntoa(myip), 1);
setenv("boot.netif.netmask", intoa(netmask), 1);
setenv("boot.netif.gateway", inet_ntoa(gateip), 1);
+#ifdef LOADER_TFTP_SUPPORT
+ setenv("boot.tftproot.server", inet_ntoa(rootip), 1);
+ setenv("boot.tftproot.path", rootpath, 1);
+#else
setenv("boot.nfsroot.server", inet_ntoa(rootip), 1);
setenv("boot.nfsroot.path", rootpath, 1);
+#endif
if (intf_mtu != 0) {
char mtu[16];
sprintf(mtu, "%u", intf_mtu);