From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Zeffertt Subject: Re: [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source Date: Wed, 10 Jun 2009 16:08:21 +0100 Message-ID: <4A2FCC65.60309@eu.citrix.com> References: <49F1AA8A.2060005@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090406020900050409030806" Return-path: In-Reply-To: <49F1AA8A.2060005@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Alex Zeffertt Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------090406020900050409030806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: --------------090406020900050409030806 Content-Type: text/plain; name="ocaml-xenstore-stubdom-option" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ocaml-xenstore-stubdom-option" 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 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"); --------------090406020900050409030806 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------090406020900050409030806--