Browse Source

pkg: initial import of lwIP package

pr/gpio
Martine Lenders 8 years ago committed by Martine Lenders
parent
commit
29515a7bb9
  1. 5
      Makefile.dep
  2. 11
      pkg/lwip/Makefile
  3. 2
      pkg/lwip/Makefile.include
  4. 6
      pkg/lwip/doc.txt
  5. 29
      pkg/lwip/patches/0001-Fix-warnings.patch
  6. 119
      pkg/lwip/patches/0002-Add-RIOT-Makefiles.patch

5
Makefile.dep

@ -354,6 +354,11 @@ ifneq (,$(filter posix_semaphore,$(USEMODULE)))
USEMODULE += xtimer
endif
ifneq (,$(filter lwip,$(USEMODULE)))
USEPKG += lwip
USEMODULE += lwip_core
endif
ifneq (,$(filter sema,$(USEMODULE)))
USEMODULE += xtimer
endif

11
pkg/lwip/Makefile

@ -0,0 +1,11 @@
PKG_NAME=lwip
PKG_URL=git://git.savannah.nongnu.org/lwip.git
PKG_VERSION=fd4a109ffa6513b28a0c780a952cef1110423717
PKG_BUILDDIR ?= $(BINDIRBASE)/pkg/$(BOARD)/$(PKG_NAME)
.PHONY: all
all: git-download
$(MAKE) -C $(PKG_BUILDDIR)
include $(RIOTBASE)/pkg/pkg.mk

2
pkg/lwip/Makefile.include

@ -0,0 +1,2 @@
INCLUDES += -I$(RIOTBASE)/pkg/lwip/include \
-I$(BINDIRBASE)/pkg/$(BOARD)/lwip/src/include

6
pkg/lwip/doc.txt

@ -0,0 +1,6 @@
/**
* @defgroup pkg_lwip lwIP network stack
* @ingroup pkg
* @brief Provides the lwIP network stack
* @see http://savannah.nongnu.org/projects/lwip/
*/

29
pkg/lwip/patches/0001-Fix-warnings.patch

@ -0,0 +1,29 @@
From 0e28e1cd26c1de2ccf48bea9013676ef1d4d69b7 Mon Sep 17 00:00:00 2001
From: Martine Lenders <mail@martine-lenders.eu>
Date: Thu, 12 Nov 2015 16:36:00 +0100
Subject: [PATCH 1/2] Fix warnings
---
src/include/lwip/debug.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/include/lwip/debug.h b/src/include/lwip/debug.h
index 973a633..c7b3c9c 100644
--- a/src/include/lwip/debug.h
+++ b/src/include/lwip/debug.h
@@ -67,8 +67,10 @@
* -- To disable assertions define LWIP_NOASSERT in arch/cc.h.
*/
#ifndef LWIP_NOASSERT
-#define LWIP_ASSERT(message, assertion) do { if(!(assertion)) \
- LWIP_PLATFORM_ASSERT(message); } while(0)
+#define LWIP_ASSERT(message, assertion) \
+ if(!(assertion)) { \
+ LWIP_PLATFORM_ASSERT(message); \
+ }
#ifndef LWIP_PLATFORM_ASSERT
#error "If you want to use LWIP_ASSERT, LWIP_PLATFORM_ASSERT(message) needs to be defined in your arch/cc.h"
#endif
--
1.9.1

119
pkg/lwip/patches/0002-Add-RIOT-Makefiles.patch

@ -0,0 +1,119 @@
From 4f1f9c53db7ffeece81253d9b39d78296e5b68a8 Mon Sep 17 00:00:00 2001
From: Martine Lenders <mail@martine-lenders.eu>
Date: Thu, 12 Nov 2015 15:43:31 +0100
Subject: [PATCH 2/2] Add RIOT Makefiles
---
Makefile | 23 +++++++++++++++++++++++
src/api/Makefile | 3 +++
src/core/Makefile | 3 +++
src/core/ipv4/Makefile | 3 +++
src/core/ipv6/Makefile | 3 +++
src/netif/Makefile | 3 +++
src/netif/ppp/Makefile | 3 +++
src/netif/ppp/polarssl/Makefile | 3 +++
8 files changed, 44 insertions(+)
create mode 100644 Makefile
create mode 100644 src/api/Makefile
create mode 100644 src/core/Makefile
create mode 100644 src/core/ipv4/Makefile
create mode 100644 src/core/ipv6/Makefile
create mode 100644 src/netif/Makefile
create mode 100644 src/netif/ppp/Makefile
create mode 100644 src/netif/ppp/polarssl/Makefile
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..dbfb087
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+ifneq (,$(filter lwip_api,$(USEMODULE)))
+ DIRS += src/api
+endif
+ifneq (,$(filter lwip_core,$(USEMODULE)))
+ DIRS += src/core
+endif
+ifneq (,$(filter lwip_ipv4,$(USEMODULE)))
+ DIRS += src/core/ipv4
+endif
+ifneq (,$(filter lwip_ipv6,$(USEMODULE)))
+ DIRS += src/core/ipv6
+endif
+ifneq (,$(filter lwip_netif,$(USEMODULE)))
+ DIRS += src/netif
+endif
+ifneq (,$(filter lwip_netif_ppp,$(USEMODULE)))
+ DIRS += src/netif/ppp
+endif
+ifneq (,$(filter lwip_polarssl,$(USEMODULE)))
+ DIRS += src/netif/ppp/polarssl
+endif
+
+include $(RIOTBASE)/Makefile.base
diff --git a/src/api/Makefile b/src/api/Makefile
new file mode 100644
index 0000000..84b4323
--- /dev/null
+++ b/src/api/Makefile
@@ -0,0 +1,3 @@
+MODULE := lwip_api
+
+include $(RIOTBASE)/Makefile.base
diff --git a/src/core/Makefile b/src/core/Makefile
new file mode 100644
index 0000000..2943234
--- /dev/null
+++ b/src/core/Makefile
@@ -0,0 +1,3 @@
+MODULE := lwip_core
+
+include $(RIOTBASE)/Makefile.base
diff --git a/src/core/ipv4/Makefile b/src/core/ipv4/Makefile
new file mode 100644
index 0000000..b3a7a5e
--- /dev/null
+++ b/src/core/ipv4/Makefile
@@ -0,0 +1,3 @@
+MODULE := lwip_ipv4
+
+include $(RIOTBASE)/Makefile.base
diff --git a/src/core/ipv6/Makefile b/src/core/ipv6/Makefile
new file mode 100644
index 0000000..e26e51f
--- /dev/null
+++ b/src/core/ipv6/Makefile
@@ -0,0 +1,3 @@
+MODULE := lwip_ipv6
+
+include $(RIOTBASE)/Makefile.base
diff --git a/src/netif/Makefile b/src/netif/Makefile
new file mode 100644
index 0000000..bb86d8f
--- /dev/null
+++ b/src/netif/Makefile
@@ -0,0 +1,3 @@
+MODULE := lwip_netif
+
+include $(RIOTBASE)/Makefile.base
diff --git a/src/netif/ppp/Makefile b/src/netif/ppp/Makefile
new file mode 100644
index 0000000..bd21288
--- /dev/null
+++ b/src/netif/ppp/Makefile
@@ -0,0 +1,3 @@
+MODULE := lwip_netif_ppp
+
+include $(RIOTBASE)/Makefile.base
diff --git a/src/netif/ppp/polarssl/Makefile b/src/netif/ppp/polarssl/Makefile
new file mode 100644
index 0000000..6030171
--- /dev/null
+++ b/src/netif/ppp/polarssl/Makefile
@@ -0,0 +1,3 @@
+MODULE := lwip_polarssl
+
+include $(RIOTBASE)/Makefile.base
--
1.9.1
Loading…
Cancel
Save