From 516c69cb5fd3c31cdc8e506ece94bdde943054d6 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 12 Aug 2020 13:34:03 +0200 Subject: [PATCH] boards/native: allow to use ZEP instead of tap If `native` is compiled with `USEMODULE=socket_zep` and networking, don't also include `netdev_tap` automatically. This mirrors the behavior on nrf52 and esp* where the default netdev can be 'overwritten' by another option. --- boards/native/Makefile.dep | 4 +++- boards/native/Makefile.include | 2 +- examples/gnrc_border_router/Makefile.board.dep | 1 + tests/gnrc_dhcpv6_client_6lbr/Makefile.board.dep | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/boards/native/Makefile.dep b/boards/native/Makefile.dep index e1f2fac5a9..c3b41ab9c5 100644 --- a/boards/native/Makefile.dep +++ b/boards/native/Makefile.dep @@ -1,5 +1,7 @@ ifneq (,$(filter netdev_default,$(USEMODULE))) - USEMODULE += netdev_tap + ifeq (,$(filter socket_zep,$(USEMODULE))) + USEMODULE += netdev_tap + endif endif ifneq (,$(filter mtd,$(USEMODULE))) diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index ead6af8bdc..98de7a2fea 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -69,7 +69,7 @@ endif LINKFLAGS += -ffunction-sections # set the tap interface for term/valgrind -ifneq (,$(filter netdev_default,$(USEMODULE))) +ifneq (,$(filter netdev_tap,$(USEMODULE))) PORT ?= tap0 endif diff --git a/examples/gnrc_border_router/Makefile.board.dep b/examples/gnrc_border_router/Makefile.board.dep index ada0bf3938..12f755ceb4 100644 --- a/examples/gnrc_border_router/Makefile.board.dep +++ b/examples/gnrc_border_router/Makefile.board.dep @@ -13,6 +13,7 @@ ifeq (,$(filter native,$(BOARD))) endif endif else + USEMODULE += netdev_tap USEMODULE += socket_zep USEMODULE += socket_zep_hello endif diff --git a/tests/gnrc_dhcpv6_client_6lbr/Makefile.board.dep b/tests/gnrc_dhcpv6_client_6lbr/Makefile.board.dep index c20e0e5e31..d63fc3dc55 100644 --- a/tests/gnrc_dhcpv6_client_6lbr/Makefile.board.dep +++ b/tests/gnrc_dhcpv6_client_6lbr/Makefile.board.dep @@ -1,5 +1,6 @@ # Put board specific dependencies here ifeq (native,$(BOARD)) + USEMODULE += netdev_tap USEMODULE += socket_zep else USEMODULE += stdio_ethos