diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-12 16:44:57 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-07-12 16:44:57 +0000 |
commit | 6c58235acefb0fdd1aa55d16c35f615d1eee86d2 (patch) | |
tree | e698e4f47bb9de9593e789f34e3245fa4a5117e9 | |
parent | 969907a44de48894b0e438e17c813e0bad285224 (diff) |
Patch from Andrew Bythell <abythell@nortelnetworks.com> that should
allow the http demo to build a correct starting filesystem and
run. Formerly, the http demo did not configure the filesystem
as needed or build the tar file such that GoAhead could find it.
-rw-r--r-- | http/Makefile | 2 | ||||
-rw-r--r-- | http/index.html | 15 | ||||
-rw-r--r-- | http/init.c | 26 | ||||
-rw-r--r-- | http/rootfs/etc/host.conf | 1 | ||||
-rw-r--r-- | http/rootfs/etc/hosts | 2 | ||||
-rw-r--r-- | http/rootfs/web/index.html | 15 |
6 files changed, 39 insertions, 22 deletions
diff --git a/http/Makefile b/http/Makefile index 54e3f6e..cb05daf 100644 --- a/http/Makefile +++ b/http/Makefile @@ -55,7 +55,7 @@ CLOBBER_ADDITIONS += all: ${ARCH} $(SRCS) $(PGM) ${PGM}: $(OBJS) $(LINK_FILES) - tar cf $(ARCH)/tarfile index.html + cd rootfs ; tar cf ../$(ARCH)/tarfile web etc cp $(ARCH)/tarfile . $(OBJCOPY) -I binary -O elf32-powerpc tarfile $(ARCH)/tarfile.o $(LD) -r -o $(ARCH)/temp.o $(ARCH)/init.o $(ARCH)/tarfile.o diff --git a/http/index.html b/http/index.html deleted file mode 100644 index 15e5c9f..0000000 --- a/http/index.html +++ /dev/null @@ -1,15 +0,0 @@ -<HTML> -<HEAD><TITLE>RTEMS GoAhead Test Page</TITLE></HEAD> -<BODY BGCOLOR="FFFFFF"> -<A HREF="http://www.oarcorp.com" target="Text Frame"> - <IMG align=right BORDER=0 SRC="oaronly.jpg" ALT="OAR"> </A> -<H1>RTEMS GoAhead Test Page</H1> -<HR> -<BODY> - -<P>Congratulations, you have successfully loaded your first page -from the GoAhead Web Server running on RTEMS.</P> - -<HR> -Copyright © 1988-1999 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A> -</BODY></HTML> diff --git a/http/init.c b/http/init.c index d6008b8..eea4873 100644 --- a/http/init.c +++ b/http/init.c @@ -10,6 +10,8 @@ #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER #define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER #define CONFIGURE_RTEMS_INIT_TASKS_TABLE +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM #define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) #define CONFIGURE_MAXIMUM_SEMAPHORES 20 @@ -50,13 +52,27 @@ #define ARGUMENT 0 -extern int _binary_tarfile_start; -extern int _binary_tarfile_size; +/* + * The tarfile is built in $(ARCH) so includes whether we were + * built optimized or debug. + */ + +#if defined(RTEMS_DEBUG) +extern int _binary_o_debug_tarfile_start; +extern int _binary_o_debug_tarfile_size; +#define TARFILE_START _binary_o_debug_tarfile_start +#define TARFILE_SIZE _binary_o_debug_tarfile_size +#else +extern int _binary_o_optimize_tarfile_start; +extern int _binary_o_optimize_tarfile_size; +#define TARFILE_START _binary_o_optimize_tarfile_start +#define TARFILE_SIZE _binary_o_optimize_tarfile_size +#endif struct rtems_ftpd_configuration rtems_ftpd_configuration = { 10, /* FTPD task priority */ 1024, /* Maximum buffersize for hooks */ - 80, /* Well-known port */ + 21, /* Well-known port */ NULL /* List of hooks */ }; rtems_task Init( @@ -70,11 +86,9 @@ rtems_task Init( /* init_paging(); */ rtems_bsdnet_initialize_network (); - rtems_initialize_ftpd(); - status = Untar_FromMemory((unsigned char *)(&_binary_tarfile_start), - &_binary_tarfile_size); + status = Untar_FromMemory((unsigned char *)(&TARFILE_START), &TARFILE_SIZE); rtems_initialize_webserver(); diff --git a/http/rootfs/etc/host.conf b/http/rootfs/etc/host.conf index e69de29..0e9eeb1 100644 --- a/http/rootfs/etc/host.conf +++ b/http/rootfs/etc/host.conf @@ -0,0 +1 @@ +order hosts, bind diff --git a/http/rootfs/etc/hosts b/http/rootfs/etc/hosts index e69de29..0027f9d 100644 --- a/http/rootfs/etc/hosts +++ b/http/rootfs/etc/hosts @@ -0,0 +1,2 @@ +127.0.0.0 localhost +192.168.1.2 rtems # ip address of webserver diff --git a/http/rootfs/web/index.html b/http/rootfs/web/index.html index e69de29..15e5c9f 100644 --- a/http/rootfs/web/index.html +++ b/http/rootfs/web/index.html @@ -0,0 +1,15 @@ +<HTML> +<HEAD><TITLE>RTEMS GoAhead Test Page</TITLE></HEAD> +<BODY BGCOLOR="FFFFFF"> +<A HREF="http://www.oarcorp.com" target="Text Frame"> + <IMG align=right BORDER=0 SRC="oaronly.jpg" ALT="OAR"> </A> +<H1>RTEMS GoAhead Test Page</H1> +<HR> +<BODY> + +<P>Congratulations, you have successfully loaded your first page +from the GoAhead Web Server running on RTEMS.</P> + +<HR> +Copyright © 1988-1999 <A HREF="http://www.oarcorp.com" target="Text Frame">OAR Corporation</A> +</BODY></HTML> |