Changeset 8c6b033 in network-demos


Ignore:
Timestamp:
Sep 6, 2007, 10:01:37 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master, network-demos-4-10-branch, network-demos-4-8-branch, network-demos-4-9-branch
Children:
c193150
Parents:
a027365
Message:

2007-09-06 Joel Sherrill <joel.sherrill@…>

  • Makefile, init.c, rootfs/.cvsignore: Add some dynamic content. Can now look at cpu usage, reset cpu usage and print a stack usage report.
  • goahead_index.html, shttpd.png, shttpd_ext.c, shttpd_index.html: New files.
  • index.html.in: Removed.
Location:
http
Files:
3 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • http/ChangeLog

    ra027365 r8c6b033  
     12007-09-06      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile, init.c, rootfs/.cvsignore: Add some dynamic content.
     4        Can now look at cpu usage, reset cpu usage and print a stack
     5        usage report.
     6        * goahead_index.html, shttpd.png, shttpd_ext.c, shttpd_index.html:
     7        New files.
     8        * index.html.in: Removed.
     9
    1102007-09-04      Joel Sherrill <joel.sherrill@oarcorp.com>
    211
  • http/Makefile

    ra027365 r8c6b033  
    99
    1010# C source names, if any, go here -- minus the .c
    11 C_PIECES=init FilesystemImage
     11C_PIECES=init FilesystemImage shttpd_ext
    1212C_FILES=$(C_PIECES:%=%.c)
    1313C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
     
    7474
    7575CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
    76 CLEAN_ADDIRIONS += stamp-index-html rootfs/index.html
     76CLEAN_ADDITIONS += stamp-index-html rootfs/index.html rootfs/shttpd.png
    7777CLOBBER_ADDITIONS +=
    7878
     
    8787        $(make-exe)
    8888
    89 
    9089$(ARCH)/init.c: init.c FilesystemImage.c
    9190
    92 FilesystemImage: $(ARCH) stamp-index-html
     91FilesystemImage: $(ARCH) stamp-index-html \
     92    rootfs/etc/host.conf rootfs/etc/hosts rootfs/rtems_logo.jpg
    9393        cd rootfs ; \
    9494            tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
     
    9797        $(PROJECT_ROOT)/bin/bin2c FilesystemImage FilesystemImage
    9898
    99 stamp-index-html: index.html.in
    100 ifneq ($(HTTPD),)
    101         sed -e 's/@SERVER@/$(HTTPD)/' <index.html.in >rootfs/index.html
     99rootfs/index.html: shttpd_index.html goahead_index.html
     100ifeq ($(USE_SIMPLE),yes)
     101        cp shttpd_index.html rootfs/index.html
     102endif
     103ifeq ($(USE_GOHEAD),yes)
     104        cp goahead_index.html rootfs/index.html
     105endif
     106
     107stamp-index-html: rootfs/index.html
     108ifeq ($(USE_SIMPLE),yes)
     109        cp shttpd.png rootfs
    102110endif
    103111        touch stamp-index-html
  • http/goahead_index.html

    ra027365 r8c6b033  
    88
    99<P><big>Congratulations, you have successfully loaded your first page
    10 from the @SERVER@ running on RTEMS.</big></P>
     10from the GoAhead webserver running on RTEMS.</big></P>
    1111</center>
    1212</BODY></HTML>
  • http/init.c

    ra027365 r8c6b033  
    2525                                           RTEMS_INTERRUPT_LEVEL(0))
    2626
     27#define STACK_CHECKER_ON
    2728#define CONFIGURE_INIT
    2829
     
    9394#define bool2string(_b) ((_b) ? "true" : "false")
    9495
     96#if defined(USE_SIMPLE_HTTPD)
     97extern void example_shttpd_addpages(struct shttpd_ctx *ctx);
     98#endif
     99
    95100rtems_task Init(
    96101  rtems_task_argument argument
     
    108113   * Load filesystem image
    109114   */
    110   printf("Loading filesystem image");
     115  printf("Loading filesystem image\n");
    111116  status = Untar_FromMemory( (char *)FilesystemImage, FilesystemImage_size );
    112117   
    113   printf("Initializing Network");
     118  printf("Initializing Network\n");
    114119  rtems_bsdnet_initialize_network ();
    115120
     
    132137    status = rtems_initialize_webserver(
    133138      100,                             /* initial priority */
    134       RTEMS_MINIMUM_STACK_SIZE * 2,    /* stack size */
     139      RTEMS_MINIMUM_STACK_SIZE * 4,    /* stack size */
    135140      RTEMS_DEFAULT_MODES,             /* initial modes */
    136141      RTEMS_DEFAULT_ATTRIBUTES,        /* attributes */
    137142      NULL,                            /* init_callback */
    138       NULL,                            /* addpages_callback */
     143      example_shttpd_addpages,         /* addpages_callback */
    139144      "/",                             /* initial priority */
    140145      80                               /* port to listen on */
  • http/rootfs/.cvsignore

    ra027365 r8c6b033  
    11index.html
     2shttpd.png
Note: See TracChangeset for help on using the changeset viewer.