[PATCHv7 02/15] net/lwip: integrate lwIP library

Michal Simek monstr at monstr.eu
Thu Sep 7 15:29:00 CEST 2023


út 22. 8. 2023 v 11:38 odesílatel Maxim Uvarov <maxim.uvarov at linaro.org> napsal:
>
> Define Makefile and Kconfig to build lwIP inside the U-Boot. We compile
> lwIP the same as the main code, plus we can do optimization for size at
> compile time with disabling not needed debug asserts, or not used protocols.
> So we can tune lwIP configuration specially for U-Boot environments.
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov at linaro.org>
> ---
>  net/Kconfig       |  3 +++
>  net/Makefile      |  1 +
>  net/lwip/Kconfig  | 55 +++++++++++++++++++++++++++++++++++++++
>  net/lwip/Makefile | 66 +++++++++++++++++++++++++++++++++++++++++++++++
>  net/net.c         | 20 ++++++++++++++
>  5 files changed, 145 insertions(+)
>  create mode 100644 net/lwip/Kconfig
>  create mode 100644 net/lwip/Makefile
>
> diff --git a/net/Kconfig b/net/Kconfig
> index 4215889127..34c1e43c87 100644
> --- a/net/Kconfig
> +++ b/net/Kconfig
> @@ -5,9 +5,12 @@
>  menuconfig NET
>         bool "Networking support"
>         default y
> +       imply LWIP
>
>  if NET
>
> +source net/lwip/Kconfig
> +
>  config ARP_TIMEOUT
>         int "Milliseconds before trying ARP again"
>         default 5000
> diff --git a/net/Makefile b/net/Makefile
> index 3e2d061338..61930c244e 100644
> --- a/net/Makefile
> +++ b/net/Makefile
> @@ -33,6 +33,7 @@ obj-$(CONFIG_CMD_WOL)  += wol.o
>  obj-$(CONFIG_PROT_UDP) += udp.o
>  obj-$(CONFIG_PROT_TCP) += tcp.o
>  obj-$(CONFIG_CMD_WGET) += wget.o
> +obj-$(CONFIG_LWIP) += lwip/
>
>  # Disable this warning as it is triggered by:
>  # sprintf(buf, index ? "foo%d" : "foo", index)
> diff --git a/net/lwip/Kconfig b/net/lwip/Kconfig
> new file mode 100644
> index 0000000000..f07e26f7d9
> --- /dev/null
> +++ b/net/lwip/Kconfig
> @@ -0,0 +1,55 @@
> +menu "LWIP"
> +config LWIP
> +       bool "Support LWIP library"
> +       help
> +          Enable the lwIP library code with
> +          all dependencies (commands are implemented with lwIP
> +          library. This option is automatically enabled if CONFIG_NET=y.
> +         lwIP library (https://git.savannah.nongnu.org/git/lwip.git) provides
> +          network stack and application code for U-Boot commands.
> +         Please see doc/develop/net_lwip.rst for more details.
> +
> +menu "LWIP options"
> +
> +config LWIP_LIB_DEBUG
> +       bool "enable debug"
> +       default n
> +
> +config LWIP_LIB_NOASSERT
> +       bool "disable asserts"
> +       default y
> +       help
> +           Disabling asserts reduces binary size by 16k.
> +
> +config LWIP_LIB_TCP
> +        bool "tcp"
> +        default y

Please check tab/space in this file. Below you have the same issues.

Thanks,
Michal


More information about the U-Boot mailing list