From a131ea757656b5aca176d2301b188ab7b87d9d03 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 18 Nov 2019 15:51:44 +0100 Subject: [PATCH 1/7] Makefile.dep: include board specific application dependency file This commit allows to add a Makefile.dep file in an application directory to finely tune application dependencies, based on a board. Using this mechanism, if an application has dependencies pulled-in based on a board, info-boards-supported, will take this into account to determine the boards supported by an application --- Makefile.dep | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.dep b/Makefile.dep index d7b84f0c26..98a39481c3 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -2,6 +2,9 @@ OLD_USEMODULE := $(sort $(USEMODULE)) OLD_USEPKG := $(sort $(USEPKG)) +# include board specific application dependencies +-include $(APPDIR)/Makefile.board.dep + # include board dependencies -include $(RIOTBOARD)/$(BOARD)/Makefile.dep From a06ac2afc001df33ca467272a5ba466e77f45ba6 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 18 Nov 2019 15:52:21 +0100 Subject: [PATCH 2/7] tests/gnrc_ipv6_ext: move board specific deps in Makefile.board.dep --- tests/gnrc_ipv6_ext/Makefile | 4 ---- tests/gnrc_ipv6_ext/Makefile.board.dep | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 tests/gnrc_ipv6_ext/Makefile.board.dep diff --git a/tests/gnrc_ipv6_ext/Makefile b/tests/gnrc_ipv6_ext/Makefile index 79bc3382a1..886149f903 100644 --- a/tests/gnrc_ipv6_ext/Makefile +++ b/tests/gnrc_ipv6_ext/Makefile @@ -9,12 +9,8 @@ export TAP ?= tap0 # use Ethernet as link-layer protocol ifeq (native,$(BOARD)) - USEMODULE += netdev_tap - TERMFLAGS ?= $(TAP) else - USEMODULE += stdio_ethos - ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) TERMDEPS += ethos diff --git a/tests/gnrc_ipv6_ext/Makefile.board.dep b/tests/gnrc_ipv6_ext/Makefile.board.dep new file mode 100644 index 0000000000..b595b8605c --- /dev/null +++ b/tests/gnrc_ipv6_ext/Makefile.board.dep @@ -0,0 +1,6 @@ +# Put board specific dependencies here +ifeq (native,$(BOARD)) + USEMODULE += netdev_tap +else + USEMODULE += stdio_ethos +endif From 805907ee0fd45658c656f5741cf724eff7e07c52 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 18 Nov 2019 15:53:57 +0100 Subject: [PATCH 3/7] tests/gnrc_ipv6_ext_frag: move board specific deps in Makefile.board.dep --- tests/gnrc_ipv6_ext_frag/Makefile | 3 --- tests/gnrc_ipv6_ext_frag/Makefile.board.dep | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 tests/gnrc_ipv6_ext_frag/Makefile.board.dep diff --git a/tests/gnrc_ipv6_ext_frag/Makefile b/tests/gnrc_ipv6_ext_frag/Makefile index 19fe733bde..946749d325 100644 --- a/tests/gnrc_ipv6_ext_frag/Makefile +++ b/tests/gnrc_ipv6_ext_frag/Makefile @@ -12,11 +12,8 @@ CFLAGS += -DTEST_SUITES="gnrc_ipv6_ext_frag" CFLAGS += -DGNRC_IPV6_EXT_FRAG_LIMITS_POOL_SIZE=3 ifeq (native,$(BOARD)) - USEMODULE += netdev_tap TERMFLAGS ?= $(TAP) else - USEMODULE += stdio_ethos - ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) TERMDEPS += ethos diff --git a/tests/gnrc_ipv6_ext_frag/Makefile.board.dep b/tests/gnrc_ipv6_ext_frag/Makefile.board.dep new file mode 100644 index 0000000000..b595b8605c --- /dev/null +++ b/tests/gnrc_ipv6_ext_frag/Makefile.board.dep @@ -0,0 +1,6 @@ +# Put board specific dependencies here +ifeq (native,$(BOARD)) + USEMODULE += netdev_tap +else + USEMODULE += stdio_ethos +endif From f184c7daf2e81deb46a3d3367e43756abdd3593f Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 18 Nov 2019 15:55:06 +0100 Subject: [PATCH 4/7] tests/gnrc_rpl_srh: move board specific deps in Makefile.board.dep --- tests/gnrc_rpl_srh/Makefile | 4 ---- tests/gnrc_rpl_srh/Makefile.board.dep | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 tests/gnrc_rpl_srh/Makefile.board.dep diff --git a/tests/gnrc_rpl_srh/Makefile b/tests/gnrc_rpl_srh/Makefile index 4be5e28b19..02a7700277 100644 --- a/tests/gnrc_rpl_srh/Makefile +++ b/tests/gnrc_rpl_srh/Makefile @@ -11,12 +11,8 @@ CFLAGS += -DOUTPUT=TEXT # use Ethernet as link-layer protocol ifeq (native,$(BOARD)) - USEMODULE += netdev_tap - TERMFLAGS ?= $(TAP) else - USEMODULE += stdio_ethos - ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) TERMDEPS += ethos diff --git a/tests/gnrc_rpl_srh/Makefile.board.dep b/tests/gnrc_rpl_srh/Makefile.board.dep new file mode 100644 index 0000000000..b595b8605c --- /dev/null +++ b/tests/gnrc_rpl_srh/Makefile.board.dep @@ -0,0 +1,6 @@ +# Put board specific dependencies here +ifeq (native,$(BOARD)) + USEMODULE += netdev_tap +else + USEMODULE += stdio_ethos +endif From b58c5afb2cc219d492a3d66dc0d6a87f8be613aa Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 18 Nov 2019 15:56:00 +0100 Subject: [PATCH 5/7] tests/gnrc_tcp: move board specific deps in Makefile.board.dep --- tests/gnrc_tcp/Makefile | 2 -- tests/gnrc_tcp/Makefile.board.dep | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 tests/gnrc_tcp/Makefile.board.dep diff --git a/tests/gnrc_tcp/Makefile b/tests/gnrc_tcp/Makefile index ea2f5faefd..f4302e148f 100644 --- a/tests/gnrc_tcp/Makefile +++ b/tests/gnrc_tcp/Makefile @@ -20,10 +20,8 @@ CFLAGS += -DGNRC_TCP_MSL=$(MSL_US) CFLAGS += -DGNRC_TCP_CONNECTION_TIMEOUT_DURATION=$(TIMEOUT_US) ifeq (native,$(BOARD)) - USEMODULE += netdev_tap TERMFLAGS ?= $(TAP) else - USEMODULE += stdio_ethos ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) TERMDEPS += ethos diff --git a/tests/gnrc_tcp/Makefile.board.dep b/tests/gnrc_tcp/Makefile.board.dep new file mode 100644 index 0000000000..b595b8605c --- /dev/null +++ b/tests/gnrc_tcp/Makefile.board.dep @@ -0,0 +1,6 @@ +# Put board specific dependencies here +ifeq (native,$(BOARD)) + USEMODULE += netdev_tap +else + USEMODULE += stdio_ethos +endif From b7a786394fb5b21d5cf3fb5b682cee303f65e172 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 18 Nov 2019 15:57:31 +0100 Subject: [PATCH 6/7] tests/gnrc_sock_dns: move board specific deps in Makefile.board.dep --- tests/gnrc_sock_dns/Makefile | 4 ---- tests/gnrc_sock_dns/Makefile.board.dep | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 tests/gnrc_sock_dns/Makefile.board.dep diff --git a/tests/gnrc_sock_dns/Makefile b/tests/gnrc_sock_dns/Makefile index ef2d5bf380..5b4de44aa5 100644 --- a/tests/gnrc_sock_dns/Makefile +++ b/tests/gnrc_sock_dns/Makefile @@ -13,12 +13,8 @@ USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_ipv6_nib_dns # use Ethernet as link-layer protocol ifeq (native,$(BOARD)) - USEMODULE += netdev_tap - TERMFLAGS ?= $(TAP) else - USEMODULE += stdio_ethos - ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) TERMDEPS += ethos diff --git a/tests/gnrc_sock_dns/Makefile.board.dep b/tests/gnrc_sock_dns/Makefile.board.dep new file mode 100644 index 0000000000..b595b8605c --- /dev/null +++ b/tests/gnrc_sock_dns/Makefile.board.dep @@ -0,0 +1,6 @@ +# Put board specific dependencies here +ifeq (native,$(BOARD)) + USEMODULE += netdev_tap +else + USEMODULE += stdio_ethos +endif From 6d5f64bd147af290680e93c014054a01cbf12ea6 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 6 Dec 2019 16:30:43 +0100 Subject: [PATCH 7/7] examples/gnrc_border_router: move board deps in Makefile.board.dep --- examples/gnrc_border_router/Makefile | 6 +----- examples/gnrc_border_router/Makefile.board.dep | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 examples/gnrc_border_router/Makefile.board.dep diff --git a/examples/gnrc_border_router/Makefile b/examples/gnrc_border_router/Makefile index 28b1f0fa94..30fdec09ef 100644 --- a/examples/gnrc_border_router/Makefile +++ b/examples/gnrc_border_router/Makefile @@ -13,17 +13,13 @@ BOARD_BLACKLIST += pic32-wifire pic32-clicker ruuvitag thingy52 # use ethos (ethernet over serial) for network communication and stdio over # UART, but not on native, as native has a tap interface towards the host. ifeq (,$(filter native,$(BOARD))) - GNRC_NETIF_NUMOF := 2 - USEMODULE += stdio_ethos - # ethos baudrate can be configured from make command ETHOS_BAUDRATE ?= 115200 CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE) else - GNRC_NETIF_NUMOF := 2 TERMFLAGS += -z [::1]:17754 - USEMODULE += socket_zep endif +GNRC_NETIF_NUMOF := 2 # SLIP legacy compatibility # Uncomment the lines below if you want to use SLIP with this example and don't diff --git a/examples/gnrc_border_router/Makefile.board.dep b/examples/gnrc_border_router/Makefile.board.dep new file mode 100644 index 0000000000..56cdaf5ed9 --- /dev/null +++ b/examples/gnrc_border_router/Makefile.board.dep @@ -0,0 +1,6 @@ +# Put board specific dependencies here +ifeq (,$(filter native,$(BOARD))) + USEMODULE += stdio_ethos +else + USEMODULE += socket_zep +endif