[PATCH 1/5] Required changes to get back to a buildable state.

Joel Sherrill joel at rtems.org
Fri May 21 19:15:58 UTC 2021


From: Jennifer Averett <jennifer.averett at oarcorp.com>

This primarily reflects changes since the legacy network stack was
split into its own repository.
---
 Makefile               |  3 ++-
 dnstest/Makefile       |  2 +-
 http/Makefile          |  2 +-
 mcast/Makefile         |  4 ++--
 netdemo/Makefile       |  4 ++--
 nfsClientTest/Makefile |  1 +
 ntp/Makefile           |  2 +-
 ntp/init.c             |  6 +++---
 rpc_demo/Makefile      |  2 +-
 select/Makefile        |  2 +-
 telnetd/Makefile       |  3 ++-
 telnetd/init.c         |  3 ++-
 tftpTest/Makefile      |  3 ++-
 tftpTest/test.c        | 10 +++++-----
 ttcp/Makefile          |  2 +-
 ttcp/rtems_ttcp.c      |  3 ++-
 16 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/Makefile b/Makefile
index bdbd174..dfb4b94 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,8 @@
 
 include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
 
-SUBDIRS= netdemo http dnstest ntp select tftpTest ttcp mcast telnetd
+#SUBDIRS= netdemo http dnstest ntp select tftpTest ttcp mcast telnetd
+SUBDIRS= netdemo dnstest ntp select tftpTest ttcp mcast telnetd
 
 # This requires something that is optional and we need to test for it
 #SUBDIRS+= rpc_demo
diff --git a/dnstest/Makefile b/dnstest/Makefile
index d1fbfda..a9de248 100644
--- a/dnstest/Makefile
+++ b/dnstest/Makefile
@@ -36,7 +36,7 @@ CFLAGS_OPTIMIZE_V   +=
 CFLAGS_DEBUG_V   += -v -qrtems_debug
 
 LD_PATHS  +=
-LD_LIBS   +=
+LD_LIBS   += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
diff --git a/http/Makefile b/http/Makefile
index b253681..973c151 100644
--- a/http/Makefile
+++ b/http/Makefile
@@ -88,7 +88,7 @@ FilesystemImage: $(ARCH) stamp-index-html \
 	    tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
 
 FilesystemImage.c: $(ARCH) FilesystemImage
-	$(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
+	rtems-bin2c FilesystemImage FilesystemImage
 
 rootfs/index.html: shttpd_index.html goahead_index.html mongoose_index.html
 ifeq ($(USE_SIMPLE),yes)
diff --git a/mcast/Makefile b/mcast/Makefile
index cdb551e..63c73e4 100644
--- a/mcast/Makefile
+++ b/mcast/Makefile
@@ -27,7 +27,7 @@ CFLAGS_OPTIMIZE_V   +=
 ## CFLAGS_DEBUG_V   += -v -qrtems_debug
 
 LD_PATHS  +=
-LD_LIBS   +=
+LD_LIBS   += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
@@ -62,7 +62,7 @@ FilesystemImage: rootfs/etc/host.conf rootfs/etc/hosts
 	cd rootfs ; tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
 
 FilesystemImage.c: FilesystemImage
-	$(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
+	rtems-bin2c FilesystemImage FilesystemImage
 
 ${PGM}: $(OBJS) $(LINK_FILES)
 	$(make-exe)
diff --git a/netdemo/Makefile b/netdemo/Makefile
index c1102c7..94b1be8 100644
--- a/netdemo/Makefile
+++ b/netdemo/Makefile
@@ -31,13 +31,13 @@ include $(PROJECT_ROOT)/make/leaf.cfg
 override DEFINES  +=
 CPPFLAGS +=
 CFLAGS   +=
-CFLAGS_LD += 
+CFLAGS_LD +=
 # CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000 
 CFLAGS_OPTIMIZE_V   +=
 CFLAGS_DEBUG_V   += -v -qrtems_debug
 
 LD_PATHS  +=
-LD_LIBS   +=
+LD_LIBS   += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
diff --git a/nfsClientTest/Makefile b/nfsClientTest/Makefile
index b84d0b3..a651402 100644
--- a/nfsClientTest/Makefile
+++ b/nfsClientTest/Makefile
@@ -38,6 +38,7 @@ LD_PATHS  +=
 
 CFLAGS   += 
 LD_LIBS  += -lnfs
+LD_LIBS  += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
diff --git a/ntp/Makefile b/ntp/Makefile
index 8b3cd57..6ae079d 100644
--- a/ntp/Makefile
+++ b/ntp/Makefile
@@ -36,7 +36,7 @@ CFLAGS_OPTIMIZE_V   +=
 CFLAGS_DEBUG_V   += -v -qrtems_debug
 
 LD_PATHS  +=
-LD_LIBS   +=
+LD_LIBS   += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
diff --git a/ntp/init.c b/ntp/init.c
index 58b9435..b680c18 100644
--- a/ntp/init.c
+++ b/ntp/init.c
@@ -33,15 +33,15 @@ Init (rtems_task_argument ignored)
 	int rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority);
 
 	printf ("****************** NTP TEST ***************\n");
-	rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
-	sc = rtems_clock_get (RTEMS_CLOCK_GET_TOD, &now);
+        ticksPerSecond = rtems_clock_get_ticks_per_second();
+	sc = rtems_clock_get_tod (&now);
 	if (sc == RTEMS_SUCCESSFUL)
 		printf ("Got time of day -- should have failed!\n");
 	else if (sc != RTEMS_NOT_DEFINED)
 		printf ("Failed to get time of day: %s\n", rtems_status_text (sc));
 	rtems_bsdnet_initialize_network ();
 	rtems_bsdnet_synchronize_ntp (0, 0);
-	sc = rtems_clock_get (RTEMS_CLOCK_GET_TOD, &now);
+	sc = rtems_clock_get_tod (&now);
 	if (sc != RTEMS_SUCCESSFUL)
 		printf ("Failed to get time of day: %s\n", rtems_status_text (sc));
 	printf (
diff --git a/rpc_demo/Makefile b/rpc_demo/Makefile
index 2c6c462..f03b673 100644
--- a/rpc_demo/Makefile
+++ b/rpc_demo/Makefile
@@ -51,7 +51,7 @@ DEFINES  += -Dmain=rtems_main
 CFLAGS   +=
 CFLAGS_OPTIMIZE_V   +=
 
-LD_PATHS  +=
+LD_PATHS  +=  -lnetworking
 #LD_LIBS   += ../ftp.FreeBSD.org/pub/FreeBSD/branches/-current/src/lib/libc/rpc/o-optimize/librpc.a
 #LD_LIBS   += ../ftp.FreeBSD.org/pub/FreeBSD/branches/-current/src/lib/libc/xdr/o-optimize/libxdr.a
 
diff --git a/select/Makefile b/select/Makefile
index 79b398d..4914555 100644
--- a/select/Makefile
+++ b/select/Makefile
@@ -36,7 +36,7 @@ CFLAGS_OPTIMIZE_V   +=
 CFLAGS_DEBUG_V   += -v -qrtems_debug
 
 LD_PATHS  +=
-LD_LIBS   +=
+LD_LIBS   += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
diff --git a/telnetd/Makefile b/telnetd/Makefile
index e7ef1db..b4b65fd 100644
--- a/telnetd/Makefile
+++ b/telnetd/Makefile
@@ -32,7 +32,8 @@ CFLAGS_OPTIMIZE_V   +=
 CFLAGS_DEBUG_V   += -v -qrtems_debug
 
 LD_PATHS +=
-override LD_LIBS  += -ltelnetd
+LD_LIBS  += -ltelnetd
+LD_LIBS   += -lnetworking
 
 CFLAGS   += 
 
diff --git a/telnetd/init.c b/telnetd/init.c
index 4637942..a4597b0 100644
--- a/telnetd/init.c
+++ b/telnetd/init.c
@@ -172,8 +172,9 @@ rtems_task Init(
   #if defined(REMAIN_ON_CONSOLE)
     remain_on_console = true;
   #endif
-
+#if 0
   rtems_global_shell_env.login_check = rtems_shell_login_check;
+#endif
   rtems_telnetd_config.keep_stdio = remain_on_console;
   
   rtems_telnetd_initialize();
diff --git a/tftpTest/Makefile b/tftpTest/Makefile
index aca93b4..f847297 100644
--- a/tftpTest/Makefile
+++ b/tftpTest/Makefile
@@ -37,7 +37,8 @@ CFLAGS_DEBUG_V   += -qrtems_debug # -v
 
 
 LD_PATHS  +=
-LD_LIBS   +=
+LD_LIBS   += -ltftpfs
+LD_LIBS   += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
diff --git a/tftpTest/test.c b/tftpTest/test.c
index 0705ae9..f19a918 100644
--- a/tftpTest/test.c
+++ b/tftpTest/test.c
@@ -35,7 +35,7 @@ showRate (unsigned long totalRead)
 	elapsed = now - then;
 	if (elapsed) {
 		rtems_interval ticksPerSecond;
-		rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
+		ticksPerSecond = rtems_clock_get_ticks_per_second();
 		printf (" (%ld bytes/sec)",
 				(long)(((long long)totalRead * ticksPerSecond)
 								/ elapsed));
@@ -56,7 +56,7 @@ testRawRead (void)
 		return;
 	}
 
-	rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
+	then = rtems_clock_get_ticks_since_boot();
 	for (;;) {
 		nread = read (fd, cbuf, sizeof cbuf);
 		if (nread < 0) {
@@ -68,7 +68,7 @@ testRawRead (void)
 			break;
 		totalRead += nread;
 	}
-	rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+	now = rtems_clock_get_ticks_since_boot();
 	close (fd);
 	showRate (totalRead);
 }
@@ -86,7 +86,7 @@ testFread (void)
 		return;
 	}
 
-	rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
+	then = rtems_clock_get_ticks_since_boot();
 	for (;;) {
 		nread = fread (cbuf, sizeof cbuf[0], sizeof cbuf, fp);
 		if (nread < 0) {
@@ -98,7 +98,7 @@ testFread (void)
 			break;
 		totalRead += nread;
 	}
-	rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+	now = rtems_clock_get_ticks_since_boot();
 	fclose (fp);
 	showRate (totalRead);
 }
diff --git a/ttcp/Makefile b/ttcp/Makefile
index 1866d1e..449beee 100644
--- a/ttcp/Makefile
+++ b/ttcp/Makefile
@@ -36,7 +36,7 @@ CFLAGS_OPTIMIZE_V   +=
 CFLAGS_DEBUG_V   += -v -qrtems_debug
 
 LD_PATHS  +=
-LD_LIBS   +=
+LD_LIBS   += -lnetworking
 
 #
 # Add your list of files to delete here.  The config files
diff --git a/ttcp/rtems_ttcp.c b/ttcp/rtems_ttcp.c
index 3889151..75b10ff 100644
--- a/ttcp/rtems_ttcp.c
+++ b/ttcp/rtems_ttcp.c
@@ -37,13 +37,14 @@
  * Glue between UNIX-style ttcp code and RTEMS
  */
 int rtems_ttcp_main (int argc, char **argv);
-
+#if 0
 static int
 select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
 {
   rtems_panic ("select()");
   return 0;
 }
+#endif
 
 #define _SYS_RESOURCE_H_
 #define	RUSAGE_SELF	0		/* calling process */
-- 
1.8.3.1



More information about the devel mailing list