]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
Remove old demo from build, add simple hello-world test
authorMartin Lucina <martin@lucina.net>
Thu, 6 Nov 2014 09:58:25 +0000 (10:58 +0100)
committerMartin Lucina <martin@lucina.net>
Mon, 10 Nov 2014 14:05:41 +0000 (15:05 +0100)
In preparation for cleaning up minios/xenos to resolve (among other
things) symbol namespacing issues, remove the old non-app-tools-based
demo from the build.

As a temporary replacement add in a simple (not configure-based) "Hello,
world!" in tests/hello.

Signed-off-by: Martin Lucina <martin@lucina.net>
Makefile
tests/hello/hello.c [new file with mode: 0644]
tests/hello/hello.config [new file with mode: 0644]

index f17642db38cd4f67998ac8f1fca8ebc5d1ac1462..f6d625005a58553b1c12f1a0d4bcf9332cee88cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -98,13 +98,9 @@ src-y += xen/console/xenbus.c
 # The common mini-os objects to build.
 APP_OBJS :=
 OBJS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(src-y))
-HTTPD_OBJS+= httpd/bozohttpd.o httpd/main.o httpd/ssl-bozo.o
-HTTPD_OBJS+= httpd/content-bozo.o httpd/dir-index-bozo.o
-
-DEMO_OBJS += $(OBJ_DIR)/rumpkern_demo.o $(OBJ_DIR)/pthread_test.o
 
 .PHONY: default
-default: objs app-tools $(TARGET)
+default: objs app-tools $(TARGET) tests/hello/hello
 
 objs:
        mkdir -p $(OBJ_DIR)/lib $(OBJ_DIR)/xen/$(TARGET_ARCH_DIR)
@@ -133,11 +129,12 @@ ifneq ($(APP_OBJS),)
 APP_O=$(OBJ_DIR)/$(TARGET)_app.o 
 endif
 
-$(TARGET): links $(OBJS) $(DEMO_OBJS) $(HTTPD_OBJS) $(APP_O) arch_lib
-       $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(HTTPD_OBJS) $(DEMO_OBJS) $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o
-       $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
-       $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
-       #gzip -f -9 -c $@ >$@.gz
+.PHONY: $(TARGET)
+$(TARGET): links $(OBJS) $(APP_O) arch_lib
+#      $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o
+#      $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
+#      $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
+#      gzip -f -9 -c $@ >$@.gz
 
 
 APP_TOOLS += rumpapp-xen-cc rumpapp-xen-cc.configure specs specs.configure
@@ -176,6 +173,9 @@ app-tools/%: app-tools/%.in Makefile Config.mk
 app-tools_clean:
        rm -f $(addprefix app-tools/, $(APP_TOOLS))
 
+tests/hello/hello: tests/hello/hello.c
+       app-tools/rumpapp-xen-cc -o $@ $<
+
 .PHONY: clean arch_clean app-tools_clean
 
 arch_clean:
@@ -188,6 +188,7 @@ clean:      arch_clean app-tools_clean
        rm -f $(OBJ_DIR)/*.o *~ $(OBJ_DIR)/core $(OBJ_DIR)/$(TARGET).elf $(OBJ_DIR)/$(TARGET).raw $(TARGET) $(TARGET).o
        rm -f include/xen include/mini-os/machine
        rm -f tags TAGS
+       rm -f tests/hello/hello
 
 cleanrump: clean
        rm -rf rump rumpobj rumptools
diff --git a/tests/hello/hello.c b/tests/hello/hello.c
new file mode 100644 (file)
index 0000000..ed04dd2
--- /dev/null
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main (int argc, char *argv[])
+{
+    printf ("Hello, world!\n");
+    return 0;
+}
diff --git a/tests/hello/hello.config b/tests/hello/hello.config
new file mode 100644 (file)
index 0000000..c2ad5c6
--- /dev/null
@@ -0,0 +1,9 @@
+kernel = "hello"
+memory = 16
+# vcpus == 1 required
+vcpus=1
+name = "rump-hello"
+
+#extra = "command line args"
+
+on_crash="preserve"