From patchwork Fri May 24 16:19:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 798692 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a47:0:b0:354:fb4b:99cd with SMTP id t7csp800139wrw; Fri, 24 May 2024 09:22:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW+y8QGrTyAfn4DmB/C/YPjcaLzp9jvjEOJkMeWXtjh2y2BdV6q+eK93Iybzxu4gMOo2A+7a7beX+4WJWINRfgq X-Google-Smtp-Source: AGHT+IEkM0sKHqIPNH0X0RPM1ix0nQ5g8xbd9NwGdQmls6dHQSEGTayIsSy2XwXzzJVNleVNSHuF X-Received: by 2002:a17:906:39cb:b0:a59:a979:2b03 with SMTP id a640c23a62f3a-a626250ce27mr262496866b.23.1716567735736; Fri, 24 May 2024 09:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716567735; cv=none; d=google.com; s=arc-20160816; b=DU7fNcKuSuqotKBtIpUn4JTRaHgPtZlMwCgtChDav8DvZPDwrHAPMQDt9sfxp/wH+V u1ZHCyMLijnDfBdn28erLVdXifHRJV/xcX9hfHRP8UBR2N3feBuCaP9hINEXScBvIIjX VU9PwuCXc8BEW+ZkPW4MAuJFaVMb3aUpw1A4Q8pMxGXAI3ZlF3NBbkGRn6Ytt+48k1t+ 5y+JHN7DFiOZm4yuAa8uwQCFZwFduV6FmK7RSTnhOvUxry1wwCcX709HJAhWFRcmD5sk sePJCXljA/YCpEGQAeSIG+9FOGg4rDzxlE8TQ+Oxi41zd0J6PZ+mIhINEuyU0AXpSRZC 6OfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cGhRi4GHirVvBh6qVqnUJfANp4fq2hNYMViO1y9rlTo=; fh=ekXsUQPhZdr3j4yJ9xR4wW90wSJ6ZxPoTiiDogoheA0=; b=GP3elIcJFSHrow3htlcf5z+aHhY8w+onQLNFfiHx8dKABq23LogxaHtL+IpXVyT3N0 dbapVt0H4EscdRhXq+RR3MsAeETLm21VJrbr20DVLDTADqFgN5jt5jvpH4AGyZp8Wbk6 +e/hhvdWCv97QrtFDgnXNFwGKdJY/om+3ymqdl006SoCwyiSih9IkvEVEhv7g1yg1M/P TAMLTy1wdFPUTXWXsG1iqUPJ+rDiIbTtfROHtqdhXCw0dVVKGtJJ1K++XZiBy5LIrY0Z I+GPM3cawzWGJjwlWW7XRL9fRazI2A/xiVVGFKDV/dZoPku1uB0/IMyFQckI1vZfAAwi WRNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KPFPWcY4; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cc3651fsi92457266b.384.2024.05.24.09.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 09:22:15 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KPFPWcY4; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CFE968884D; Fri, 24 May 2024 18:22:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KPFPWcY4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DEB9A88552; Fri, 24 May 2024 18:22:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1E2DC88647 for ; Fri, 24 May 2024 18:22:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-35507de9853so603828f8f.0 for ; Fri, 24 May 2024 09:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716567727; x=1717172527; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cGhRi4GHirVvBh6qVqnUJfANp4fq2hNYMViO1y9rlTo=; b=KPFPWcY449djEU4PMZatGLnwc0l52R6sfutZfOENj2c2hNmlcQJe8PN4PcKHupO0X+ eFNgNl6Vmj7/xpVoGoCzTLKhB0fi1SoFWnXoY+ZgdqmqcEXDPzAbDqONkybGz2lf8b8k xKweLVTkKdUBKxS3uaGHBzoYIZQFcKDpdMuwIMkqayHVSdxI3hleranAoBspe6EP4kkI lyLgnDa7841ed7xtAyyMNDDYEsazHmWex1CdNxKv/cj0IkBpoT8jILWZAxjhhWAv7Uf2 Doi8uCW8FCZn0sUDyYINS9EIOjBu9K9kQ7pPhcZcfCa45UJ2jlLZ3zbCfSz/TARlsdM1 5+8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716567727; x=1717172527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cGhRi4GHirVvBh6qVqnUJfANp4fq2hNYMViO1y9rlTo=; b=sSQgZLndLT7MjBIl2xlPZEef6XskSciUgu/o9gaMNeKhJ1hWL/PF3XUd+YVdDDO24h uGE14g77Ie30hVsKtb8UfBL1Wnn0c7Y10Vr9n61jqMt+6USMbWxSDEO3hvZhHZ3tOsG8 UaB3DcDLxaBzR/yw5kLXsdp2eJWtbSvalXHPMmPLQ4f0jHZHZFYv4kj9gTfsZDnpZ1cd CihHhBf6/Up60iiwnVWgisLpnCsuQsXFTy1YhyjvkXYMoMXu8fxwbx9kvuYRhCege3JU M6UiMJbKQHwGvJEpq+fV/va+tpuIoGQtq+bmxGO3xPQZT1QBa0ZimbUEE95M0uThxSv0 6tNw== X-Gm-Message-State: AOJu0YxwHWlcrNFqkmI6Y7VuO21w7lswmN5ts8pqg6a/AjcJ7AchCdRs ZghatTOmfnjfbdRDeJ4c5SM+MHZJmPiCSg/vHH6cTz3OQffShOv+rhI0HxmCjknlgeeVp44P3QA TCohL4NJW X-Received: by 2002:a05:6000:1151:b0:354:ece6:d9b9 with SMTP id ffacd0b85a97d-35506d5bfd3mr2707859f8f.15.1716567727428; Fri, 24 May 2024 09:22:07 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:80fe:af01:c137:b43b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a1c918csm1928465f8f.77.2024.05.24.09.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 09:22:07 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Maxim Uvarov , Jerome Forissier , Tom Rini , Simon Glass , Oleksandr Suvorov , Sean Anderson Subject: [PATCH v2 03/14] net-lwip: build lwIP Date: Fri, 24 May 2024 18:19:57 +0200 Message-Id: <3bfe6c3c2da0f15a0c5ccfcce21d9aedbb9a4ca1.1716566960.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Build the lwIP library when NET_LWIP is enabled. The following files are adaptation layers written specially for U-Boot: lib/lwip/u-boot/arch/cc.h lib/lwip/u-boot/arch/sys_arch.h (empty) lib/lwip/u-boot/limits.h (empty) lib/lwip/u-boot/lwipopts.h They were initially contributed by Maxim in a previous RFC patch series. Signed-off-by: Jerome Forissier Co-developed-by: Maxim Uvarov Cc: Maxim Uvarov --- lib/Makefile | 2 + lib/lwip/Makefile | 57 +++++++++ lib/lwip/u-boot/arch/cc.h | 43 +++++++ lib/lwip/u-boot/arch/sys_arch.h | 0 lib/lwip/u-boot/limits.h | 0 lib/lwip/u-boot/lwipopts.h | 197 ++++++++++++++++++++++++++++++++ net-lwip/Kconfig | 3 +- 7 files changed, 301 insertions(+), 1 deletion(-) create mode 100644 lib/lwip/Makefile create mode 100644 lib/lwip/u-boot/arch/cc.h create mode 100644 lib/lwip/u-boot/arch/sys_arch.h create mode 100644 lib/lwip/u-boot/limits.h create mode 100644 lib/lwip/u-boot/lwipopts.h diff --git a/lib/Makefile b/lib/Makefile index 2a76acf100d..c35786a0576 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -94,6 +94,8 @@ obj-$(CONFIG_LIBAVB) += libavb/ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/ obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o +obj-$(CONFIG_NET_LWIP) += lwip/ + ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o diff --git a/lib/lwip/Makefile b/lib/lwip/Makefile new file mode 100644 index 00000000000..158e59b91fc --- /dev/null +++ b/lib/lwip/Makefile @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2024 Linaro Ltd. + +ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot + +obj-y += \ + lwip/src/api/api_lib.o \ + lwip/src/api/api_msg.o \ + lwip/src/api/err.o \ + lwip/src/api/if_api.o \ + lwip/src/api/netbuf.o \ + lwip/src/api/netdb.o \ + lwip/src/api/netifapi.o \ + lwip/src/api/sockets.o \ + lwip/src/api/tcpip.o \ + lwip/src/apps/http/http_client.o \ + lwip/src/apps/tftp/tftp.o \ + lwip/src/core/altcp_alloc.o \ + lwip/src/core/altcp.o \ + lwip/src/core/altcp_tcp.o \ + lwip/src/core/def.o \ + lwip/src/core/dns.o \ + lwip/src/core/inet_chksum.o \ + lwip/src/core/init.o \ + lwip/src/core/ip.o \ + lwip/src/core/ipv4/acd.o \ + lwip/src/core/ipv4/autoip.o \ + lwip/src/core/ipv4/dhcp.o \ + lwip/src/core/ipv4/etharp.o \ + lwip/src/core/ipv4/icmp.o \ + lwip/src/core/ipv4/igmp.o \ + lwip/src/core/ipv4/ip4_addr.o \ + lwip/src/core/ipv4/ip4.o \ + lwip/src/core/ipv4/ip4_frag.o \ + lwip/src/core/ipv6/dhcp6.o \ + lwip/src/core/ipv6/ethip6.o \ + lwip/src/core/ipv6/icmp6.o \ + lwip/src/core/ipv6/inet6.o \ + lwip/src/core/ipv6/ip6_addr.o \ + lwip/src/core/ipv6/ip6.o \ + lwip/src/core/ipv6/ip6_frag.o \ + lwip/src/core/ipv6/mld6.o \ + lwip/src/core/ipv6/nd6.o \ + lwip/src/core/mem.o \ + lwip/src/core/memp.o \ + lwip/src/core/netif.o \ + lwip/src/core/pbuf.o \ + lwip/src/core/raw.o \ + lwip/src/core/stats.o \ + lwip/src/core/sys.o \ + lwip/src/core/tcp.o \ + lwip/src/core/tcp_in.o \ + lwip/src/core/tcp_out.o \ + lwip/src/core/timeouts.o \ + lwip/src/core/udp.o \ + lwip/src/netif/ethernet.o diff --git a/lib/lwip/u-boot/arch/cc.h b/lib/lwip/u-boot/arch/cc.h new file mode 100644 index 00000000000..31c036dc0c5 --- /dev/null +++ b/lib/lwip/u-boot/arch/cc.h @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2023 Linaro Ltd. */ + +#ifndef LWIP_ARCH_CC_H +#define LWIP_ARCH_CC_H + +#include +#include +#include +#include + +#define LWIP_ERRNO_INCLUDE + +#define LWIP_ERRNO_STDINCLUDE 1 +#define LWIP_NO_UNISTD_H 1 +#define LWIP_TIMEVAL_PRIVATE 1 + +#ifdef CONFIG_LIB_RAND +#define LWIP_RAND() ((u32_t)rand()) +#endif + +/* different handling for unit test, normally not needed */ +#ifdef LWIP_NOASSERT_ON_ERROR +#define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \ + handler; }} while (0) +#endif + +#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS + +#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); } while (0) + +#define atoi(str) (int)dectoul(str, NULL) +#define lwip_strnstr(a, b) strnstr(a, b) + +#define LWIP_ERR_T int +#define LWIP_CONST_CAST(target_type, val) ((target_type)((uintptr_t)val)) + +#if defined(CONFIG_SYS_BIG_ENDIAN) +#define BYTE_ORDER BIG_ENDIAN +#endif + +#endif /* LWIP_ARCH_CC_H */ diff --git a/lib/lwip/u-boot/arch/sys_arch.h b/lib/lwip/u-boot/arch/sys_arch.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/lwip/u-boot/limits.h b/lib/lwip/u-boot/limits.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/lwip/u-boot/lwipopts.h b/lib/lwip/u-boot/lwipopts.h new file mode 100644 index 00000000000..aac0a6259fd --- /dev/null +++ b/lib/lwip/u-boot/lwipopts.h @@ -0,0 +1,197 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* Copyright (C) 2023 Linaro Ltd. */ + +#ifndef LWIP_UBOOT_LWIPOPTS_H +#define LWIP_UBOOT_LWIPOPTS_H + +#if defined(CONFIG_LWIP_DEBUG) +#define LWIP_DEBUG 1 +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define ETHARP_DEBUG LWIP_DBG_ON +#define NETIF_DEBUG LWIP_DBG_ON +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_ON +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_ON +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_ON +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_ON +#define AUTOIP_DEBUG LWIP_DBG_ON +#define DNS_DEBUG LWIP_DBG_ON +#define IP6_DEBUG LWIP_DBG_OFF +#define DHCP6_DEBUG LWIP_DBG_OFF +#else +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#define LWIP_DBG_TYPES_ON LWIP_DBG_OFF +#define ETHARP_DEBUG LWIP_DBG_OFF +#define NETIF_DEBUG LWIP_DBG_OFF +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_OFF +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_OFF +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_OFF +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_OFF +#define AUTOIP_DEBUG LWIP_DBG_OFF +#define DNS_DEBUG LWIP_DBG_OFF +#define IP6_DEBUG LWIP_DBG_OFF +#define DHCP6_DEBUG LWIP_DBG_OFF +#endif +#define LWIP_TESTMODE 0 + +#if !defined(CONFIG_LWIP_ASSERT) +#define LWIP_NOASSERT 1 +#define LWIP_ASSERT(message, assertion) +#endif + +#include "lwip/debug.h" + +#define SYS_LIGHTWEIGHT_PROT 0 +#define NO_SYS 1 + +#define LWIP_IPV4 1 +#define LWIP_IPV6 0 + +#define MEM_ALIGNMENT 1 +#define MEM_SIZE 1600 + +#define MEMP_NUM_PBUF 4 +#define MEMP_NUM_RAW_PCB 2 +#define MEMP_NUM_UDP_PCB 4 +#define MEMP_NUM_TCP_PCB 2 +#define MEMP_NUM_TCP_PCB_LISTEN 2 +#define MEMP_NUM_TCP_SEG 16 +#define MEMP_NUM_REASSDATA 1 +#define MEMP_NUM_ARP_QUEUE 2 +#define MEMP_NUM_SYS_TIMEOUT 4 +#define MEMP_NUM_NETBUF 2 +#define MEMP_NUM_NETCONN 32 +#define MEMP_NUM_TCPIP_MSG_API 8 +#define MEMP_NUM_TCPIP_MSG_INPKT 8 +#define PBUF_POOL_SIZE 8 + +#define LWIP_ARP 1 +#define ARP_TABLE_SIZE 1 +#define ARP_QUEUEING 0 + +#define IP_FORWARD 0 +#define IP_OPTIONS_ALLOWED 1 +#define IP_REASSEMBLY 0 +#define IP_FRAG 0 +#define IP_REASS_MAXAGE 3 +#define IP_REASS_MAX_PBUFS 4 +#define IP_FRAG_USES_STATIC_BUF 0 + +#define IP_DEFAULT_TTL 255 + +#define LWIP_ICMP 0 + +#if defined(CONFIG_PROT_RAW_LWIP) +#define LWIP_RAW 1 +#else +#define LWIP_RAW 0 +#endif + +#if defined(CONFIG_PROT_DHCP_LWIP) +#define LWIP_DHCP 1 +#define LWIP_DHCP_BOOTP_FILE 1 +#else +#define LWIP_DHCP 0 +#endif + +#define LWIP_DHCP_DOES_ACD_CHECK 0 + +#define LWIP_AUTOIP 0 + +#define LWIP_SNMP 0 + +#define LWIP_IGMP 0 + +#if defined(CONFIG_PROT_DNS_LWIP) +#define LWIP_DNS 1 +#define DNS_TABLE_SIZE 1 +#else +#define LWIP_DNS 0 +#endif + +#if defined(CONFIG_PROT_UDP_LWIP) +#define LWIP_UDP 1 +#else +#define LWIP_UDP 0 +#endif + +#if defined(CONFIG_PROT_TCP_LWIP) +#define LWIP_TCP 1 +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_LISTEN_BACKLOG 0 + +#define PBUF_LINK_HLEN 14 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_HLEN) + +#define LWIP_HAVE_LOOPIF 0 + +#define LWIP_NETCONN 0 +#define LWIP_DISABLE_MEMP_SANITY_CHECKS 1 + +#define LWIP_SOCKET 0 +#define SO_REUSE 0 + +#define LWIP_STATS 0 + +#define PPP_SUPPORT 0 + +#define LWIP_TCPIP_CORE_LOCKING 0 + +#define LWIP_NETIF_LOOPBACK 0 + +/* use malloc instead of pool */ +#define MEMP_MEM_MALLOC 1 +#define MEMP_MEM_INIT 1 +#define MEM_LIBC_MALLOC 1 + +#endif /* LWIP_UBOOT_LWIPOPTS_H */ diff --git a/net-lwip/Kconfig b/net-lwip/Kconfig index f8e0481964f..7d9ec8fdfbd 100644 --- a/net-lwip/Kconfig +++ b/net-lwip/Kconfig @@ -12,4 +12,5 @@ menuconfig NET_LWIP depend on CONFIG_NET (such as cmd/net.c enabled via CONFIG_CMD_NET). Therefore the two symbols CONFIG_NET and CONFIG_NET_LWIP are mutually exclusive. - NOTE: This is currently a placeholder. + NOTE: This currently only builds the lwIP library but does not add + any functionality to U-Boot.