On 10/12/2025 12:55, Heinrich Schuchardt wrote:
On 12/8/25 13:52, Andrew Goodbody wrote:
This series ports the existing NFS code so that it can be used with both
the legacy network code and also with LWIP.
Firstly some legacy network code, mostly variables, is moved into common
files so that it is accessible to LWIP.
Secondly the NFS code is refactored so that the parts that are not
specific to the network code can be shared with both network
implementations.
Finally the LWIP specific parts needed to interface the NFS shared code
to that network stack are added and enabled.

Signed-off-by: Andrew Goodbody <[email protected]>
---
Andrew Goodbody (5):
       net: move net_state to net-common
       net: Move some variables to net-common files
       net: nfs: Add licence header
       net: nfs: Move most NFS code to common files
       net: lwip: nfs: Port the NFS code to work with LWIP

  cmd/Kconfig          |  28 +-
  cmd/lwip/Makefile    |   1 +
  cmd/lwip/nfs.c       |  11 +
  include/net-common.h |  38 ++-
  include/net-legacy.h |  26 --
  include/net-lwip.h   |   1 +
  net/Makefile         |   1 +
  net/lwip/Makefile    |   1 +
  net/lwip/net-lwip.c  |   5 -
  net/lwip/nfs.c       | 282 +++++++++++++++++
  net/net-common.c     |  21 ++
  net/net.c            |  23 --
  net/nfs-common.c     | 863 +++++++++++++++++++++++++++++++++++++++++ ++++++++++
  net/nfs-common.h     | 123 ++++++++
  net/nfs.c            | 849 +-------------------------------------------------
  net/nfs.h            |  59 ----
  16 files changed, 1368 insertions(+), 964 deletions(-)
---
base-commit: 59f9fcc1f514762674ac07c13c2a85f7aace7250
change-id: 20251029-lwip_nfs-5385efca71bc

Best regards,

Thank you for looking into the LWIP port.

We lack an NFS server in our Gitlab CI to run the NFS test.

For HTTP we are running
python3 -m http.server 80 --directory "${UBOOT_TRAVIS_BUILD_DIR}"
in .gitlab-ci.yml.

We should do something similar for NFS.

There is a userspace NFS server available
at https://github.com/unfs3/unfs3.

This worked on my workstation:

cat > exports << EOF
/home/ubuntu
EOF
./unfsd -e `pwd`/exports  -u  -n 4096 -m 4096
sudo mount -t nfs \
-o port=4096,mountport=4096,mountvers=3,nolock \
localhost:/home/ubuntu /mnt

Now in /mnt I could see the /home/ubuntu file-system.

Tom, is this something that can be added to the build containers?

With LWIP we should think about enabling tcp for NFS.

As they say, patches are welcome, but it is unfortunately well outside the scope of this work.

Andrew

Best regards

Heinrich

Reply via email to