diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-31 18:13:48 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-08-31 18:13:48 +0000 |
commit | fdf6ef9660ec53a41981aec44737270306c69d9f (patch) | |
tree | 6a835c96800c210569a77b7cae7d1ac9bee8e66a | |
parent | 6dba533662fab3334be62bdba8b0d504cc83a5dd (diff) |
2001-08-30 Joel Sherrill <joel@OARcorp.com>
* README, networkconfig.h, netdemo/README, tftpTest/test.c: Merged
missing stuff from 4.5 branch.
* http/Makefile, http/init.c: Minor modifications to improve
buildability.
* networkconfig.h: Use bootp_host for tftp tests.
* netdemo/init.c: Configure more file descriptors.
* tftpTest/init.c: Configure more file descriptors and full IMFS.
-rw-r--r-- | http/Makefile | 5 | ||||
-rw-r--r-- | http/init.c | 15 | ||||
-rw-r--r-- | netdemo/init.c | 1 | ||||
-rw-r--r-- | networkconfig.h | 5 | ||||
-rw-r--r-- | tftpTest/init.c | 5 |
5 files changed, 28 insertions, 3 deletions
diff --git a/http/Makefile b/http/Makefile index cb05daf..2343b60 100644 --- a/http/Makefile +++ b/http/Makefile @@ -41,6 +41,7 @@ CFLAGS_DEBUG_V += -v -qrtems_debug LD_PATHS += LD_LIBS += +NATIVE_OBJ = $(shell $(OBJCOPY) 2>&1 | grep copy: | cut -d':' -f3 | cut -d' ' -f2) # # Add your list of files to delete here. The config files @@ -55,9 +56,9 @@ CLOBBER_ADDITIONS += all: ${ARCH} $(SRCS) $(PGM) ${PGM}: $(OBJS) $(LINK_FILES) - cd rootfs ; tar cf ../$(ARCH)/tarfile web etc + cd rootfs ; tar cf ../$(ARCH)/tarfile web etc cp $(ARCH)/tarfile . - $(OBJCOPY) -I binary -O elf32-powerpc tarfile $(ARCH)/tarfile.o + $(OBJCOPY) -I binary -O $(NATIVE_OBJ) tarfile $(ARCH)/tarfile.o $(LD) -r -o $(ARCH)/temp.o $(ARCH)/init.o $(ARCH)/tarfile.o $(MV) $(ARCH)/temp.o $(ARCH)/init.o $(RM) $(ARCH)/temp.o diff --git a/http/init.c b/http/init.c index eea4873..f01f8fc 100644 --- a/http/init.c +++ b/http/init.c @@ -5,6 +5,7 @@ * Don't forget to change the IP addresses */ +#define USE_HTTPD #define TEST_INIT #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER @@ -57,6 +58,8 @@ * built optimized or debug. */ +#if defined(USE_FTPD) +/* #if defined(RTEMS_DEBUG) extern int _binary_o_debug_tarfile_start; extern int _binary_o_debug_tarfile_size; @@ -68,13 +71,21 @@ extern int _binary_o_optimize_tarfile_size; #define TARFILE_START _binary_o_optimize_tarfile_start #define TARFILE_SIZE _binary_o_optimize_tarfile_size #endif +*/ +extern int _binary_tarfile_start; +extern int _binary_tarfile_size; +#define TARFILE_START _binary_tarfile_start +#define TARFILE_SIZE _binary_tarfile_size +#endif +#if defined(USE_FTPD) struct rtems_ftpd_configuration rtems_ftpd_configuration = { 10, /* FTPD task priority */ 1024, /* Maximum buffersize for hooks */ 21, /* Well-known port */ NULL /* List of hooks */ }; +#endif rtems_task Init( rtems_task_argument argument ) @@ -86,11 +97,15 @@ rtems_task Init( /* init_paging(); */ rtems_bsdnet_initialize_network (); +#if defined(USE_FTPD) rtems_initialize_ftpd(); status = Untar_FromMemory((unsigned char *)(&TARFILE_START), &TARFILE_SIZE); +#endif +#if defined(USE_HTTPD) rtems_initialize_webserver(); +#endif status = rtems_task_delete( RTEMS_SELF ); } diff --git a/netdemo/init.c b/netdemo/init.c index a3aca24..0ce4252 100644 --- a/netdemo/init.c +++ b/netdemo/init.c @@ -17,6 +17,7 @@ #include <bsp.h> +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER #define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/networkconfig.h b/networkconfig.h index bf6ce17..23c0668 100644 --- a/networkconfig.h +++ b/networkconfig.h @@ -135,7 +135,10 @@ struct rtems_bsdnet_config rtems_bsdnet_config = { /* * For TFTP test application */ -#if (!defined (RTEMS_USE_BOOTP)) +#if (defined (RTEMS_USE_BOOTP)) +#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST" +#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE" +#else #define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ" #define RTEMS_TFTP_TEST_FILE_NAME "tftptest" #endif diff --git a/tftpTest/init.c b/tftpTest/init.c index 5356a03..134f217 100644 --- a/tftpTest/init.c +++ b/tftpTest/init.c @@ -18,6 +18,9 @@ #include <bsp.h> #include <rtems/tftp.h> +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER #define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER #define CONFIGURE_RTEMS_INIT_TASKS_TABLE @@ -46,6 +49,8 @@ rtems_task Init (rtems_task_argument argument); #include <arpa/inet.h> #include "../networkconfig.h" +void testTFTP (const char *hostname, const char *filename); + /* * RTEMS Startup Task */ |