[rtems-testing commit] rtems/bit_rtems: Add support for building new TCP/ IP

Joel Sherrill joel at rtems.org
Thu Nov 9 23:14:52 UTC 2017


Module:    rtems-testing
Branch:    master
Commit:    5320d75499558133d8d77f63c647964be4e37c2e
Changeset: http://git.rtems.org/rtems-testing/commit/?id=5320d75499558133d8d77f63c647964be4e37c2e

Author:    Joel Sherrill <joel at rtems.org>
Date:      Thu Nov  9 15:19:36 2017 -0600

rtems/bit_rtems: Add support for building new TCP/IP

---

 rtems/bit_rtems | 95 ++++++++++++++++++++++++++++++++++++---------------------
 rtems/user.cfg  |  7 +++--
 2 files changed, 65 insertions(+), 37 deletions(-)

diff --git a/rtems/bit_rtems b/rtems/bit_rtems
index 9cf039b..4131d76 100755
--- a/rtems/bit_rtems
+++ b/rtems/bit_rtems
@@ -263,14 +263,26 @@ if [ ${ENABLE_BSP_DIRTY_MEMORY} = yes ] ; then
  ENABLE_BSP="${ENABLE_BSP} BSP_DIRTY_MEMORY=1"
 fi
 
-if [ ${ENABLE_RTEMS_TCPIP} = yes ] ; then
-  case ${CPU} in
-    avr) TCPIP_FLAG="--disable-networking" ;;
-    *)   TCPIP_FLAG="--enable-networking" ;;
-  esac
-else
-  TCPIP_FLAG="--disable-networking"
-fi
+case ${ENABLE_RTEMS_TCPIP} in
+  yes)
+    case ${CPU} in
+      avr) TCPIP_FLAG="--disable-networking" ;;
+      *)   TCPIP_FLAG="--enable-networking" ;;
+    esac
+    ;;
+  no)
+    TCPIP_FLAG="--disable-networking"
+    ;;
+  new)
+    type waf >/dev/null 2>&1
+     check_fatal $? "waf is not in your PATH"
+
+    TCPIP_FLAG="--disable-networking"
+    if [ ${do_install} = "no" ] ; then
+      do_install="yes"
+    fi
+    ;;
+esac
 
 #    --disable-rtems-inlines
 if [ x${DISABLE_INLINES} = xyes ] ; then
@@ -335,9 +347,10 @@ if [ ${ENABLE_RTEMS_CXX} = yes ] ; then
        ENABLE_RTEMS_CXX="--disable-cxx" ;;
     #or1k)          # RTEMS PR XXX
     #   ENABLE_RTEMS_CXX="--disable-cxx" ;;
-    #avr|bfin|lm32|m32r|moxie|tic4x|v850)
     m32c)           # m32c does not have C++ support in GCC
        ENABLE_RTEMS_CXX="--disable-cxx" ;;
+    avr|bfin|m32r|tic4x)
+       ENABLE_RTEMS_CXX="--disable-cxx" ;;
     *) ENABLE_RTEMS_CXX="--enable-cxx" ;;
   esac
 else
@@ -434,12 +447,8 @@ case $CPU in
        if [ X${BSP_TO_TEST} = X ] ; then
 	 ${MAKE} RTEMS_BSP= ${MAKE_DEBUG_ARG} install
        else
-	 find ${INSTALL_POINT}/${target} -name "*.h" -o -name "*.a" | \
-	   while read f
-	   do
-	     rpm -qf $f >/dev/null 2>&1
-	     test $? -eq 1 && (echo $f ; rm -f $f)
-	   done
+	 rm -rf ${INSTALL_POINT}/${target}/${BSP_TO_TEST}
+         check_fatal $? "failed to clean BSP install point"
 
 	 ${MAKE} RTEMS_BSP=${BSP_TO_TEST} ${MAKE_DEBUG_ARG} install
        fi
@@ -604,26 +613,43 @@ if [ ${do_install} = yes -a ${doing_bare_bsp} = no ] ; then
     case ${BSP_TO_TEST} in
       posix|bare*) ;;
       *)
-        if [ -d ../examples-v2 ] ; then
-          SUITES="${SUITES} examples-v2"
-        else 
-          echo "WARNING! examples-v2 not found"
-        fi
-
-        if [ -d ../class-examples ] ; then
-          SUITES="${SUITES} class-examples"
-        else 
-          echo "WARNING! class-examples not found"
+        cd ..
+        if [ -d rtems-libbsd -a ${ENABLE_RTEMS_TCPIP} = "new" ] ; then
+          cd rtems-libbsd 
+          waf distclean
+          check_fatal $? "failed waf distclean - rtems-libbsd on ${BSP_TO_TEST}"
+
+          gcc=`type ${target}-gcc 2>&1 | cut -d' ' -f3`
+          tooldir=`echo ${gcc} | sed -e 's/\/bin.*$//'`
+          RTEMS_MAKEFILE_PATH=${INSTALL_POINT}/${target}/${BSP_TO_TEST} \
+          waf configure \
+            --rtems=${INSTALL_POINT} \
+            --rtems-tools=${tooldir} \
+            --rtems-bsps=${CPU}/${BSP_TO_TEST} \
+            --prefix=${INSTALL_POINT}
+          check_fatal $? "failed waf configure - rtems-libbsd on ${BSP_TO_TEST}"
+ 
+          waf 
+          check_fatal $? "failed waf - rtems-libbsd on ${BSP_TO_TEST}"
+ 
+          waf install
+          check_fatal $? "failed waf install - rtems-libbsd on ${BSP_TO_TEST}"
+          cd ..
         fi
 
-        if [ -d ../examples ] ; then
-          SUITES="${SUITES} examples"
-        else 
-          echo "WARNING! examples not found"
-        fi
+        # Other repositories
+        SUITES=""
+        for suite in examples-v2 class-examples examples
+        do
+	  if [ -d ${suite} ] ; then
+	    SUITES="${SUITES} ${suite}"
+	  else 
+	    echo "WARNING! ${suite} not found"
+	  fi
+        done 
 
         if [ ${ENABLE_RTEMS_TCPIP} = yes ] ; then
-          if [ -d ../network-demos ] ; then
+          if [ -d network-demos ] ; then
             SUITES="${SUITES} network-demos"
           fi
         fi
@@ -631,7 +657,6 @@ if [ ${do_install} = yes -a ${doing_bare_bsp} = no ] ; then
         # Build application level tests that use "make"
         for suite in ${SUITES}
         do
-          cd ..
           cd ${suite}
           check_fatal $? "failed cd to ${suite}."
 
@@ -646,14 +671,16 @@ if [ ${do_install} = yes -a ${doing_bare_bsp} = no ] ; then
           RTEMS_MAKEFILE_PATH=${INSTALL_POINT}/${target}/${BSP_TO_TEST} \
              ${MAKE} ${MAKE_DEBUG_ARG} clean
           check_fatal $? "failed clean ${suite} on ${BSP_TO_TEST}."
+
+          cd ..
         done
 
         # Build TCP/IP demos and addons
         if [ ${ENABLE_RTEMS_POSIX} = yes -a  \
              ${ENABLE_RTEMS_TCPIP} = yes -a \
-             -d ../rtems-addon-packages ] ; then
+             -d rtems-addon-packages ] ; then
 
-          cd ../rtems-addon-packages
+          cd rtems-addon-packages
           check_fatal $? "failed cd to rtems-addon-packages."
 
           RTEMS_MAKEFILE_PATH=${INSTALL_POINT}/${target}/${BSP_TO_TEST} \
diff --git a/rtems/user.cfg b/rtems/user.cfg
index 565bda7..d726a95 100644
--- a/rtems/user.cfg
+++ b/rtems/user.cfg
@@ -18,7 +18,8 @@
 INSTALL_POINT=/home/joel/rtems-work/bsp-install/
 
 #RTEMS_VERSION=4.11
-RTEMS_VERSION=4.12
+# RTEMS_VERSION=4.12
+RTEMS_VERSION=5
 #RTEMS_VERSION=4.10
 
 #
@@ -39,7 +40,8 @@ ENABLE_RTEMS_POSIX=yes
 # Set this to yes if you want to build the TCP/IP stack and 
 # associated clients and servers.  This is automatically disabled
 # for BSPs that have no networking support.
-ENABLE_RTEMS_TCPIP=no
+# Values: yes, no, or new
+ENABLE_RTEMS_TCPIP=yes
 
 # Set this to yes if you want to enable the RTEMS uITRON 3.0 API
 # implementation.  This API is not completely implemented and 
@@ -63,7 +65,6 @@ ENABLE_KEEP_BUILDING=yes
 # Set this to yes if you want to build the full set of RTEMS
 # #tests appropriate for your configuration.  Or set it to
 # samples if you just want the samples
-# ENABLE_RTEMS_TESTS=no
 # ENABLE_RTEMS_TESTS=samples
 ENABLE_RTEMS_TESTS=yes
 



More information about the vc mailing list