Changeset c2a4686 in network-demos for http


Ignore:
Timestamp:
Jun 22, 2007, 7:54:58 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:
07e6684
Parents:
5e49d0d
Message:

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

  • Makefile, init.c: Clean up. Make name of TARFILE related symbols conditional based upon architecture. Change way desired object format is determined so all BSPs compile this test.
Location:
http
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • http/ChangeLog

    r5e49d0d rc2a4686  
     12007-06-22      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * Makefile, init.c: Clean up. Make name of TARFILE related symbols
     4        conditional based upon architecture. Change way desired object format
     5        is determined so all BSPs compile this test.
     6
    172007-06-21      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • http/Makefile

    r5e49d0d rc2a4686  
    4343LD_LIBS   += -lhttpd
    4444LD_LIBS   += -lftpd
    45 NATIVE_OBJ = $(shell $(OBJCOPY) 2>&1  | grep copy: | cut -d':' -f3 | cut -d' ' -f2)
     45#NATIVE_OBJ = $(shell $(OBJCOPY) 2>&1  | grep copy: | cut -d':' -f3 | cut -d' ' -f2)
     46OBJDUMP=$(OBJCOPY:copy=dump)
    4647
    4748#
     
    5253#
    5354
    54 CLEAN_ADDITIONS += tarfile
     55CLEAN_ADDITIONS += tarfile obj_format
    5556CLOBBER_ADDITIONS +=
    5657
    5758all:    ${ARCH} $(SRCS) $(PGM)
    5859
    59 ${PGM}: $(OBJS) $(LINK_FILES)
     60obj_format:
     61        $(OBJDUMP) -f $(ARCH)/init.o | grep .o: | \
     62            sed -e 's/^.*format //' >obj_format
     63
     64${PGM}: $(OBJS) obj_format $(LINK_FILES)
    6065        cd rootfs ; tar cf ../$(ARCH)/tarfile web etc
    6166        cp $(ARCH)/tarfile .
    62         $(OBJCOPY) -I binary -O $(NATIVE_OBJ) tarfile $(ARCH)/tarfile.o
    63         $(LD) -r -o $(ARCH)/temp.o  $(ARCH)/init.o $(ARCH)/tarfile.o
     67        $(OBJCOPY) -I binary -O `cat obj_format` tarfile $(ARCH)/tarfile.o
     68        $(LD) $(CPU_CFLAGS) -r -o $(ARCH)/temp.o \
     69            $(ARCH)/init.o $(ARCH)/tarfile.o
    6470        $(MV) $(ARCH)/temp.o  $(ARCH)/init.o
    6571        $(RM) $(ARCH)/temp.o
  • http/init.c

    r5e49d0d rc2a4686  
    5757
    5858/*
    59  *  The tarfile is built in $(ARCH) so includes whether we were
    60  *  built optimized or debug.
     59 *  The tarfile is built automatically externally so we need to account
     60 *  for the leading symbol on the names.
    6161 */
     62#if defined(__sh__)
     63  #define SYM(_x) _x
     64#else
     65  #define SYM(_x) _ ## _x
     66#endif
    6267
    63 #if defined(USE_FTPD)
    64 /*
    65 #if defined(RTEMS_DEBUG)
    66 extern int _binary_o_debug_tarfile_start;
    67 extern int _binary_o_debug_tarfile_size;
    68 #define TARFILE_START _binary_o_debug_tarfile_start
    69 #define TARFILE_SIZE _binary_o_debug_tarfile_size
    70 #else
    71 extern int _binary_o_optimize_tarfile_start;
    72 extern int _binary_o_optimize_tarfile_size;
    73 #define TARFILE_START _binary_o_optimize_tarfile_start
    74 #define TARFILE_SIZE _binary_o_optimize_tarfile_size
    75 #endif
    76 */
    77 extern int _binary_tarfile_start;
    78 extern int _binary_tarfile_size;
    79 #define TARFILE_START _binary_tarfile_start
    80 #define TARFILE_SIZE _binary_tarfile_size
    81 #endif
     68extern int SYM(binary_tarfile_start);
     69extern int SYM(binary_tarfile_size);
     70#define TARFILE_START SYM(binary_tarfile_start)
     71#define TARFILE_SIZE SYM(binary_tarfile_size)
    8272
    8373#if defined(USE_FTPD)
     
    9787  printf("\n\n*** HTTP TEST ***\n\r" );
    9888
    99   /* init_paging(); */
    100 
     89  status = Untar_FromMemory((void *)(&TARFILE_START), (size_t)&TARFILE_SIZE);
     90   
    10191  rtems_bsdnet_initialize_network ();
    10292#if defined(USE_FTPD)
    10393  rtems_initialize_ftpd();
     94#endif
    10495
    105   status = Untar_FromMemory((void *)(&TARFILE_START), (size_t)&TARFILE_SIZE);
    106 #endif
    107    
    10896#if defined(USE_HTTPD)
    10997  rtems_initialize_webserver();
Note: See TracChangeset for help on using the changeset viewer.