source: network-demos/http/init.c @ 6c58235

rtems-4-5-branch
Last change on this file since 6c58235 was 6c58235, checked in by Joel Sherrill <joel.sherrill@…>, on 07/12/00 at 16:44:57

Patch from Andrew Bythell <abythell@…> 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.

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[4018538]1/*  Init
2 *
3 *  This routine is the initialization task for this test program.
4 *
5 *  Don't forget to change the IP addresses
6 */
7
8#define TEST_INIT
9
10#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
11#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
12#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
[6c58235]13#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS        20
14#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
[4018538]15
16#define CONFIGURE_EXECUTIVE_RAM_SIZE    (512*1024)
17#define CONFIGURE_MAXIMUM_SEMAPHORES    20
18#define CONFIGURE_MAXIMUM_TASKS         20
19
[7054195]20#define CONFIGURE_MICROSECONDS_PER_TICK 10000
[4018538]21
22#define CONFIGURE_INIT_TASK_STACK_SIZE  (10*1024)
23#define CONFIGURE_INIT_TASK_PRIORITY    120
24#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
25                                           RTEMS_NO_TIMESLICE | \
26                                           RTEMS_NO_ASR | \
27                                           RTEMS_INTERRUPT_LEVEL(0))
28
29#define CONFIGURE_INIT
30
31#include "system.h"
32
33#include <errno.h>
34#include <time.h>
35
36#include <confdefs.h>
37#include <stdio.h>
38#include <rtems/rtems_bsdnet.h>
39#include <ftpd.h>
40
41     
42#include <rtems/error.h>
43#include <rpc/rpc.h>
44#include <netinet/in.h>
45#include <time.h>
46
47#include <arpa/inet.h>
48#include <sys/socket.h>
49#include "../networkconfig.h"
50
51#include <rtems_webserver.h>
52
53#define ARGUMENT 0
54
[6c58235]55/*
56 *  The tarfile is built in $(ARCH) so includes whether we were
57 *  built optimized or debug.
58 */
59
60#if defined(RTEMS_DEBUG)
61extern int _binary_o_debug_tarfile_start;
62extern int _binary_o_debug_tarfile_size;
63#define TARFILE_START _binary_o_debug_tarfile_start
64#define TARFILE_SIZE _binary_o_debug_tarfile_size
65#else
66extern int _binary_o_optimize_tarfile_start;
67extern int _binary_o_optimize_tarfile_size;
68#define TARFILE_START _binary_o_optimize_tarfile_start
69#define TARFILE_SIZE _binary_o_optimize_tarfile_size
70#endif
[4018538]71
72struct rtems_ftpd_configuration rtems_ftpd_configuration = {
73   10,                     /* FTPD task priority            */
74   1024,                   /* Maximum buffersize for hooks  */
[6c58235]75   21,                     /* Well-known port     */
[4018538]76   NULL                    /* List of hooks       */
77};
78rtems_task Init(
79  rtems_task_argument argument
80)
81{
82  rtems_status_code status;
83
84  printf("\n\n*** HTTP TEST ***\n\r" );
85
86  /* init_paging(); */
87
88  rtems_bsdnet_initialize_network ();
89  rtems_initialize_ftpd();
90
[6c58235]91  status = Untar_FromMemory((unsigned char *)(&TARFILE_START), &TARFILE_SIZE);
[4018538]92   
93  rtems_initialize_webserver();
94
95  status = rtems_task_delete( RTEMS_SELF );
96}
97
98
99
100
Note: See TracBrowser for help on using the repository browser.