Changeset 591682d in network-demos


Ignore:
Timestamp:
Sep 25, 2007, 4:06:59 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master, network-demos-4-10-branch, network-demos-4-9-branch
Children:
d6b60f5
Parents:
bc5c5e0
Message:

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

  • .cvsignore, Makefile, init.c: Switch to using rtems-bin2c for initial filesystem image.
Location:
nfsClientTest
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • nfsClientTest/.cvsignore

    rbc5c5e0 r591682d  
    11o-optimize
     2FilesystemImage
     3FilesystemImage.c
     4FilesystemImage.h
  • nfsClientTest/ChangeLog

    rbc5c5e0 r591682d  
     12007-09-25      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * .cvsignore, Makefile, init.c: Switch to using rtems-bin2c for initial
     4        filesystem image.
     5
    162007-07-18      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • nfsClientTest/Makefile

    rbc5c5e0 r591682d  
    99
    1010# C source names, if any, go here -- minus the .c
    11 C_PIECES=init dirutils
     11C_PIECES=init dirutils FilesystemImage
    1212C_FILES=$(C_PIECES:%=%.c)
    1313C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
     
    1919
    2020SRCS=$(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
    21 OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) $(ARCH)/tarfile.o
     21OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
    2222
    2323PRINT_SRCS=$(DOCS)
     
    4141LD_PATHS  +=
    4242
    43 OBJDUMP=$(OBJCOPY:copy=dump)
    44 
    4543CFLAGS   +=
    46 LD_LIBS  += -lrtemsNfs
     44LD_LIBS  += -lnfs
    4745
    4846#
     
    5351#
    5452
    55 CLEAN_ADDITIONS += tarfile obj_format
     53CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
    5654CLOBBER_ADDITIONS +=
    5755
    58 # strip out flags gcc knows but LD doesn't like -- add as needed
    59 LD_CPU_CFLAGS=$(CPU_CFLAGS:-mstrict-align:)
    60 
    6156all:    ${ARCH} $(SRCS) $(PGM)
    62 
    63 obj_format:
    64         $(OBJDUMP) -f $(ARCH)/init.o | grep .o: | \
    65             sed -e 's/^.*format //' >obj_format
    6657
    6758${PGM}: $(OBJS) $(LINK_FILES)
    6859        $(make-exe)
    6960
    70 $(ARCH)/tarfile.o: $(ARCH) obj_format
    71         cd rootfs ; tar cf ../$(ARCH)/tarfile --exclude CVS .
    72         cp $(ARCH)/tarfile .
    73         $(OBJCOPY) -I binary -O `cat obj_format` tarfile $(ARCH)/tarfile.o
    74         $(LD) $(LD_CPU_CFLAGS) -r -o $(ARCH)/temp.o $(ARCH)/tarfile.o
     61$(ARCH)/init.o: init.c FilesystemImage.h
     62
     63FilesystemImage: $(ARCH) rootfs/etc/host.conf rootfs/etc/hosts rootfs/rtems_logo.jpg
     64        cd rootfs ; \
     65            tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
     66
     67FilesystemImage.c: $(ARCH) FilesystemImage
     68        $(PROJECT_ROOT)/bin/bin2c FilesystemImage FilesystemImage
     69
    7570
    7671# Install the program(s), appending _g or _p as appropriate.
  • nfsClientTest/init.c

    rbc5c5e0 r591682d  
    5151#include <stdio.h>
    5252#include <rtems/rtems_bsdnet.h>
    53 #include <rtems/ftpd.h>
    5453#include <rtems/untar.h>
    5554
     
    6463#include "../networkconfig.h"
    6564
    66 #include <rtems_webserver.h>
    67 
    68 #define ARGUMENT 0
    6965
    7066/*
    71  *  The tarfile is built automatically externally so we need to account
    72  *  for the leading symbol on the names.
     67 *  The tarfile image is built automatically externally.
    7368 */
    74 #if defined(__sh__)
    75   #define SYM(_x) _x
    76 #else
    77   #define SYM(_x) _ ## _x
    78 #endif
    79 
    80 extern int SYM(binary_tarfile_start);
    81 extern int SYM(binary_tarfile_size);
    82 #define TARFILE_START SYM(binary_tarfile_start)
    83 #define TARFILE_SIZE SYM(binary_tarfile_size)
     69#include "FilesystemImage.h"
    8470
    8571rtems_task Init(
     
    9783   */
    9884  printf("=============== Loading filesystem image ===============\n");
    99   status = Untar_FromMemory((void *)(&TARFILE_START), (size_t)&TARFILE_SIZE);
     85  status = Untar_FromMemory((void *)FilesystemImage, FilesystemImage_size);
    10086   
    10187  printf("============== Look at Local Filesystem ==============\n");
Note: See TracChangeset for help on using the changeset viewer.