Permalink
Browse files

Xen 4.1: drop libraries that have been upstreamed

It's error prone to maintain two copies of the same libraries.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
  • Loading branch information...
1 parent 4efff6b commit 4be152f3c3c98bfe915bf9000a66fe8a0746286b @zli zli committed Mar 24, 2011
Showing with 6 additions and 6,988 deletions.
  1. +6 −61 Makefile.in
  2. +0 −8 config.mk.in
  3. +0 −6 configure.ac
  4. +0 −5 eventchn/META.in
  5. +0 −73 eventchn/Makefile
  6. +0 −24 eventchn/eventchn.ml
  7. +0 −23 eventchn/eventchn.mli
  8. +0 −94 eventchn/eventchn_injection.c
  9. +0 −171 eventchn/eventchn_stubs.c
  10. +0 −4 mmap/META.in
  11. +0 −73 mmap/Makefile
  12. +0 −29 mmap/mmap.ml
  13. +0 −25 mmap/mmap.mli
  14. +0 −134 mmap/mmap_stubs.c
  15. +0 −31 mmap/mmap_stubs.h
  16. +0 −5 xb/META.in
  17. +0 −79 xb/Makefile
  18. +0 −83 xb/op.ml
  19. +0 −47 xb/packet.ml
  20. +0 −41 xb/partial.ml
  21. +0 −186 xb/xb.ml
  22. +0 −96 xb/xb.mli
  23. +0 −84 xb/xb_stubs.c
  24. +0 −16 xb/xs_ring.ml
  25. +0 −114 xb/xs_ring_stubs.c
  26. +0 −5 xc/META.in
  27. +0 −73 xc/Makefile
  28. +0 −209 xc/xc.h
  29. +0 −363 xc/xc.ml
  30. +0 −219 xc/xc.mli
  31. +0 −128 xc/xc_cpufeature.h
  32. +0 −296 xc/xc_cpuid.h
  33. +0 −33 xc/xc_e820.h
  34. +0 −1,671 xc/xc_lib.c
  35. +0 −410 xc/xc_lib_injection.c
  36. +0 −1,261 xc/xc_stubs.c
  37. +0 −5 xs/META.in
  38. +0 −69 xs/Makefile
  39. +0 −71 xs/queueop.ml
  40. +0 −168 xs/xs.ml
  41. +0 −88 xs/xs.mli
  42. +0 −262 xs/xsraw.ml
  43. +0 −58 xs/xsraw.mli
  44. +0 −59 xs/xst.ml
  45. +0 −28 xs/xst.mli
View
@@ -38,19 +38,8 @@ endif
.PHONY: allxen
allxen:
ifeq ($(HAVE_XEN),1)
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C mmap
-endif
$(MAKE) -C netdev
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C xc
- $(MAKE) -C xb
- $(MAKE) -C xs
-endif
$(MAKE) -C xsrpc
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C eventchn
-endif
$(MAKE) -C cpuid
$(MAKE) -C vhd
$(MAKE) -C tapctl
@@ -85,19 +74,8 @@ endif
installxen:
ifeq ($(HAVE_XEN),1)
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C mmap install
-endif
$(MAKE) -C netdev install
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C xc install
- $(MAKE) -C xb install
- $(MAKE) -C xs install
-endif
$(MAKE) -C xsrpc install
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C eventchn install
-endif
$(MAKE) -C cpuid install
$(MAKE) -C vhd install
$(MAKE) -C tapctl install
@@ -132,19 +110,8 @@ endif
uninstallxen:
ifeq ($(HAVE_XEN),1)
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C eventchn uninstall
-endif
$(MAKE) -C xsrpc uninstall
$(MAKE) -C netdev uninstall
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C xs uninstall
- $(MAKE) -C xb uninstall
- $(MAKE) -C xc uninstall
-endif
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C mmap uninstall
-endif
$(MAKE) -C cpuid uninstall
$(MAKE) -C vhd uninstall
$(MAKE) -C tapctl uninstall
@@ -180,26 +147,15 @@ doc:
$(MAKE) -C stdext doc
$(MAKE) -C sexpr doc
$(MAKE) -C log doc
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C xb doc
- $(MAKE) -C xc doc
- $(MAKE) -C xs doc
-endif
$(MAKE) -C xml-light2 doc
$(MAKE) -C rpc-light doc
$(MAKE) -C http-svr doc
$(MAKE) -C camldm doc
$(MAKE) -C cdrom doc
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C eventchn doc
-endif
$(MAKE) -C pciutil doc
$(MAKE) -C rss doc
$(MAKE) -C stunnel doc
$(MAKE) -C xsrpc doc
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C mmap doc
-endif
$(MAKE) -C netdev doc
$(MAKE) -C forking_executioner doc
$(MAKE) -C mlvm doc
@@ -227,26 +183,15 @@ clean:
$(MAKE) -C doc clean
$(MAKE) -C forking_executioner clean
$(MAKE) -C mlvm clean
- $(MAKE) -C cpuid clean
- $(MAKE) -C vhd clean
- $(MAKE) -C tapctl clean
$(MAKE) -C xen-utils clean
cleanxen:
- $(MAKE) -C fake clean
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C mmap clean
-endif
- $(MAKE) -C netdev clean
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C xc clean
- $(MAKE) -C xb clean
- $(MAKE) -C xs clean
-endif
- $(MAKE) -C xsrpc clean
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
- $(MAKE) -C eventchn clean
-endif
+ $(MAKE) -C netdev install
+ $(MAKE) -C xsrpc install
+ $(MAKE) -C cpuid install
+ $(MAKE) -C vhd install
+ $(MAKE) -C tapctl install
+ $(MAKE) -C fake install
RPM_SPECSDIR=$(shell rpm --eval='%_specdir')
RPM_SOURCEDIR=$(shell rpm --eval='%_sourcedir')
View
@@ -1,14 +1,6 @@
-WITH_XEN_SYSTEM_BINDINGS = @WITH_XEN_SYSTEM_BINDINGS@
-
-ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
-OCAML_XB_DIR = ../xb
-OCAML_XC_DIR = ../xc
-OCAML_XS_DIR = ../xs
-else
OCAML_XB_DIR = $(shell ocamlfind query xb)
OCAML_XC_DIR = $(shell ocamlfind query xc)
OCAML_XS_DIR = $(shell ocamlfind query xs)
-endif
OCAML_XB_INC = -I $(OCAML_XB_DIR)
OCAML_XB_LIB = $(OCAML_XB_DIR)/xb.cmxa
View
@@ -30,11 +30,6 @@ AC_CHECK_HEADERS([xen/xen.h],[XEN=1],[XEN=0])
AC_CHECK_HEADERS([libdevmapper.h], [DEVICE_MAPPER=1], [DEVICE_MAPPER=0])
AC_CHECK_HEADERS([linux/cdrom.h], [LINUX_CDROM=1], [LINUX_CDROM=0])
-HAVE_XEN_SYSTEM_BINDINGS=$XEN # could do more intelligent detection here...
-AC_ARG_WITH(xen-system-bindings, AS_HELP_STRING([--without-xen-system-bindings],[do not use the system installed xen bindings]),
- [if test "x$withval" = "xno"; then WITH_XEN_SYSTEM_BINDINGS=0; else WITH_XEN_SYSTEM_BINDINGS=1; fi],
- [WITH_XEN_SYSTEM_BINDINGS=$HAVE_XEN_SYSTEM_BINDINGS])
-
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_DECLS([XS_RESTRICT],[],[],[
[
@@ -61,7 +56,6 @@ AC_CHECK_OCAML_PKG([type-conv])
AC_CONFIG_FILES([Makefile config.mk])
AC_SUBST([XEN])
-AC_SUBST([WITH_XEN_SYSTEM_BINDINGS])
AC_SUBST([DEVICE_MAPPER])
AC_SUBST([LINUX_CDROM])
AC_SUBST([OCAML_PKG_xmlm])
View
@@ -1,5 +0,0 @@
-version = "@VERSION@"
-description = "Eventchn interface extension"
-requires = "unix"
-archive(byte) = "eventchn.cma"
-archive(native) = "eventchn.cmxa"
View
@@ -1,73 +0,0 @@
-include ../config.mk
-
-CC = gcc
-CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml -I$(XEN_ROOT)/usr/include
-OCAMLC = ocamlc -g
-OCAMLOPT = ocamlopt
-
-LDFLAGS = -cclib -L./
-
-VERSION := $(shell git show-ref --head | grep -E " HEAD$$" | cut -f 1 -d " " || echo 0)
-OCAMLOPTFLAGS = -g -dtypes
-
-OCAMLABI := $(shell ocamlc -version)
-OCAMLLIBDIR := $(shell ocamlc -where)
-OCAMLDESTDIR ?= $(OCAMLLIBDIR)
-
-OBJS = eventchn
-INTF = $(foreach obj, $(OBJS),$(obj).cmi)
-LIBS = eventchn.cma eventchn.cmxa
-
-DOCDIR = /myrepos/xen-api-libs/doc
-
-all: $(INTF) $(LIBS) $(PROGRAMS)
-
-bins: $(PROGRAMS)
-
-libs: $(LIBS)
-
-eventchn.cmxa: libeventchn_stubs.a $(foreach obj,$(OBJS),$(obj).cmx)
- $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ -cclib -leventchn_stubs $(foreach obj,$(OBJS),$(obj).cmx)
-
-eventchn.cma: $(foreach obj,$(OBJS),$(obj).cmo)
- $(OCAMLC) -a -dllib dlleventchn_stubs.so -cclib -leventchn_stubs -o $@ $(foreach obj,$(OBJS),$(obj).cmo)
-
-eventchn_stubs.a: eventchn_stubs.o
- ocamlmklib -o eventchn_stubs $+
-
-libeventchn_stubs.a: eventchn_stubs.o
- ar rcs $@ $+
- ocamlmklib -o eventchn_stubs $+
-
-%.cmo: %.ml
- $(OCAMLC) -c -o $@ $<
-
-%.cmi: %.mli
- $(OCAMLC) -c -o $@ $<
-
-%.cmx: %.ml
- $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -o $@ $<
-
-%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
-
-META: META.in
- sed 's/@VERSION@/$(VERSION)/g' < $< > $@
-
-.PHONY: install
-install: path = $(DESTDIR)$(shell ocamlfind printconf destdir)
-install: $(LIBS) META
- mkdir -p $(path)
- ocamlfind install -destdir $(path) -ldconf ignore eventchn META $(INTF) $(LIBS) *.a *.so *.cmx *.sp?t
-
-.PHONY: uninstall
-uninstall:
- ocamlfind remove eventchn
-
-.PHONY: doc
-doc: $(INTF)
- python ../doc/doc.py $(DOCDIR) "eventchn" "package" "$(OBJS)" "." "" ""
-
-clean:
- rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.sp?t $(LIBS) $(PROGRAMS)
-
View
@@ -1,24 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-exception Error of string
-
-external init: unit -> Unix.file_descr = "stub_eventchn_init"
-external notify: Unix.file_descr -> int -> unit = "stub_eventchn_notify"
-external bind_interdomain: Unix.file_descr -> int -> int -> int = "stub_eventchn_bind_interdomain"
-external bind_virq: Unix.file_descr -> int = "stub_eventchn_bind_virq"
-external unbind: Unix.file_descr -> int -> unit = "stub_eventchn_unbind"
-external read_port: Unix.file_descr -> int = "stub_eventchn_read_port"
-external write_port: Unix.file_descr -> int -> unit = "stub_eventchn_write_port"
-
-let _ = Callback.register_exception "eventchn.error" (Error "register_callback")
View
@@ -1,23 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-exception Error of string
-external init : unit -> Unix.file_descr = "stub_eventchn_init"
-external notify : Unix.file_descr -> int -> unit = "stub_eventchn_notify"
-external bind_interdomain : Unix.file_descr -> int -> int -> int
- = "stub_eventchn_bind_interdomain"
-external bind_virq : Unix.file_descr -> int = "stub_eventchn_bind_virq"
-external unbind : Unix.file_descr -> int -> unit = "stub_eventchn_unbind"
-external read_port : Unix.file_descr -> int = "stub_eventchn_read_port"
-external write_port : Unix.file_descr -> int -> unit
- = "stub_eventchn_write_port"
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- */
-#ifdef WITH_INJECTION_CAPABILITY
-#include "../fake/marshall.h"
-#include "../fake/using.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-static int fake_eventchn_open(void)
-{
- struct sockaddr_un remote;
- char *s;
- int fd, len;
-
- s = getenv("XIU");
- if (!s)
- return -1;
- snprintf(remote.sun_path, 256, "%s-ev", s);
- remote.sun_family = AF_UNIX;
- len = strlen(remote.sun_path) + sizeof(remote.sun_family);
-
- fd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (fd == -1)
- return -1;
- if (connect(fd, (struct sockaddr *)&remote, len) != 0)
- return -1;
-
- return fd;
-}
-
-static int fake_eventchn_ioctl(int handle, int cmd, void *arg)
-{
- switch (cmd) {
- case IOCTL_EVTCHN_NOTIFY:
- marshall_command(handle, "ioctl,notify,%d\n",
- ((struct ioctl_evtchn_notify *) arg)->port);
- return unmarshall_return(handle);
- case IOCTL_EVTCHN_BIND_INTERDOMAIN:
- marshall_command(handle, "ioctl,bind_interdomain,%d,%d\n",
- ((struct ioctl_evtchn_bind_interdomain *) arg)->remote_domain,
- ((struct ioctl_evtchn_bind_interdomain *) arg)->remote_port);
- return unmarshall_return(handle);
- case IOCTL_EVTCHN_BIND_VIRQ:
- marshall_command(handle, "ioctl,bind_virq,%d\n",
- ((struct ioctl_evtchn_bind_virq *) arg)->virq);
- return unmarshall_return(handle);
- case IOCTL_EVTCHN_UNBIND:
- marshall_command(handle, "ioctl,unbind,%d\n",
- ((struct ioctl_evtchn_unbind *) arg)->port);
- return unmarshall_return(handle);
- default:
- return -EINVAL;
- }
-}
-
-static int fake_eventchn_read_port(int handle, evtchn_port_t *port)
-{
- int ret;
-
- marshall_command(handle, "read\n");
- ret = unmarshall_int(handle);
- *port = ret;
- return unmarshall_return(handle);
-}
-
-static int fake_eventchn_write_port(int handle, evtchn_port_t port)
-{
- marshall_command(handle, "write,%d\n", port);
- return unmarshall_return(handle);
-}
-
-#define pre_eventchn_open() if (using_injection()) return fake_eventchn_open();
-#define pre_eventchn_ioctl(h,c,a) if (using_injection()) return fake_eventchn_ioctl(h,c,a);
-#define pre_eventchn_read_port(h,p) if (using_injection()) return fake_eventchn_read_port(h,p);
-#define pre_eventchn_write_port(h,p) if (using_injection()) return fake_eventchn_write_port(h,p);
-#else
-#define pre_eventchn_open() do {} while(0);
-#define pre_eventchn_ioctl(h,c,a) do {} while(0);
-#define pre_eventchn_read_port(h,p) do {} while(0);
-#define pre_eventchn_write_port(h,p) do {} while(0);
-#endif
Oops, something went wrong.

3 comments on commit 4be152f

I must have missed something -- can you please link to the new location of theese libraries?

Contributor

mcclurmc replied Jul 8, 2011

These libraries are provided by the xen hypervisor in the tools/ocaml/libs directory. You need to get them from the source repository, as it seems most distributions chop these out of their xen packages.

Thanks!

Please sign in to comment.