public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] LWIP stack integration
@ 2023-05-05 10:25 Maxim Uvarov
  2023-05-05 10:25 ` [RFC PATCH 1/5] add lwip-external submodule Maxim Uvarov
                   ` (7 more replies)
  0 siblings, 8 replies; 37+ messages in thread
From: Maxim Uvarov @ 2023-05-05 10:25 UTC (permalink / raw)
  To: u-boot
  Cc: pbrobinson, ilias.apalodimas, joe.hershberger, rfried.dev,
	Maxim Uvarov

Greetings,

This RFC patchset is an attempt to try to use an already existing IP network stack inside U-boot.
U-Boot recently got basic TCP/IP support, implementing wget, but in order to get a full IP stack
with new features (e.g ipv6), it would be preferable to use an established embedded ip library,
instead of rewriting the code from scratch.

For this experiment LWIP network stack was selected:
https://savannah.nongnu.org/git/?group=lwip

LWIP main features include:
- Protocols: IP, IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, PPPoE
- DHCP client, DNS client (incl. mDNS hostname resolver), AutoIP/APIPA (Zeroconf),
  SNMP agent (v1, v2c, v3, private MIB support & MIB compiler)
- APIs: specialized APIs for enhanced performance, optional Berkeley-alike socket API
- Extended features: IP forwarding over multiple network interfaces, TCP congestion control,
  RTT estimation and fast recovery/fast retransmit
- Addon applications: HTTP(S) server, SNTP client, SMTP(S) client, ping, NetBIOS nameserver,
  mDNS responder, MQTT client, TFTP server.

This RFC work is a demo to enable lwIP (lightweight IP) which is a widely used open-source 
TCP/IP stack designed for embedded systems for U-boot. That will allow using already 
written network applications for microcontrollers.

lwIP is licensed under a BSD-style license: http://lwip.wikia.com/wiki/License.
Which should be compatible with u-boot.

In the current RFC I tried to use minimal changes to better see how LWIP code can be embedded into
U-boot. Patches implement ping and wget commands work. Both commands are currently copy pasting and
reusing lwIP examples.  Whether we want to add the final application in U-Boot or lwIP is up to 
discussion, but the current approach was the easiest one for an RFC.

Looking for your comments,
Best regards,
Maxim.

Maxim Uvarov (5):
  add lwip-external submodule
  lib/lwip: compile-in core files
  add doc/README.lwip
  add doc/README.lwip.size
  lwip: implement wget command from http_client.c example

 .gitignore                             |   5 +
 .gitmodules                            |   3 +
 doc/README.lwip                        |  90 +++++
 doc/README.lwip.size                   | 291 +++++++++++++++
 include/net.h                          |   2 +-
 lib/Kconfig                            |   2 +
 lib/Makefile                           |   2 +
 lib/lwip/Kconfig                       |  12 +
 lib/lwip/Makefile                      |  86 +++++
 lib/lwip/apps/http/lwip-wget.c         |  67 ++++
 lib/lwip/apps/http/rmstatic.patch      |  47 +++
 lib/lwip/apps/ping/lwip_ping.c         |  33 ++
 lib/lwip/apps/ping/lwip_ping.h         |  19 +
 lib/lwip/apps/ping/ping.h              |   0
 lib/lwip/apps/ping/rmstatic.patch      |  32 ++
 lib/lwip/cmd-lwip.c                    | 129 +++++++
 lib/lwip/lwip-external                 |   1 +
 lib/lwip/lwipopts.h                    | 484 +++++++++++++++++++++++++
 lib/lwip/port/if.c                     | 256 +++++++++++++
 lib/lwip/port/include/arch/cc.h        |  41 +++
 lib/lwip/port/include/arch/sys_arch.h  |  78 ++++
 lib/lwip/port/include/arch/u-sockets.h |  26 ++
 lib/lwip/port/include/limits.h         |   0
 lib/lwip/port/sys-arch.c               |   7 +
 net/eth-uclass.c                       |   4 +-
 net/net.c                              |  14 +
 26 files changed, 1729 insertions(+), 2 deletions(-)
 create mode 100644 .gitmodules
 create mode 100644 doc/README.lwip
 create mode 100644 doc/README.lwip.size
 create mode 100644 lib/lwip/Kconfig
 create mode 100644 lib/lwip/Makefile
 create mode 100644 lib/lwip/apps/http/lwip-wget.c
 create mode 100644 lib/lwip/apps/http/rmstatic.patch
 create mode 100644 lib/lwip/apps/ping/lwip_ping.c
 create mode 100644 lib/lwip/apps/ping/lwip_ping.h
 create mode 100644 lib/lwip/apps/ping/ping.h
 create mode 100644 lib/lwip/apps/ping/rmstatic.patch
 create mode 100644 lib/lwip/cmd-lwip.c
 create mode 160000 lib/lwip/lwip-external
 create mode 100644 lib/lwip/lwipopts.h
 create mode 100644 lib/lwip/port/if.c
 create mode 100644 lib/lwip/port/include/arch/cc.h
 create mode 100644 lib/lwip/port/include/arch/sys_arch.h
 create mode 100644 lib/lwip/port/include/arch/u-sockets.h
 create mode 100644 lib/lwip/port/include/limits.h
 create mode 100644 lib/lwip/port/sys-arch.c

-- 
2.30.2


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2023-06-11 18:35 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-05 10:25 [RFC PATCH 0/5] LWIP stack integration Maxim Uvarov
2023-05-05 10:25 ` [RFC PATCH 1/5] add lwip-external submodule Maxim Uvarov
2023-05-08 14:43   ` Simon Glass
2023-05-10  7:40     ` Ilias Apalodimas
2023-05-10 14:46       ` Peter Robinson
2023-05-11 13:51         ` Tom Rini
2023-05-11 13:51   ` Tom Rini
2023-05-05 10:25 ` [RFC PATCH 2/5] lib/lwip: compile-in core files Maxim Uvarov
2023-05-05 10:25 ` [RFC PATCH 3/5] add doc/README.lwip Maxim Uvarov
2023-05-11 13:51   ` Tom Rini
2023-05-05 10:25 ` [RFC PATCH 4/5] add doc/README.lwip.size Maxim Uvarov
2023-05-11 13:51   ` Tom Rini
2023-05-05 10:25 ` [RFC PATCH 5/5] lwip: implement wget command from http_client.c example Maxim Uvarov
2023-05-05 10:27 ` [RFC PATCH 0/5] LWIP stack integration Ilias Apalodimas
2023-05-08 21:23 ` Simon Glass
2023-05-11 13:28   ` Maxim Uvarov
2023-05-11 13:52 ` Tom Rini
2023-05-15 15:25   ` Maxim Uvarov
2023-05-15 15:39     ` Tom Rini
2023-05-19 13:17   ` Ilias Apalodimas
2023-05-19 13:52     ` Tom Rini
2023-05-22  9:01       ` Maxim Uvarov
2023-05-22 13:33         ` Ilias Apalodimas
2023-05-22 14:20           ` Tom Rini
2023-05-22 16:40             ` Maxim Uvarov
2023-05-22 21:23               ` Tom Rini
2023-05-24 14:05                 ` Maxim Uvarov
2023-05-24 20:18                   ` [lwip-devel] " Simon Goldschmidt
2023-06-06 14:33                     ` Maxim Uvarov
2023-06-07  9:46                       ` Ilias Apalodimas
2023-06-07 12:01                         ` Maxim Uvarov
2023-06-11  8:24                         ` Simon Glass
2023-06-11 18:34                           ` Tom Rini
2023-06-07 20:07                     ` Tom Rini
2023-06-08 10:14                       ` Maxim Uvarov
2023-06-08 17:52                         ` Ilias Apalodimas
2023-06-09  7:37                           ` Peter Robinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox