diff --git a/Makefile b/Makefile index 1c8ee8dc8a..b7229fc9a7 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ INSTALL_DIR := $(INSTALL) -d -m0755 INSTALL_DATA := $(INSTALL) -m0644 INSTALL_PROG := $(INSTALL) -m0755 -KERNELS ?= *2.6* +KERNELS ?= linux-2.6-xen0 linux-2.6-xenU # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU # You may use wildcards in the above e.g. KERNELS=*2.4* @@ -30,20 +30,12 @@ endif include buildconfigs/Rules.mk .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper -.PHONY: kbuild kdelete kclean install-tools install-xen install-docs -.PHONY: install-kernels +.PHONY: kbuild kdelete kclean all: dist -# install everything into the standard system directories -# NB: install explicitly does not check that everything is up to date! -install: DESTDIR= -install: xen checked-tools kernels docs - -# Only check for install req'mts on 'make install', not on 'make dist'. -checked-tools: - $(MAKE) -C tools/check install - $(MAKE) -C tools install +# build and install everything into the standard system directories +install: install-xen install-tools install-kernels install-docs # build and install everything into local dist directory dist: xen tools kernels docs @@ -118,9 +110,17 @@ install-iptables: tar -jxf iptables-1.2.11.tar.bz2 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install +install-%: DESTDIR= +install-%: % + @: # do nothing + help: @echo 'Installation targets:' @echo ' install - build and install everything' + @echo ' install-xen - build and install the Xen hypervisor' + @echo ' install-tools - build and install the control tools' + @echo ' install-kernels - build and install guest kernels' + @echo ' install-docs - build and install documentation' @echo '' @echo 'Building targets:' @echo ' dist - build and install everything into local dist directory' @@ -178,3 +178,4 @@ linux26: netbsd20: $(MAKE) netbsd-2.0-xenU-build + diff --git a/linux-2.6.10-xen-sparse/arch/xen/Kconfig b/linux-2.6.10-xen-sparse/arch/xen/Kconfig index 6e66892032..9beeb15593 100644 --- a/linux-2.6.10-xen-sparse/arch/xen/Kconfig +++ b/linux-2.6.10-xen-sparse/arch/xen/Kconfig @@ -26,7 +26,7 @@ menu "XEN" config XEN_PRIVILEGED_GUEST bool "Privileged Guest (domain 0)" default n - select XEN_PHYSDEV_ACCESS + select XEN_PHYSDEV_ACCESS help Support for privileged operation (domain 0) @@ -35,18 +35,18 @@ config XEN_PHYSDEV_ACCESS default XEN_PRIVILEGED_GUEST help Assume access is available to physical hardware devices - (e.g., hard drives, network cards). This allows you to configure - such devices and also includes some low-level support that is - otherwise not compiled into the kernel. + (e.g., hard drives, network cards). This allows you to configure + such devices and also includes some low-level support that is + otherwise not compiled into the kernel. config XEN_BLKDEV_BACKEND - bool "Block-device backend driver" - depends on XEN_PHYSDEV_ACCESS - default y - help - The block-device backend driver allows the kernel to export its - block devices to other guests via a high-performance shared-memory - interface. + bool "Block-device backend driver" + depends on XEN_PHYSDEV_ACCESS + default y + help + The block-device backend driver allows the kernel to export its + block devices to other guests via a high-performance shared-memory + interface. config XEN_BLKDEV_TAP_BE bool "Block Tap support for backend driver (DANGEROUS)" @@ -62,87 +62,86 @@ config XEN_BLKDEV_TAP_BE modified to use grant tables. config XEN_NETDEV_BACKEND - bool "Network-device backend driver" - depends on XEN_PHYSDEV_ACCESS - default y - help - The network-device backend driver allows the kernel to export its - network devices to other guests via a high-performance shared-memory - interface. + bool "Network-device backend driver" + depends on XEN_PHYSDEV_ACCESS + default y + help + The network-device backend driver allows the kernel to export its + network devices to other guests via a high-performance shared-memory + interface. config XEN_BLKDEV_FRONTEND - bool "Block-device frontend driver" - default y - help - The block-device frontend driver allows the kernel to access block - devices mounted within another guest OS. Unless you are building a - dedicated device-driver domain, or your master control domain - (domain 0), then you almost certainly want to say Y here. + bool "Block-device frontend driver" + default y + help + The block-device frontend driver allows the kernel to access block + devices mounted within another guest OS. Unless you are building a + dedicated device-driver domain, or your master control domain + (domain 0), then you almost certainly want to say Y here. config XEN_NETDEV_FRONTEND - bool "Network-device frontend driver" - default y - help - The network-device frontend driver allows the kernel to access - network interfaces within another guest OS. Unless you are building a - dedicated device-driver domain, or your master control domain - (domain 0), then you almost certainly want to say Y here. + bool "Network-device frontend driver" + default y + help + The network-device frontend driver allows the kernel to access + network interfaces within another guest OS. Unless you are building a + dedicated device-driver domain, or your master control domain + (domain 0), then you almost certainly want to say Y here. config XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER - bool "Pipelined transmitter (DANGEROUS)" + bool "Pipelined transmitter (DANGEROUS)" depends on XEN_NETDEV_FRONTEND - default n - help - The driver will assume that the backend is pipelining packets for - transmission: whenever packets are pending in the remote backend, - the driver will not send asynchronous notifications when it queues - additional packets for transmission. - If the backend is a dumb domain, such as a transparent Ethernet - bridge with no local IP interface, it is safe to say Y here to get - slightly lower network overhead. - If the backend has a local IP interface; or may be doing smart things - like reassembling packets to perform firewall filtering; or if you - are unsure; or if you experience network hangs when this option is - enabled; then you must say N here. + default n + help + The driver will assume that the backend is pipelining packets for + transmission: whenever packets are pending in the remote backend, + the driver will not send asynchronous notifications when it queues + additional packets for transmission. + If the backend is a dumb domain, such as a transparent Ethernet + bridge with no local IP interface, it is safe to say Y here to get + slightly lower network overhead. + If the backend has a local IP interface; or may be doing smart things + like reassembling packets to perform firewall filtering; or if you + are unsure; or if you experience network hangs when this option is + enabled; then you must say N here. config XEN_BLKDEV_TAP - bool "Block device tap driver" - default n - help - This driver allows a VM to interact on block device channels - to other VMs. Block messages may be passed through or redirected - to a character device, allowing device prototyping in application - space. Odds are that you want to say N here. - + bool "Block device tap driver" + default n + help + This driver allows a VM to interact on block device channels + to other VMs. Block messages may be passed through or redirected + to a character device, allowing device prototyping in application + space. Odds are that you want to say N here. config XEN_WRITABLE_PAGETABLES bool default y config XEN_SCRUB_PAGES - bool "Scrub memory before freeing it to Xen" - default y - help - Erase memory contents before freeing it back to Xen's global - pool. This ensures that any secrets contained within that - memory (e.g., private keys) cannot be found by other guests that - may be running on the machine. Most people will want to say Y here. - If security is not a concern then you may increase performance by - saying N. + bool "Scrub memory before freeing it to Xen" + default y + help + Erase memory contents before freeing it back to Xen's global + pool. This ensures that any secrets contained within that + memory (e.g., private keys) cannot be found by other guests that + may be running on the machine. Most people will want to say Y here. + If security is not a concern then you may increase performance by + saying N. choice - prompt "Processor Type" - default X86 + prompt "Processor Type" + default X86 config X86 - bool "X86" - help - Choose this option if your computer is a X86 architecture. + bool "X86" + help + Choose this option if your computer is a X86 architecture. config X86_64 - bool "X86_64" - help - Choose this option if your computer is a X86 architecture. + bool "X86_64" + help + Choose this option if your computer is a X86 architecture. endchoice diff --git a/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c index 61626a7b91..ee53c8b1a6 100644 --- a/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c @@ -1295,8 +1295,7 @@ static int __init netif_init(void) { int err = 0; - if ( (xen_start_info.flags & SIF_INITDOMAIN) || - (xen_start_info.flags & SIF_NET_BE_DOMAIN) ) + if ( xen_start_info.flags & SIF_INITDOMAIN ) return 0; IPRINTK("Initialising virtual ethernet driver.\n"); diff --git a/tools/examples/Makefile b/tools/examples/Makefile index 46961f2951..ae65b6748f 100644 --- a/tools/examples/Makefile +++ b/tools/examples/Makefile @@ -28,20 +28,23 @@ all: install: all install-initd install-configs install-scripts install-initd: - $(INSTALL_DIR) $(DESTDIR)/etc/init.d + [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d install-configs: - $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) - $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto + [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \ + $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) + [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \ + $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto for i in $(XEN_CONFIGS); \ do [ -a $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \ $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \ done install-scripts: - $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) + [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \ + $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) for i in $(XEN_SCRIPTS); \ do [ -a $(DESTDIR)$(XEN_SCRIPT_DIR)/$$i ] || \ $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index ef41c2ed40..910a78dfb5 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -67,8 +67,8 @@ mk-symlinks: ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . ) install: all - $(INSTALL_DIR) $(DESTDIR)/usr/lib - $(INSTALL_DIR) $(DESTDIR)/usr/include + [ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) $(DESTDIR)/usr/lib + [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include $(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib ln -sf libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/libxc.so.$(MAJOR) ln -sf libxc.so.$(MAJOR) $(DESTDIR)/usr/lib/libxc.so diff --git a/tools/libxutil/Makefile b/tools/libxutil/Makefile index 1fb2da295d..12d67e199f 100644 --- a/tools/libxutil/Makefile +++ b/tools/libxutil/Makefile @@ -63,7 +63,7 @@ check-for-zlib: fi install: all - $(INSTALL_DIR) -p $(DESTDIR)/usr/lib + [ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/lib $(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR) ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so diff --git a/tools/misc/Makefile b/tools/misc/Makefile index b339e300db..4cfc16f58e 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -23,8 +23,8 @@ all: $(TARGETS) $(MAKE) -C miniterm install: all - $(INSTALL_DIR) $(DESTDIR)/usr/bin - $(INSTALL_DIR) $(DESTDIR)/usr/sbin + [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin + [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin # No sense in installing miniterm on the Xen box. diff --git a/tools/misc/miniterm/Makefile b/tools/misc/miniterm/Makefile index e85ee3738e..4051eb61de 100644 --- a/tools/misc/miniterm/Makefile +++ b/tools/misc/miniterm/Makefile @@ -9,7 +9,7 @@ TARGET = miniterm all: $(TARGET) install: all - $(INSTALL_DIR) $(DESTDIR)/usr/bin + [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin $(INSTALL_PROG) $(TARGET) $(DESTDIR)/usr/bin clean: diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 7ff5acdb3e..16a6437763 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -457,9 +457,9 @@ class XendDomainInfo: self.init_domain() self.configure_console() + self.configure_backends() self.construct_image() self.configure_restart() - self.configure_backends() deferred = self.configure() def cberr(err): self.destroy() diff --git a/tools/python/xen/xend/server/netif.py b/tools/python/xen/xend/server/netif.py index 9152c2abf4..d63c342435 100755 --- a/tools/python/xen/xend/server/netif.py +++ b/tools/python/xen/xend/server/netif.py @@ -140,7 +140,8 @@ class NetDev(controller.SplitDev): self.ipaddr = self._get_config_ipaddr(config) or [] try: - self.backendDomain = int(sxp.child_value(config, 'backend', '0')) + xd = get_component('xen.xend.XendDomain') + self.backendDomain = int(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id) except: raise XendError('invalid backend domain') @@ -161,7 +162,8 @@ class NetDev(controller.SplitDev): bridge = sxp.child_value(config, 'bridge') script = sxp.child_value(config, 'script') ipaddr = self._get_config_ipaddr(config) - backendDomain = sxp.child_value(config, 'backend', '0') + xd = get_component('xen.xend.XendDomain') + backendDomain = str(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id) if (mac is not None) and (mac != self.mac): raise XendError("cannot change mac") if (backendDomain is not None) and (backendDomain != str(self.backendDomain)): diff --git a/tools/sv/Makefile b/tools/sv/Makefile index c2b4e92dfc..4da91e0674 100755 --- a/tools/sv/Makefile +++ b/tools/sv/Makefile @@ -17,15 +17,17 @@ IMAGES += next.png previous.png finish.png install: # copy XenSV Main.rpy file - @$(INSTALL_DIR) $(DESTDIR)$(sv_insdir) + @[ -d $(DESTDIR)$(sv_insdir) ] || $(INSTALL_DIR) $(DESTDIR)$(sv_insdir) @$(INSTALL_DATA) Main.rpy $(DESTDIR)$(sv_insdir) # copy XenSV images - @$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/images + @[ -d $(DESTDIR)$(sv_insdir)/images ] || \ + $(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/images @(cd images && $(INSTALL_DATA) $(IMAGES) $(DESTDIR)$(sv_insdir)/images) # copy XenSV stylesheet - @$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/inc + @[ -d $(DESTDIR)$(sv_insdir)/inc ] || \ + $(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/inc @$(INSTALL_DATA) inc/style.css inc/script.js $(DESTDIR)$(sv_insdir)/inc clean: diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index 5fe6a9d61d..5ed26cf795 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -24,9 +24,11 @@ MAN8 = $(wildcard *.8) all: $(BIN) install: all - $(INSTALL_DIR) $(DESTDIR)/usr/bin - $(INSTALL_DIR) $(DESTDIR)/usr/man/man1 - $(INSTALL_DIR) $(DESTDIR)/usr/man/man8 + [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin + [ -d $(DESTDIR)/usr/man/man1 ] || \ + $(INSTALL_DIR) $(DESTDIR)/usr/man/man1 + [ -d $(DESTDIR)/usr/man/man8 ] || \ + $(INSTALL_DIR) $(DESTDIR)/usr/man/man8 $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/man/man1 $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/man/man8 diff --git a/tools/xfrd/Makefile b/tools/xfrd/Makefile index e986755140..4cdc810e95 100644 --- a/tools/xfrd/Makefile +++ b/tools/xfrd/Makefile @@ -70,7 +70,8 @@ xfrd: $(XFRD_PROG_OBJ) .PHONY: install install: xfrd - $(INSTALL_DIR) $(DESTDIR)$(XFRD_INSTALL_DIR) + [ -d $(DESTDIR)$(XFRD_INSTALL_DIR) ] || \ + $(INSTALL_DIR) $(DESTDIR)$(XFRD_INSTALL_DIR) $(INSTALL_PROG) xfrd $(DESTDIR)$(XFRD_INSTALL_DIR) .PHONY: libutil diff --git a/xen/Makefile b/xen/Makefile index f39634150c..2ecb7a9410 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -21,10 +21,11 @@ debug: objdump -D -S $(TARGET)-syms > $(TARGET).s install: $(TARGET).gz - $(INSTALL_DIR) $(DESTDIR)/boot + [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot - $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io + [ -d $(DESTDIR)/usr/include/xen/io ] || \ + $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen