[PATCH v2] config.inc: Remove unused values.

Chris Johns chrisj at rtems.org
Tue Mar 20 20:04:52 UTC 2018


On 20/3/18 9:21 pm, Christian Mauderer wrote:
> ---
>  config.inc       | 11 -----------
>  libbsd.txt       | 20 +++++---------------
>  libbsd_waf.py    |  3 ---
>  waf_generator.py |  3 ---
>  4 files changed, 5 insertions(+), 32 deletions(-)
> 
> diff --git a/config.inc b/config.inc
> index 3432a5fc..6727a3d3 100644
> --- a/config.inc
> +++ b/config.inc
> @@ -1,15 +1,4 @@
> -# Mandatory: Select your BSP and installation prefix
> -TARGET = arm-rtems4.11
> -BSP = realview_pbx_a9_qemu
> -PREFIX = /opt/rtems-4.11
> -
> -# Optional: Separate installation base directory
> -INSTALL_BASE = $(PREFIX)/$(TARGET)/$(BSP)
> -
> -# Optional: Network test configuration
> -TEST_RUNNER = $(BSP)
>  NET_CFG_SELF_IP = 10.0.2.1
>  NET_CFG_NETMASK = 255.255.0.0
>  NET_CFG_PEER_IP = 192.168.100.11
>  NET_CFG_GATEWAY_IP = 192.168.100.11
> -NET_TAP_INTERFACE = tap0
> diff --git a/libbsd.txt b/libbsd.txt
> index 71d5cc8d..b0b59504 100644
> --- a/libbsd.txt
> +++ b/libbsd.txt
> @@ -42,7 +42,8 @@ installed.
>  
>  . Clone the Git repository +git clone git://git.rtems.org/rtems-libbsd.git+.
>  . Change into the RTEMS BSD library root directory.
> -. Edit the `config.inc` configuration file and adjust it to your environment.
> +. If you want to run tests with a custom IP configuration instead of the default
> +  one you can adjust the `config.inc` configuration file.
>  . Run +waf configure ...+.
>  . Run +waf+.
>  . Run +waf install+.
> @@ -119,27 +120,16 @@ devices (you can run multiple test instances on one virtual network).
>  The build system based on the Waf build system. To build with Waf please refer
>  to the README.waf file.
>  
> -===== Example Configuration =====
> +===== Example Configuration for Network Tests =====
>  
> -In the BSD library source directory edit the file `config.inc`.  Continuing on
> -the above, the `config.inc` used to match the above is:
> +If you need some other IP configuration for some of the network tests you can
> +edit the file `config.inc`:
>  

Ah ok, this may explain the disconnect between us with this change, there is an
option to provide an external version of the file, see `waf --help`. This means
you do not need to touch the source tree.

What about changing the last line to:

 +If you need some other IP configuration for some of the network tests copy
 +`config.inc` to a location outside to the source tree and change then
 +use the option `--net-test-config=NET_CONFIG` to pass the file to waf's
 +configure command.

Chris

>  -------------------------------------------------------------------------------
> -# Mandatory: Select your BSP and installation prefix
> -TARGET = arm-rtems4.12
> -BSP = xilinx_zynq_a9_qemu
> -PREFIX = $(HOME)/sandbox/install
> -
> -# Optional: Separate installation base directory
> -INSTALL_BASE = $(PREFIX)/$(TARGET)/$(BSP)
> -
> -# Optional: Network test configuration
> -TEST_RUNNER = $(BSP)
>  NET_CFG_SELF_IP = 10.0.0.2
>  NET_CFG_NETMASK = 255.255.0.0
>  NET_CFG_PEER_IP = 10.0.0.1
>  NET_CFG_GATEWAY_IP = 10.0.0.1
> -NET_TAP_INTERFACE = tap0
>  -------------------------------------------------------------------------------
>  
>  === BSD Library Initialization ===
> diff --git a/libbsd_waf.py b/libbsd_waf.py
> index 745512bf..65f5ae0f 100644
> --- a/libbsd_waf.py
> +++ b/libbsd_waf.py
> @@ -98,7 +98,6 @@ def build(bld):
>      net_cfg_netmask = None
>      net_cfg_peer_ip = None
>      net_cfg_gateway_ip = None
> -    net_tap_interface = None
>      try:
>          net_cfg_lines = open(bld.env.NET_CONFIG).readlines()
>      except:
> @@ -120,8 +119,6 @@ def build(bld):
>                  net_cfg_peer_ip = rhs
>              if lhs == "NET_CFG_GATEWAY_IP":
>                  net_cfg_gateway_ip = rhs
> -            if lhs == "NET_TAP_INTERFACE":
> -                net_tap_interface = rhs
>      bld(target = "testsuite/include/rtems/bsd/test/network-config.h",
>          source = "testsuite/include/rtems/bsd/test/network-config.h.in",
>          rule = "sed -e 's/@NET_CFG_SELF_IP@/%s/' -e 's/@NET_CFG_NETMASK@/%s/' -e 's/@NET_CFG_PEER_IP@/%s/' -e 's/@NET_CFG_GATEWAY_IP@/%s/' < ${SRC} > ${TGT}" % (net_cfg_self_ip, net_cfg_netmask, net_cfg_peer_ip, net_cfg_gateway_ip),
> diff --git a/waf_generator.py b/waf_generator.py
> index 73b02a83..70b0c307 100755
> --- a/waf_generator.py
> +++ b/waf_generator.py
> @@ -416,7 +416,6 @@ class ModuleManager(builder.ModuleManager):
>          self.add('    net_cfg_netmask = None')
>          self.add('    net_cfg_peer_ip = None')
>          self.add('    net_cfg_gateway_ip = None')
> -        self.add('    net_tap_interface = None')
>          self.add('    try:')
>          self.add('        net_cfg_lines = open(bld.env.NET_CONFIG).readlines()')
>          self.add('    except:')
> @@ -439,8 +438,6 @@ class ModuleManager(builder.ModuleManager):
>          self.add('                net_cfg_peer_ip = rhs')
>          self.add('            if lhs == "NET_CFG_GATEWAY_IP":')
>          self.add('                net_cfg_gateway_ip = rhs')
> -        self.add('            if lhs == "NET_TAP_INTERFACE":')
> -        self.add('                net_tap_interface = rhs')
>          self.add('    bld(target = "testsuite/include/rtems/bsd/test/network-config.h",')
>          self.add('        source = "testsuite/include/rtems/bsd/test/network-config.h.in",')
>          self.add('        rule = "sed -e \'s/@NET_CFG_SELF_IP@/%s/\' ' + \
> 



More information about the devel mailing list