From 0243b256d6187ea610174531607366945e489605 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 12 Feb 2008 14:35:39 +0000 Subject: Add stubdomain support. See stubdom/README for usage details. - Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in arch_limits.h so as to permit getting them from there without pulling all the internal Mini-OS defines. - Setup a xen-elf cross-compilation environment in stubdom/cross-root - Add a POSIX layer on top of Mini-OS by linking against the newlib C library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c - Cross-compile zlib and libpci too. - Add an xs.h-compatible layer on top of Mini-OS' xenbus. - Cross-compile libxc with an additional xc_minios.c and a few things disabled. - Cross-compile ioemu with an additional block-vbd, but without sound, tpm and other details. A few hacks are needed: - Align ide and scsi buffers at least on sector size to permit direct transmission to the block backend. While we are at it, just page-align it to possibly save a segment. Also, limit the scsi buffer size because of limitations of the block paravirtualization protocol. - Allocate big tables dynamically rather that letting them go to bss: when Mini-OS gets installed in memory, bss is not lazily allocated, and doing so during Mini-OS is unnecessarily trick while we can simply use malloc. - Had to change the Mini-OS compilation somehow, so as to export Mini-OS compilation flags to the Makefiles of libxc and ioemu. Signed-off-by: Samuel Thibault --- stubdom/caml/Makefile | 18 ++++++++++++++++++ stubdom/caml/hello.ml | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 stubdom/caml/Makefile create mode 100644 stubdom/caml/hello.ml (limited to 'stubdom/caml') diff --git a/stubdom/caml/Makefile b/stubdom/caml/Makefile new file mode 100644 index 0000000000..69595a8f99 --- /dev/null +++ b/stubdom/caml/Makefile @@ -0,0 +1,18 @@ +XEN_ROOT = ../.. + +include $(XEN_ROOT)/Config.mk + +OCAMLFIND=ocamlfind +OCAMLOPT=ocamlopt + +OBJS := hello.cmx +LIBS := + +%.cmx: %.ml + $(OCAMLFIND) $(OCAMLOPT) -c $< -o $@ + +caml.o: $(OBJS) + $(OCAMLFIND) $(OCAMLOPT) $(LIBS) $^ -output-obj -o $@ + +clean: + rm -f *.o *.cmx *.cmi diff --git a/stubdom/caml/hello.ml b/stubdom/caml/hello.ml new file mode 100644 index 0000000000..3a7181134a --- /dev/null +++ b/stubdom/caml/hello.ml @@ -0,0 +1,4 @@ +let main arg = + Printf.printf "Hello, world!\n%!." + +let _ = Callback.register "main" main -- cgit v1.2.3