All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source
@ 2009-04-24 12:03 Alex Zeffertt
  2009-06-10 15:08 ` Alex Zeffertt
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Zeffertt @ 2009-04-24 12:03 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: ocaml-xenstore-stubdom-option --]
[-- Type: text/plain, Size: 5552 bytes --]

Provide option of using xen-ocaml-tools.hg as source for xenstored stub domain
instead of tools/xenstore/xenstored_*.

To use, create a .config containing "CONFIG_OCAML_XENSTORED := y".
Then the build system will automatically download the remote repo
to tools/ocaml-xenstored.

Note: this patch depends on the following previously posted 
xen-ocaml-tools.hg patches:

 * have-libxc
 * remove-unused-Condition-module-and-unused-statfs-func
 * minios-stubdom-build
 * support_local-domid_dom0-grant-ref_and_dom0-port_args

It also depends on the previously posted xenstore stub domain patches
against linux-2.6.18-xen.hg and xen-unstable.hg.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>

diff -r 6f220b099374 stubdom/Makefile
--- a/stubdom/Makefile	Tue Apr 07 15:36:26 2009 +0100
+++ b/stubdom/Makefile	Thu Apr 16 10:08:20 2009 +0100
@@ -73,6 +73,7 @@
 TARGET_CPPFLAGS += -isystem $(GCC_INSTALL)include
 TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-$(XEN_TARGET_ARCH)/src/include
 TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-$(XEN_TARGET_ARCH)/src/include/ipv4
+TARGET_CPPFLAGS += -isystem $(CURDIR)/libxc-$(XEN_TARGET_ARCH)
 TARGET_CPPFLAGS += -I$(CURDIR)/include
 
 TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
@@ -223,7 +224,32 @@
 	    while read f; do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done
 	touch ioemu/linkfarm.stamp
 
-mk-headers-$(XEN_TARGET_ARCH): ioemu/linkfarm.stamp
+ifeq ($(CONFIG_OCAML_XENSTORED),y)
+$(XEN_ROOT)/tools/ocaml-xenstored:
+	make -C $(XEN_ROOT)/tools ocaml-xenstored
+
+xenstore/linkfarm.stamp: $(XEN_ROOT)/tools/ocaml-xenstored
+	mkdir -p xenstore
+	set -e ; 	 							\
+	$(absolutify_xen_root);							\
+	cd xenstore;								\
+	hg -R "$$XEN_ROOT/tools/ocaml-xenstored" locate |			\
+	while read fname ; do							\
+		mkdir -p $$(dirname $$fname) ;					\
+		ln -sf "$$XEN_ROOT/tools/ocaml-xenstored/$$fname" "$$fname";	\
+	done
+	touch $@
+else
+xenstore/linkfarm.stamp: $(XEN_ROOT)/tools/xenstore
+	mkdir -p xenstore
+	[ -h xenstore/Makefile ] || ( cd xenstore && \
+	  ln -sf ../$(XEN_ROOT)/tools/xenstore/*.c . && \
+	  ln -sf ../$(XEN_ROOT)/tools/xenstore/*.h . && \
+	  ln -sf ../$(XEN_ROOT)/tools/xenstore/Makefile . )
+	touch $@
+endif
+
+mk-headers-$(XEN_TARGET_ARCH): ioemu/linkfarm.stamp xenstore/linkfarm.stamp
 	mkdir -p include/xen && \
           ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/xen/include/public/*.h)) include/xen && \
           ln -sf $(addprefix ../../$(XEN_ROOT)/xen/include/public/,arch-ia64 arch-x86 hvm io xsm) include/xen && \
@@ -243,11 +269,6 @@
 	  ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.c . && \
 	  ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.h . && \
 	  ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/Makefile . )
-	mkdir -p xenstore
-	[ -h xenstore/Makefile ] || ( cd xenstore && \
-	  ln -sf ../$(XEN_ROOT)/tools/xenstore/*.c . && \
-	  ln -sf ../$(XEN_ROOT)/tools/xenstore/*.h . && \
-	  ln -sf ../$(XEN_ROOT)/tools/xenstore/Makefile . )
 	$(MAKE) -C $(MINI_OS) links
 	touch mk-headers-$(XEN_TARGET_ARCH)
 
@@ -319,8 +340,13 @@
 ##########
 
 .PHONY: xenstore
-xenstore: $(CROSS_ROOT)
-	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip xenstored.a CONFIG_STUBDOM=y
+ifeq ($(CONFIG_OCAML_XENSTORED),)
+ xenstore: $(CROSS_ROOT)
+	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) xenstore.a CONFIG_STUBDOM=y 
+else
+ xenstore: $(CROSS_ROOT) cross-ocaml
+	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) CONFIG_STUBDOM=y OCAMLC_CROSS_PREFIX=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/bin/
+endif
 
 ########
 # minios
@@ -344,8 +370,13 @@
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_GRUB $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a
 
 .PHONY: xenstore-stubdom
-xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore
+ifeq ($(CONFIG_OCAML_XENSTORED),)
+ xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore
 	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_XENSTORE $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/xenstore/xenstored.a
+else
+ xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_XENSTORE $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(CURDIR)/xenstore/xenstored/main-caml.o $(CURDIR)/xenstore/xenstored/caml.o $(CAMLLIB)/libasmrun.a $(CAMLLIB)/libunix.a $(shell find  $(CURDIR)/xenstore/ -name 'lib*_stubs.a')"
+endif
 
 #########
 # install
diff -r 6f220b099374 tools/xcutils/xs_dom_builder.c
--- a/tools/xcutils/xs_dom_builder.c	Tue Apr 07 15:36:26 2009 +0100
+++ b/tools/xcutils/xs_dom_builder.c	Thu Apr 16 10:08:20 2009 +0100
@@ -138,9 +138,9 @@
 	char buf[128];
 	int len;
 
-	len = sprintf(buf, " --local-domid=%" PRIu32
-	                   " --dom0-grant-ref=%" PRIu32
-	                   " --dom0-port=%" PRIu32,
+	len = sprintf(buf, " --local-domid %" PRIu32
+	                   " --dom0-grant-ref %" PRIu32
+	                   " --dom0-port %" PRIu32,
 	              b->domid, b->dom0_grant_ref, b->dom0_port);
 	if (len <= 0)
 		DIE_TO(fail, "sprintf failed");


[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-10 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-24 12:03 [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source Alex Zeffertt
2009-06-10 15:08 ` Alex Zeffertt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.