From 230cf3bc277622081b27e33469f5f1f59fc48180 Mon Sep 17 00:00:00 2001 From: Andrew Goodbody Date: Fri, 12 Dec 2025 11:32:28 +0000 Subject: net: lwip: nfs: Port the NFS code to work with lwIP After the preparatory patches moved most of the NFS code into common files we now add the code to enable NFS support with lwIP. Signed-off-by: Andrew Goodbody Acked-by: Jerome Forissier --- cmd/Kconfig | 28 ++++++++++++++-------------- cmd/lwip/Makefile | 1 + cmd/lwip/nfs.c | 11 +++++++++++ 3 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 cmd/lwip/nfs.c (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index b71ac554c0b..595ac49da41 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2116,20 +2116,6 @@ config CMD_RARP help Boot image via network using RARP/TFTP protocol -config CMD_NFS - bool "nfs" - help - Boot image via network using NFS protocol. - -config NFS_TIMEOUT - int "Timeout in milliseconds for NFS mounts" - depends on CMD_NFS - default 2000 - help - Timeout in milliseconds used in NFS protocol. If you encounter - "ERROR: Cannot umount" in nfs command, try longer timeout such as - 10000. - config SYS_DISABLE_AUTOLOAD bool "Disable automatically loading files over the network" depends on CMD_BOOTP || CMD_DHCP || CMD_NFS || CMD_RARP @@ -2224,6 +2210,20 @@ config CMD_MDIO The MDIO interface is orthogonal to the MII interface and extends it by adding access to more registers through indirect addressing. +config CMD_NFS + bool "nfs" + help + Boot image via network using NFS protocol. + +config NFS_TIMEOUT + int "Timeout in milliseconds for NFS mounts" + depends on CMD_NFS + default 2000 + help + Timeout in milliseconds used in NFS protocol. If you encounter + "ERROR: Cannot umount" in nfs command, try longer timeout such as + 10000. + config CMD_PING bool "ping" select PROT_RAW_LWIP if NET_LWIP diff --git a/cmd/lwip/Makefile b/cmd/lwip/Makefile index a7f8976af3f..90df1f5511c 100644 --- a/cmd/lwip/Makefile +++ b/cmd/lwip/Makefile @@ -1,5 +1,6 @@ obj-$(CONFIG_CMD_DHCP) += dhcp.o obj-$(CONFIG_CMD_DNS) += dns.o +obj-$(CONFIG_CMD_NFS) += nfs.o obj-$(CONFIG_CMD_PING) += ping.o obj-$(CONFIG_CMD_SNTP) += sntp.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o diff --git a/cmd/lwip/nfs.c b/cmd/lwip/nfs.c new file mode 100644 index 00000000000..f22db582fdb --- /dev/null +++ b/cmd/lwip/nfs.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2025 Linaro Ltd. */ + +#include +#include + +U_BOOT_CMD(nfs, 3, 1, do_nfs, + "boot image via network using NFS protocol", + "[loadAddress] [[hostIPaddr:]bootfilename]" + ); + -- cgit v1.2.3 From 7d650e7f90892e3ed1c79bab88955bbbaeb660e4 Mon Sep 17 00:00:00 2001 From: Link Mauve Date: Sat, 27 Dec 2025 19:18:48 +0100 Subject: =?UTF-8?q?Add=20missing=20=E2=80=9Cnet=E2=80=9D=20prefix=20in=20h?= =?UTF-8?q?elp=20net?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The usage of the net sub-system was missing the complete command for “net stats”. Signed-off-by: Link Mauve Reviewed-by: Jerome Forissier --- cmd/net-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/net-common.c b/cmd/net-common.c index 1c6f11cd435..6f33d15d695 100644 --- a/cmd/net-common.c +++ b/cmd/net-common.c @@ -103,4 +103,4 @@ static int do_net(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) U_BOOT_CMD(net, 3, 1, do_net, "NET sub-system", "list - list available devices\n" - "stats - dump statistics for specified device\n"); + "net stats - dump statistics for specified device\n"); -- cgit v1.2.3