From: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source
Date: Fri, 24 Apr 2009 13:03:22 +0100 [thread overview]
Message-ID: <49F1AA8A.2060005@eu.citrix.com> (raw)
[-- 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
next reply other threads:[~2009-04-24 12:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-24 12:03 Alex Zeffertt [this message]
2009-06-10 15:08 ` [PATCH 5/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - select xenstore-stubdom source Alex Zeffertt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49F1AA8A.2060005@eu.citrix.com \
--to=alex.zeffertt@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.