summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-04 16:26:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-04 16:26:58 +0000
commitd70b4e74967e86dfdd4f7f60ab144868c730337b (patch)
tree6fd46dfe14a6ebbfc73759e7e05160cd1e05ddc6
parent0cbc6dbe83de51fca6b35137707c1925b67f9aaa (diff)
2007-09-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile: Use bin2c to more reliably turn the tarfile into a linkable object file. Ignore .cvsignore when making tarfile. * init.c: Clean up tarfile symbol definitions. * .cvsignore, rootfs/.cvsignore: New files.
-rw-r--r--http/.cvsignore7
-rw-r--r--http/ChangeLog7
-rw-r--r--http/Makefile29
-rw-r--r--http/init.c16
-rw-r--r--http/rootfs/.cvsignore1
5 files changed, 35 insertions, 25 deletions
diff --git a/http/.cvsignore b/http/.cvsignore
new file mode 100644
index 0000000..26c82be
--- /dev/null
+++ b/http/.cvsignore
@@ -0,0 +1,7 @@
+*.swp
+FilesystemImage
+FilesystemImage.c
+FilesystemImage.h
+o-optimize
+stamp-index-html
+
diff --git a/http/ChangeLog b/http/ChangeLog
index 3095354..815be6d 100644
--- a/http/ChangeLog
+++ b/http/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-04 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile: Use bin2c to more reliably turn the tarfile into a
+ linkable object file. Ignore .cvsignore when making tarfile.
+ * init.c: Clean up tarfile symbol definitions.
+ * .cvsignore, rootfs/.cvsignore: New files.
+
2007-08-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile: Account for -B architecture option.
diff --git a/http/Makefile b/http/Makefile
index 65b3003..2d20a33 100644
--- a/http/Makefile
+++ b/http/Makefile
@@ -8,7 +8,7 @@ PGM=${ARCH}/$(SAMPLE).exe
MANAGERS=all
# C source names, if any, go here -- minus the .c
-C_PIECES=init
+C_PIECES=init FilesystemImage
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
@@ -18,7 +18,7 @@ DOCTYPES=
DOCS=$(DOCTYPES:%=$(SAMPLE).%)
SRCS=$(DOCS) $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
-OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) $(ARCH)/tarfile.o
+OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
PRINT_SRCS=$(DOCS)
@@ -44,7 +44,7 @@ LD_PATHS +=
OBJDUMP=$(OBJCOPY:copy=dump)
USE_GOHEAD=no
-USE_SIMPLE=no
+USE_SIMPLE=yes
USE_FTPD=yes
ifeq ($(USE_GOHEAD),yes)
HTTPD = GoAhead Web Server
@@ -63,6 +63,8 @@ ifeq ($(USE_FTPD),yes)
LD_LIBS += -lftpd
endif
+LD_LIBS +=
+
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
@@ -70,7 +72,8 @@ endif
# 'make clobber' already includes 'make clean'
#
-CLEAN_ADDITIONS += tarfile obj_format stamp-index-html rootfs/index.html
+CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
+CLEAN_ADDIRIONS += stamp-index-html rootfs/index.html
CLOBBER_ADDITIONS +=
# strip out flags gcc knows but LD doesn't like -- add as needed
@@ -80,18 +83,18 @@ COPY_ARCH=$(shell echo $(OBJCOPY) | cut -d'-' -f1)
all: ${ARCH} $(SRCS) $(PGM)
-obj_format:
- $(OBJDUMP) -f $(ARCH)/init.o | grep .o: | \
- sed -e 's/^.*format //' >obj_format
-
${PGM}: $(OBJS) $(LINK_FILES)
$(make-exe)
-$(ARCH)/tarfile.o: $(ARCH) stamp-index-html obj_format
- cd rootfs ; tar cf ../$(ARCH)/tarfile --exclude CVS .
- cp $(ARCH)/tarfile .
- $(OBJCOPY) -I binary -O `cat obj_format` \
- -B $(COPY_ARCH) tarfile $(ARCH)/tarfile.o
+
+$(ARCH)/init.c: init.c FilesystemImage.c
+
+FilesystemImage: $(ARCH) stamp-index-html
+ cd rootfs ; \
+ tar cf ../FilesystemImage --exclude CVS --exclude .cvsignore .
+
+FilesystemImage.c: $(ARCH) FilesystemImage
+ $(PROJECT_ROOT)/bin/bin2c FilesystemImage FilesystemImage
stamp-index-html: index.html.in
ifneq ($(HTTPD),)
diff --git a/http/init.c b/http/init.c
index 7f0c146..872a6bb 100644
--- a/http/init.c
+++ b/http/init.c
@@ -53,19 +53,11 @@
#define ARGUMENT 0
/*
- * The tarfile is built automatically externally so we need to account
- * for the leading symbol on the names.
+ * The tarfile image is built automatically externally.
*/
-#if defined(__sh__)
- #define SYM(_x) _x
-#else
- #define SYM(_x) _ ## _x
-#endif
-
-extern int SYM(binary_tarfile_start);
-extern int SYM(binary_tarfile_size);
-#define TARFILE_START SYM(binary_tarfile_start)
-#define TARFILE_SIZE SYM(binary_tarfile_size)
+#include "FilesystemImage.h"
+#define TARFILE_START FilesystemImage
+#define TARFILE_SIZE FilesystemImage_size
#if defined(USE_FTPD)
boolean FTPD_enabled = TRUE;
diff --git a/http/rootfs/.cvsignore b/http/rootfs/.cvsignore
new file mode 100644
index 0000000..dcaf716
--- /dev/null
+++ b/http/rootfs/.cvsignore
@@ -0,0 +1 @@
+index.html