WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.h

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source
From: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Date: Fri, 24 Apr 2009 13:03:22 +0100
Delivery-date: Fri, 24 Apr 2009 05:07:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

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@xxxxxxxxxxxxx>

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");

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source, Alex Zeffertt <=