[PATCH] config: Control the interface from the command line net config file.

chrisj at rtems.org chrisj at rtems.org
Wed Jun 12 07:21:18 UTC 2019


From: Chris Johns <chrisj at rtems.org>

---
 config.inc                                           | 1 +
 testsuite/include/rtems/bsd/test/network-config.h.in | 2 +-
 waf_libbsd.py                                        | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config.inc b/config.inc
index 6727a3d3..f69983b5 100644
--- a/config.inc
+++ b/config.inc
@@ -1,3 +1,4 @@
+NET_CFG_INTERFACE_0 = lo0
 NET_CFG_SELF_IP = 10.0.2.1
 NET_CFG_NETMASK = 255.255.0.0
 NET_CFG_PEER_IP = 192.168.100.11
diff --git a/testsuite/include/rtems/bsd/test/network-config.h.in b/testsuite/include/rtems/bsd/test/network-config.h.in
index 0b1e0aa3..39bb5388 100755
--- a/testsuite/include/rtems/bsd/test/network-config.h.in
+++ b/testsuite/include/rtems/bsd/test/network-config.h.in
@@ -53,7 +53,7 @@
 #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
   #define NET_CFG_INTERFACE_0 "if_atsam0"
 #else
-  #define NET_CFG_INTERFACE_0 "lo0"
+  #define NET_CFG_INTERFACE_0 "@NET_CFG_INTERFACE_0@"
 #endif
 
 #define NET_CFG_SELF_IP "@NET_CFG_SELF_IP@"
diff --git a/waf_libbsd.py b/waf_libbsd.py
index 9445d629..46237c21 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -218,7 +218,8 @@ class Builder(builder.ModuleManager):
         #
         if not os.path.exists(bld.env.NET_CONFIG):
             bld.fatal('network configuraiton \'%s\' not found' % (bld.env.NET_CONFIG))
-        tags = [ 'NET_CFG_SELF_IP',
+        tags = [ 'NET_CFG_INTERFACE_0',
+                 'NET_CFG_SELF_IP',
                  'NET_CFG_NETMASK',
                  'NET_CFG_PEER_IP',
                  'NET_CFG_GATEWAY_IP' ]
-- 
2.20.1 (Apple Git-117)



More information about the devel mailing list