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

Re: [Xen-devel] [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstab

To: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Subject: Re: [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: Wed, 10 Jun 2009 16:08:21 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 10 Jun 2009 08:11:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49F1AA8A.2060005@xxxxxxxxxxxxx>
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>
References: <49F1AA8A.2060005@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090409)
Hi,

I've attached an updated version of this patch which fixes a typo. The typo was in stubdom/Makefile and caused the build of the C-based xenstore stubdom to fail.

Alex Zeffertt wrote:
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 5a22533d011b stubdom/Makefile
--- a/stubdom/Makefile  Wed May 06 13:23:45 2009 +0100
+++ b/stubdom/Makefile  Wed May 06 15:16:52 2009 +0100
@@ -71,6 +71,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)
 
@@ -323,8 +344,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) xenstored.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
@@ -348,8 +374,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 5a22533d011b tools/xcutils/xs_dom_builder.c
--- a/tools/xcutils/xs_dom_builder.c    Wed May 06 13:23:45 2009 +0100
+++ b/tools/xcutils/xs_dom_builder.c    Wed May 06 15:16:52 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>
  • Re: [Xen-devel] [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source, Alex Zeffertt <=