direct-io.hg

changeset 3565:30ee9c427a5b

bitkeeper revision 1.1159.212.46 (41f952dcjUM7tDOqBgJxR2_d9qUROA)

Merge
author mwilli2@equilibrium.research
date Thu Jan 27 20:45:16 2005 +0000 (2005-01-27)
parents d295396360fb 2e60786262c4
children 9bef38a51377
files .rootkeys Makefile install.sh linux-2.6.10-xen-sparse/arch/xen/Kconfig linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c tools/Make.defs tools/Rules.mk tools/examples/Makefile tools/libxc/Makefile tools/libxutil/Makefile tools/misc/Makefile tools/misc/miniterm/Makefile tools/python/Makefile tools/python/xen/lowlevel/xu/xu.c tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/netif.py tools/sv/Makefile tools/vnet/vnetd/Makefile tools/x2d2/Makefile tools/xcs/Makefile tools/xentrace/Makefile tools/xfrd/Makefile xen/Makefile xen/Rules.mk
line diff
     1.1 --- a/.rootkeys	Wed Jan 26 13:09:50 2005 +0000
     1.2 +++ b/.rootkeys	Thu Jan 27 20:45:16 2005 +0000
     1.3 @@ -312,8 +312,8 @@ 413cb3b5eKxnzoodEqaWn2wrPnHWnA netbsd-2.
     1.4  413cb3b5F56TvQWAmO5TsuzhtzLFPQ netbsd-2.0-xen-sparse/sys/arch/xen/xen/xenkbc.c
     1.5  413cb3b53nyOv1OIeDSsCXhBFDXvJA netbsd-2.0-xen-sparse/sys/nfs/files.nfs
     1.6  413aa1d0oNP8HXLvfPuMe6cSroUfSA patches/linux-2.6.9/agpgart.patch
     1.7 -40e1b09db5mN69Ijj0X_Eol-S7dXiw tools/Make.defs
     1.8  3f776bd1Hy9rn69ntXBhPReUFw9IEA tools/Makefile
     1.9 +40e1b09db5mN69Ijj0X_Eol-S7dXiw tools/Rules.mk
    1.10  4124b307nRyK3dhn1hAsvrY76NuV3g tools/check/Makefile
    1.11  4124b307vHLUWbfpemVefmaWDcdfag tools/check/README
    1.12  4124b307jt7T3CHysgl9LijNHSe1tA tools/check/check_brctl
     2.1 --- a/Makefile	Wed Jan 26 13:09:50 2005 +0000
     2.2 +++ b/Makefile	Thu Jan 27 20:45:16 2005 +0000
     2.3 @@ -11,7 +11,7 @@ INSTALL_DIR	:= $(INSTALL) -d -m0755
     2.4  INSTALL_DATA	:= $(INSTALL) -m0644
     2.5  INSTALL_PROG	:= $(INSTALL) -m0755
     2.6  
     2.7 -KERNELS ?= *2.6*
     2.8 +KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
     2.9  # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
    2.10  # You may use wildcards in the above e.g. KERNELS=*2.4*
    2.11  
    2.12 @@ -21,23 +21,21 @@ XKERNELS := $(foreach kernel, $(KERNELS)
    2.13  
    2.14  export DESTDIR
    2.15  
    2.16 +# Export target architecture overrides to Xen and Linux sub-trees.
    2.17 +ifneq ($(TARGET_ARCH),)
    2.18 +SUBARCH := $(subst x86_32,i386,$(TARGET_ARCH))
    2.19 +export TARGET_ARCH SUBARCH
    2.20 +endif
    2.21 +
    2.22  include buildconfigs/Rules.mk
    2.23  
    2.24  .PHONY:	all dist install xen tools kernels docs world clean mkpatches mrproper
    2.25 -.PHONY:	kbuild kdelete kclean install-tools install-xen install-docs
    2.26 -.PHONY: install-kernels
    2.27 +.PHONY:	kbuild kdelete kclean
    2.28  
    2.29  all: dist
    2.30  
    2.31 -# install everything into the standard system directories
    2.32 -# NB: install explicitly does not check that everything is up to date!
    2.33 -install: DESTDIR=
    2.34 -install: xen checked-tools kernels docs
    2.35 -
    2.36 -# Only check for install req'mts on 'make install', not on 'make dist'.
    2.37 -checked-tools:
    2.38 -	$(MAKE) -C tools/check install
    2.39 -	$(MAKE) -C tools install
    2.40 +# build and install everything into the standard system directories
    2.41 +install: install-xen install-tools install-kernels install-docs
    2.42  
    2.43  # build and install everything into local dist directory
    2.44  dist: xen tools kernels docs
    2.45 @@ -112,9 +110,17 @@ install-iptables:
    2.46  	tar -jxf iptables-1.2.11.tar.bz2
    2.47  	$(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
    2.48  
    2.49 +install-%: DESTDIR=
    2.50 +install-%: %
    2.51 +	@: # do nothing
    2.52 +
    2.53  help:
    2.54  	@echo 'Installation targets:'
    2.55  	@echo '  install          - build and install everything'
    2.56 +	@echo '  install-xen      - build and install the Xen hypervisor'
    2.57 +	@echo '  install-tools    - build and install the control tools'
    2.58 +	@echo '  install-kernels  - build and install guest kernels'
    2.59 +	@echo '  install-docs     - build and install documentation'
    2.60  	@echo ''
    2.61  	@echo 'Building targets:'
    2.62  	@echo '  dist             - build and install everything into local dist directory'
    2.63 @@ -172,3 +178,4 @@ linux26:
    2.64  
    2.65  netbsd20:
    2.66  	$(MAKE) netbsd-2.0-xenU-build
    2.67 +
     3.1 --- a/install.sh	Wed Jan 26 13:09:50 2005 +0000
     3.2 +++ b/install.sh	Thu Jan 27 20:45:16 2005 +0000
     3.3 @@ -24,7 +24,7 @@ fi
     3.4  
     3.5  echo "Installing Xen from '$src' to '$dst'..."
     3.6  cd $src/boot
     3.7 -(echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read mv
     3.8 +(echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read m v
     3.9  do
    3.10    l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -n 1)
    3.11    [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0
     4.1 --- a/linux-2.6.10-xen-sparse/arch/xen/Kconfig	Wed Jan 26 13:09:50 2005 +0000
     4.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/Kconfig	Thu Jan 27 20:45:16 2005 +0000
     4.3 @@ -26,7 +26,7 @@ menu "XEN"
     4.4  config XEN_PRIVILEGED_GUEST
     4.5  	bool "Privileged Guest (domain 0)"
     4.6  	default n
     4.7 -        select XEN_PHYSDEV_ACCESS
     4.8 +	select XEN_PHYSDEV_ACCESS
     4.9  	help
    4.10  	  Support for privileged operation (domain 0)
    4.11  
    4.12 @@ -35,18 +35,18 @@ config XEN_PHYSDEV_ACCESS
    4.13  	default XEN_PRIVILEGED_GUEST
    4.14  	help
    4.15  	  Assume access is available to physical hardware devices
    4.16 -          (e.g., hard drives, network cards). This allows you to configure
    4.17 -          such devices and also includes some low-level support that is
    4.18 -          otherwise not compiled into the kernel.
    4.19 +	  (e.g., hard drives, network cards). This allows you to configure
    4.20 +	  such devices and also includes some low-level support that is
    4.21 +	  otherwise not compiled into the kernel.
    4.22  
    4.23  config XEN_BLKDEV_BACKEND
    4.24 -        bool "Block-device backend driver"
    4.25 -      depends on XEN_PHYSDEV_ACCESS
    4.26 -        default y
    4.27 -        help
    4.28 -          The block-device backend driver allows the kernel to export its
    4.29 -          block devices to other guests via a high-performance shared-memory
    4.30 -          interface.
    4.31 +	bool "Block-device backend driver"
    4.32 +	depends on XEN_PHYSDEV_ACCESS
    4.33 +	default y
    4.34 +	help
    4.35 +	  The block-device backend driver allows the kernel to export its
    4.36 +	  block devices to other guests via a high-performance shared-memory
    4.37 +	  interface.
    4.38  
    4.39  config XEN_BLKDEV_TAP_BE
    4.40          bool "Block Tap support for backend driver (DANGEROUS)"
    4.41 @@ -62,87 +62,86 @@ config XEN_BLKDEV_TAP_BE
    4.42            modified to use grant tables.
    4.43  
    4.44  config XEN_NETDEV_BACKEND
    4.45 -        bool "Network-device backend driver"
    4.46 -      depends on XEN_PHYSDEV_ACCESS
    4.47 -        default y
    4.48 -        help
    4.49 -          The network-device backend driver allows the kernel to export its
    4.50 -          network devices to other guests via a high-performance shared-memory
    4.51 -          interface.
    4.52 +	bool "Network-device backend driver"
    4.53 +	depends on XEN_PHYSDEV_ACCESS
    4.54 +	default y
    4.55 +	help
    4.56 +	  The network-device backend driver allows the kernel to export its
    4.57 +	  network devices to other guests via a high-performance shared-memory
    4.58 +	  interface.
    4.59  
    4.60  config XEN_BLKDEV_FRONTEND
    4.61 -        bool "Block-device frontend driver"
    4.62 -        default y
    4.63 -        help
    4.64 -          The block-device frontend driver allows the kernel to access block
    4.65 -          devices mounted within another guest OS. Unless you are building a
    4.66 -          dedicated device-driver domain, or your master control domain
    4.67 -          (domain 0), then you almost certainly want to say Y here.
    4.68 +	bool "Block-device frontend driver"
    4.69 +	default y
    4.70 +	help
    4.71 +	  The block-device frontend driver allows the kernel to access block
    4.72 +	  devices mounted within another guest OS. Unless you are building a
    4.73 +	  dedicated device-driver domain, or your master control domain
    4.74 +	  (domain 0), then you almost certainly want to say Y here.
    4.75  
    4.76  config XEN_NETDEV_FRONTEND
    4.77 -        bool "Network-device frontend driver"
    4.78 -        default y
    4.79 -        help
    4.80 -          The network-device frontend driver allows the kernel to access
    4.81 -          network interfaces within another guest OS. Unless you are building a
    4.82 -          dedicated device-driver domain, or your master control domain
    4.83 -          (domain 0), then you almost certainly want to say Y here.
    4.84 +	bool "Network-device frontend driver"
    4.85 +	default y
    4.86 +	help
    4.87 +	  The network-device frontend driver allows the kernel to access
    4.88 +	  network interfaces within another guest OS. Unless you are building a
    4.89 +	  dedicated device-driver domain, or your master control domain
    4.90 +	  (domain 0), then you almost certainly want to say Y here.
    4.91  
    4.92  config XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER
    4.93 -        bool "Pipelined transmitter (DANGEROUS)"
    4.94 +	bool "Pipelined transmitter (DANGEROUS)"
    4.95  	depends on XEN_NETDEV_FRONTEND
    4.96 -        default n
    4.97 -        help
    4.98 -          The driver will assume that the backend is pipelining packets for
    4.99 -          transmission: whenever packets are pending in the remote backend,
   4.100 -          the driver will not send asynchronous notifications when it queues
   4.101 -          additional packets for transmission.
   4.102 -          If the backend is a dumb domain, such as a transparent Ethernet
   4.103 -          bridge with no local IP interface, it is safe to say Y here to get
   4.104 -          slightly lower network overhead.
   4.105 -          If the backend has a local IP interface; or may be doing smart things
   4.106 -          like reassembling packets to perform firewall filtering; or if you
   4.107 -          are unsure; or if you experience network hangs when this option is
   4.108 -          enabled; then you must say N here.
   4.109 +	default n
   4.110 +	help
   4.111 +	  The driver will assume that the backend is pipelining packets for
   4.112 +	  transmission: whenever packets are pending in the remote backend,
   4.113 +	  the driver will not send asynchronous notifications when it queues
   4.114 +	  additional packets for transmission.
   4.115 +	  If the backend is a dumb domain, such as a transparent Ethernet
   4.116 +	  bridge with no local IP interface, it is safe to say Y here to get
   4.117 +	  slightly lower network overhead.
   4.118 +	  If the backend has a local IP interface; or may be doing smart things
   4.119 +	  like reassembling packets to perform firewall filtering; or if you
   4.120 +	  are unsure; or if you experience network hangs when this option is
   4.121 +	  enabled; then you must say N here.
   4.122  
   4.123  config XEN_BLKDEV_TAP
   4.124 -        bool "Block device tap driver"
   4.125 -        default n
   4.126 -        help
   4.127 -          This driver allows a VM to interact on block device channels
   4.128 -          to other VMs.  Block messages may be passed through or redirected
   4.129 -          to a character device, allowing device prototyping in application
   4.130 -          space.  Odds are that you want to say N here.
   4.131 -
   4.132 +	bool "Block device tap driver"
   4.133 +	default n
   4.134 +	help
   4.135 +	  This driver allows a VM to interact on block device channels
   4.136 +	  to other VMs.  Block messages may be passed through or redirected
   4.137 +	  to a character device, allowing device prototyping in application
   4.138 +	  space.  Odds are that you want to say N here.
   4.139  
   4.140  config XEN_WRITABLE_PAGETABLES
   4.141  	bool
   4.142  	default y
   4.143  
   4.144  config XEN_SCRUB_PAGES
   4.145 -        bool "Scrub memory before freeing it to Xen"
   4.146 -        default y
   4.147 -        help
   4.148 -          Erase memory contents before freeing it back to Xen's global
   4.149 -          pool. This ensures that any secrets contained within that
   4.150 -          memory (e.g., private keys) cannot be found by other guests that
   4.151 -          may be running on the machine. Most people will want to say Y here.
   4.152 -          If security is not a concern then you may increase performance by
   4.153 -          saying N.
   4.154 +	bool "Scrub memory before freeing it to Xen"
   4.155 +	default y
   4.156 +	help
   4.157 +	  Erase memory contents before freeing it back to Xen's global
   4.158 +	  pool. This ensures that any secrets contained within that
   4.159 +	  memory (e.g., private keys) cannot be found by other guests that
   4.160 +	  may be running on the machine. Most people will want to say Y here.
   4.161 +	  If security is not a concern then you may increase performance by
   4.162 +	  saying N.
   4.163  
   4.164  choice
   4.165 -        prompt "Processor Type"
   4.166 -        default X86
   4.167 +	prompt "Processor Type"
   4.168 +	default X86
   4.169  
   4.170  config X86
   4.171 -        bool "X86"
   4.172 -        help
   4.173 -          Choose this option if your computer is a X86 architecture.
   4.174 +	bool "X86"
   4.175 +	help
   4.176 +	  Choose this option if your computer is a X86 architecture.
   4.177  
   4.178  config X86_64
   4.179 -        bool "X86_64"
   4.180 -        help
   4.181 -          Choose this option if your computer is a X86 architecture.
   4.182 +	bool "X86_64"
   4.183 +	help
   4.184 +	  Choose this option if your computer is a X86 architecture.
   4.185  
   4.186  endchoice
   4.187  
     5.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c	Wed Jan 26 13:09:50 2005 +0000
     5.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c	Thu Jan 27 20:45:16 2005 +0000
     5.3 @@ -1295,8 +1295,7 @@ static int __init netif_init(void)
     5.4  {
     5.5      int err = 0;
     5.6  
     5.7 -    if ( (xen_start_info.flags & SIF_INITDOMAIN) ||
     5.8 -         (xen_start_info.flags & SIF_NET_BE_DOMAIN) )
     5.9 +    if ( xen_start_info.flags & SIF_INITDOMAIN )
    5.10          return 0;
    5.11  
    5.12      IPRINTK("Initialising virtual ethernet driver.\n");
     6.1 --- a/tools/Make.defs	Wed Jan 26 13:09:50 2005 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,4 +0,0 @@
     6.4 -#  -*- mode: Makefile; -*-
     6.5 -XEN_XC             = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
     6.6 -XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
     6.7 -XEN_LIBXUTIL       = $(XEN_ROOT)/tools/libxutil
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/tools/Rules.mk	Thu Jan 27 20:45:16 2005 +0000
     7.3 @@ -0,0 +1,15 @@
     7.4 +#  -*- mode: Makefile; -*-
     7.5 +
     7.6 +XEN_XC             = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
     7.7 +XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
     7.8 +XEN_LIBXUTIL       = $(XEN_ROOT)/tools/libxutil
     7.9 +
    7.10 +ifeq ($(TARGET_ARCH),x86_32)
    7.11 +CFLAGS  += -m32 -march=i686
    7.12 +LDFLAGS += -m elf_i386
    7.13 +endif
    7.14 +
    7.15 +ifeq ($(TARGET_ARCH),x86_64)
    7.16 +CFLAGS  += -m64
    7.17 +LDFLAGS += -m elf_x86_64
    7.18 +endif
     8.1 --- a/tools/examples/Makefile	Wed Jan 26 13:09:50 2005 +0000
     8.2 +++ b/tools/examples/Makefile	Thu Jan 27 20:45:16 2005 +0000
     8.3 @@ -28,20 +28,23 @@ all:
     8.4  install: all install-initd install-configs install-scripts
     8.5  
     8.6  install-initd:
     8.7 -	$(INSTALL_DIR) $(DESTDIR)/etc/init.d
     8.8 +	[ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
     8.9  	$(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
    8.10  	$(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
    8.11  
    8.12  install-configs:
    8.13 -	$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
    8.14 -	$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
    8.15 +	[ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
    8.16 +		$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
    8.17 +	[ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
    8.18 +		$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
    8.19  	for i in $(XEN_CONFIGS); \
    8.20  	    do [ -a $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
    8.21  	    $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
    8.22  	done
    8.23  
    8.24  install-scripts:
    8.25 -	$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
    8.26 +	[ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
    8.27 +		$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
    8.28  	for i in $(XEN_SCRIPTS); \
    8.29  	    do [ -a $(DESTDIR)$(XEN_SCRIPT_DIR)/$$i ] || \
    8.30  	    $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
     9.1 --- a/tools/libxc/Makefile	Wed Jan 26 13:09:50 2005 +0000
     9.2 +++ b/tools/libxc/Makefile	Thu Jan 27 20:45:16 2005 +0000
     9.3 @@ -10,7 +10,7 @@ SONAME   = libxc.so.$(MAJOR)
     9.4  CC       = gcc
     9.5  
     9.6  XEN_ROOT = ../..
     9.7 -include $(XEN_ROOT)/tools/Make.defs
     9.8 +include $(XEN_ROOT)/tools/Rules.mk
     9.9  
    9.10  vpath %c       $(XEN_LIBXUTIL)
    9.11  INCLUDES += -I $(XEN_LIBXUTIL)
    9.12 @@ -67,8 +67,8 @@ mk-symlinks:
    9.13  	  ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
    9.14  
    9.15  install: all
    9.16 -	$(INSTALL_DIR) $(DESTDIR)/usr/lib
    9.17 -	$(INSTALL_DIR) $(DESTDIR)/usr/include
    9.18 +	[ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) $(DESTDIR)/usr/lib
    9.19 +	[ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
    9.20  	$(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib
    9.21  	ln -sf libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/libxc.so.$(MAJOR)
    9.22  	ln -sf libxc.so.$(MAJOR) $(DESTDIR)/usr/lib/libxc.so
    10.1 --- a/tools/libxutil/Makefile	Wed Jan 26 13:09:50 2005 +0000
    10.2 +++ b/tools/libxutil/Makefile	Thu Jan 27 20:45:16 2005 +0000
    10.3 @@ -4,7 +4,7 @@ INSTALL_DATA	= $(INSTALL) -m0644
    10.4  INSTALL_PROG	= $(INSTALL) -m0755
    10.5  INSTALL_DIR	= $(INSTALL) -d -m0755
    10.6  
    10.7 -include $(XEN_ROOT)/tools/Make.defs
    10.8 +include $(XEN_ROOT)/tools/Rules.mk
    10.9  
   10.10  CC = gcc
   10.11  
   10.12 @@ -63,7 +63,7 @@ check-for-zlib:
   10.13  	fi
   10.14  
   10.15  install: all
   10.16 -	$(INSTALL_DIR) -p $(DESTDIR)/usr/lib
   10.17 +	[ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/lib
   10.18  	$(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib
   10.19  	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR)
   10.20  	ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
    11.1 --- a/tools/misc/Makefile	Wed Jan 26 13:09:50 2005 +0000
    11.2 +++ b/tools/misc/Makefile	Thu Jan 27 20:45:16 2005 +0000
    11.3 @@ -3,10 +3,10 @@ INSTALL_PROG	= $(INSTALL) -m0755
    11.4  INSTALL_DIR	= $(INSTALL) -d -m0755
    11.5  
    11.6  XEN_ROOT=../..
    11.7 -include $(XEN_ROOT)/tools/Make.defs
    11.8 +include $(XEN_ROOT)/tools/Rules.mk
    11.9  
   11.10 -CC         = gcc
   11.11 -CFLAGS     = -Wall -Werror -O3 
   11.12 +CC        = gcc
   11.13 +CFLAGS   += -Wall -Werror -O3 
   11.14  
   11.15  INCLUDES += -I $(XEN_XC)
   11.16  INCLUDES += -I $(XEN_LIBXC)
   11.17 @@ -23,11 +23,12 @@ all: $(TARGETS)
   11.18  	$(MAKE) -C miniterm
   11.19  
   11.20  install: all
   11.21 -	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   11.22 -	$(INSTALL_DIR) $(DESTDIR)/usr/sbin
   11.23 +	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
   11.24 +	[ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
   11.25  	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
   11.26  	$(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
   11.27 -	$(MAKE) -C miniterm install
   11.28 +#       No sense in installing miniterm on the Xen box.
   11.29 +#	$(MAKE) -C miniterm install
   11.30  
   11.31  clean:
   11.32  	$(RM) *.o $(TARGETS) *~
    12.1 --- a/tools/misc/miniterm/Makefile	Wed Jan 26 13:09:50 2005 +0000
    12.2 +++ b/tools/misc/miniterm/Makefile	Thu Jan 27 20:45:16 2005 +0000
    12.3 @@ -9,7 +9,7 @@ TARGET = miniterm
    12.4  all: $(TARGET)
    12.5  
    12.6  install: all
    12.7 -	$(INSTALL_DIR) $(DESTDIR)/usr/bin
    12.8 +	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
    12.9  	$(INSTALL_PROG) $(TARGET) $(DESTDIR)/usr/bin
   12.10  
   12.11  clean:
    13.1 --- a/tools/python/Makefile	Wed Jan 26 13:09:50 2005 +0000
    13.2 +++ b/tools/python/Makefile	Thu Jan 27 20:45:16 2005 +0000
    13.3 @@ -1,9 +1,12 @@
    13.4 +
    13.5 +XEN_ROOT = ../..
    13.6 +include $(XEN_ROOT)/tools/Rules.mk
    13.7  
    13.8  all:
    13.9 -	python setup.py build
   13.10 +	CFLAGS="$(CFLAGS)" python setup.py build
   13.11  
   13.12  install: all
   13.13 -	python setup.py install --home="$(DESTDIR)/usr"
   13.14 +	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr"
   13.15  
   13.16  clean:
   13.17  	rm -rf build *.pyc *.pyo *.o *.a *~
    14.1 --- a/tools/python/xen/lowlevel/xu/xu.c	Wed Jan 26 13:09:50 2005 +0000
    14.2 +++ b/tools/python/xen/lowlevel/xu/xu.c	Thu Jan 27 20:45:16 2005 +0000
    14.3 @@ -82,12 +82,12 @@ static int xcs_ctrl_fd = -1; /* control 
    14.4  static int xcs_data_fd = -1; /*    data connection to the xcs server. */
    14.5  static u32 xcs_session_id = 0;
    14.6  
    14.7 -int xcs_ctrl_send(xcs_msg_t *msg);
    14.8 -int xcs_ctrl_read(xcs_msg_t *msg);
    14.9 -int xcs_data_send(xcs_msg_t *msg);
   14.10 -int xcs_data_read(xcs_msg_t *msg);
   14.11 +static int xcs_ctrl_send(xcs_msg_t *msg);
   14.12 +static int xcs_ctrl_read(xcs_msg_t *msg);
   14.13 +static int xcs_data_send(xcs_msg_t *msg);
   14.14 +static int xcs_data_read(xcs_msg_t *msg);
   14.15  
   14.16 -int xcs_connect(char *ip, short port)
   14.17 +static int xcs_connect(char *ip, short port)
   14.18  {
   14.19      struct sockaddr_in addr;
   14.20      int ret, flags;
   14.21 @@ -170,22 +170,6 @@ int xcs_connect(char *ip, short port)
   14.22          goto data_fd_fail;
   14.23      }
   14.24      
   14.25 -    /* Haven't put type binding hooks into Xend yet. */
   14.26 -    /* for now, register for everything:             */
   14.27 -    /*
   14.28 -    msg.type = XCS_MSG_BIND;
   14.29 -    msg.u.bind.port = PORT_WILDCARD;
   14.30 -    msg.u.bind.type = TYPE_WILDCARD;
   14.31 -    xcs_ctrl_send(&msg);
   14.32 -    xcs_ctrl_read(&msg);
   14.33 -    
   14.34 -    if (msg.result != XCS_RSLT_OK)
   14.35 -    {
   14.36 -        printf("error binding!\n");
   14.37 -        goto data_fd_fail;
   14.38 -    }
   14.39 -    printf("successfully connected to xcs.\n");
   14.40 -    */
   14.41      return 0;
   14.42  
   14.43  data_fd_fail: 
   14.44 @@ -201,66 +185,43 @@ fail:
   14.45      
   14.46  }
   14.47  
   14.48 -void xcs_disconnect(void)
   14.49 +static void xcs_disconnect(void)
   14.50  {
   14.51 -    printf("xcs_disconnect called!\n");
   14.52      close(xcs_data_fd);
   14.53      xcs_data_fd = -1;
   14.54      close(xcs_ctrl_fd);
   14.55      xcs_ctrl_fd = -1;
   14.56  }
   14.57  
   14.58 -int xcs_ctrl_read(xcs_msg_t *msg)
   14.59 +static int xcs_ctrl_read(xcs_msg_t *msg)
   14.60  {
   14.61      int ret;
   14.62      
   14.63      ret = read(xcs_ctrl_fd, msg, sizeof(xcs_msg_t));
   14.64 -    if (ret != sizeof(xcs_msg_t)) {
   14.65 -        printf("xu-xcs: ctrl read error (%d)\n", errno);
   14.66 -        /* TODO: set xcs_fd to -1 if the connection has been dropped. */
   14.67 -    } else {
   14.68 -        printf("xu-xcs: read! fd: %d, type: %u\n", xcs_ctrl_fd, msg->type);
   14.69 -    }
   14.70      return ret;
   14.71  }
   14.72  
   14.73 -int xcs_ctrl_send(xcs_msg_t *msg)
   14.74 +static int xcs_ctrl_send(xcs_msg_t *msg)
   14.75  {
   14.76      int ret;
   14.77      
   14.78      ret = send(xcs_ctrl_fd, msg, sizeof(xcs_msg_t), 0);
   14.79 -    if (ret != sizeof(xcs_msg_t) )
   14.80 -    {
   14.81 -        printf("xu-xcs: ctrl send error(%d)\n", errno);
   14.82 -        /* TODO: set xcs_fd to -1 if the connection has been dropped. */
   14.83 -    } else {
   14.84 -        printf("xu-xcs: sent! fd: %d, type: %u\n", xcs_ctrl_fd, msg->type);
   14.85 -    }
   14.86      return ret;
   14.87  }
   14.88  
   14.89 -int xcs_data_read(xcs_msg_t *msg)
   14.90 +static int xcs_data_read(xcs_msg_t *msg)
   14.91  {
   14.92      int ret;
   14.93      
   14.94      ret = read(xcs_data_fd, msg, sizeof(xcs_msg_t));
   14.95 -    if (ret != sizeof(xcs_msg_t)) {
   14.96 -        printf("xu-xcs: ctrl read error (%d)\n", errno);
   14.97 -        /* TODO: set xcs_fd to -1 if the connection has been dropped. */
   14.98 -    }
   14.99      return ret;
  14.100  }
  14.101  
  14.102 -int xcs_data_send(xcs_msg_t *msg)
  14.103 +static int xcs_data_send(xcs_msg_t *msg)
  14.104  {
  14.105      int ret;
  14.106      
  14.107      ret = send(xcs_data_fd, msg, sizeof(xcs_msg_t), 0);
  14.108 -    if (ret != sizeof(xcs_msg_t) )
  14.109 -    {
  14.110 -        printf("xu-xcs: ctrl send error(%d)\n", errno);
  14.111 -        /* TODO: set xcs_fd to -1 if the connection has been dropped. */
  14.112 -    }
  14.113      return ret;
  14.114  }
  14.115  
  14.116 @@ -302,7 +263,6 @@ static PyObject *xu_notifier_read(PyObje
  14.117  
  14.118      if ( !PyArg_ParseTuple(args, "") )
  14.119          return NULL;
  14.120 -    printf("xu_notifier_read()\n");
  14.121           
  14.122      while ((!REQ_RING_FULL) && (!RSP_RING_FULL))
  14.123      {
  14.124 @@ -318,7 +278,7 @@ static PyObject *xu_notifier_read(PyObje
  14.125                  break;
  14.126              return PyErr_SetFromErrno(PyExc_IOError);
  14.127          }
  14.128 -        printf("notifier got msg type %u\n", ent->msg.type);
  14.129 +        
  14.130          switch (ent->msg.type)
  14.131          {
  14.132          case XCS_REQUEST:
  14.133 @@ -337,26 +297,21 @@ static PyObject *xu_notifier_read(PyObje
  14.134              return PyInt_FromLong(ret);
  14.135  
  14.136          default:
  14.137 -            printf("Throwing away xcs msg type: %u\n", ent->msg.type);
  14.138 +            /*printf("Throwing away xcs msg type: %u\n", ent->msg.type);*/
  14.139              free(ent);
  14.140          }
  14.141      }
  14.142      
  14.143      if (!REQ_RING_EMPTY) 
  14.144      {
  14.145 -        printf("nfy: req: %d\n", 
  14.146 -                REQ_RING_ENT(req_cons)->msg.u.control.local_port);
  14.147          return PyInt_FromLong(REQ_RING_ENT(req_cons)->msg.u.control.local_port); 
  14.148      }
  14.149      
  14.150      if (!RSP_RING_EMPTY) 
  14.151      {
  14.152 -        printf("nfy: rsp: %d\n", 
  14.153 -                RSP_RING_ENT(rsp_cons)->msg.u.control.local_port);
  14.154          return PyInt_FromLong(RSP_RING_ENT(rsp_cons)->msg.u.control.local_port); 
  14.155      }
  14.156      
  14.157 -    printf("nfy: returning None\n");
  14.158      Py_INCREF(Py_None);
  14.159      return Py_None;
  14.160  }
  14.161 @@ -484,7 +439,6 @@ static PyObject *xu_notifier_new(PyObjec
  14.162      xu_notifier_object *xun;
  14.163      int i;
  14.164  
  14.165 -printf("xu_notifier_new()\n");
  14.166      if ( !PyArg_ParseTuple(args, "") )
  14.167          return NULL;
  14.168  
  14.169 @@ -506,6 +460,7 @@ static PyObject *xu_notifier_getattr(PyO
  14.170  
  14.171  static void xu_notifier_dealloc(PyObject *self)
  14.172  {
  14.173 +    xcs_disconnect();
  14.174      PyObject_Del(self);
  14.175  }
  14.176  
  14.177 @@ -1119,9 +1074,6 @@ static PyObject *xu_port_read_request(Py
  14.178      if ((ent == NULL) ||
  14.179          (ent->msg.u.control.remote_dom != xup->remote_dom)) 
  14.180          goto none;
  14.181 -    
  14.182 -printf("read request (%d:%d)\n", ent->msg.u.control.msg.type, 
  14.183 -        ent->msg.u.control.msg.subtype);
  14.184  
  14.185      cmsg = &ent->msg.u.control.msg;
  14.186      xum = PyObject_New(xu_message_object, &xu_message_type);
  14.187 @@ -1138,7 +1090,6 @@ printf("read request (%d:%d)\n", ent->ms
  14.188      return (PyObject *)xum;
  14.189      
  14.190  none:
  14.191 -printf("read request - NO REQUEST!\n");
  14.192      Py_INCREF(Py_None);
  14.193      return Py_None;
  14.194      
  14.195 @@ -1187,9 +1138,6 @@ static PyObject *xu_port_read_response(P
  14.196      if ((ent == NULL) ||
  14.197          (ent->msg.u.control.remote_dom != xup->remote_dom))
  14.198           goto none;
  14.199 -    
  14.200 -printf("read response (%d:%d)\n", ent->msg.u.control.msg.type, 
  14.201 -        ent->msg.u.control.msg.subtype);
  14.202  
  14.203      cmsg = &ent->msg.u.control.msg;
  14.204      xum = PyObject_New(xu_message_object, &xu_message_type);
  14.205 @@ -1206,7 +1154,6 @@ printf("read response (%d:%d)\n", ent->m
  14.206      return (PyObject *)xum;
  14.207      
  14.208  none:
  14.209 -printf("read response - NO RESPONSE!\n");
  14.210      Py_INCREF(Py_None);
  14.211      return Py_None;
  14.212      
  14.213 @@ -1242,8 +1189,7 @@ static PyObject *xu_port_request_to_read
  14.214      xcs_msg_ent_t    *ent;
  14.215      int               found = 0;
  14.216      unsigned          i;
  14.217 -
  14.218 -printf("xu_port_request_to_read()\n");    
  14.219 +  
  14.220      if ( !PyArg_ParseTuple(args, "") )
  14.221          return NULL;
  14.222  
  14.223 @@ -1274,8 +1220,7 @@ static PyObject *xu_port_response_to_rea
  14.224      xcs_msg_ent_t    *ent;
  14.225      int               found = 0;
  14.226      unsigned          i;
  14.227 -
  14.228 -printf("xu_port_response_to_read()\n");    
  14.229 +  
  14.230      if ( !PyArg_ParseTuple(args, "") )
  14.231          return NULL;
  14.232  
  14.233 @@ -1327,9 +1272,6 @@ static PyObject *xu_port_register(PyObje
  14.234                                        &type) )
  14.235          return NULL;
  14.236      
  14.237 -    printf("REGISTER  : Dom: %3d  Port: %3d  Type:%3d\n",
  14.238 -        xup->remote_dom, xup->local_port, type);
  14.239 -    
  14.240      msg.type = XCS_MSG_BIND;
  14.241      msg.u.bind.port = xup->local_port;
  14.242      msg.u.bind.type = type;
  14.243 @@ -1338,7 +1280,6 @@ static PyObject *xu_port_register(PyObje
  14.244      
  14.245      if (msg.result != XCS_RSLT_OK)
  14.246      {
  14.247 -        printf("          : REGISTRATION FAILED! (%d)\n", msg.result);
  14.248          return PyInt_FromLong(0);
  14.249      }
  14.250      
  14.251 @@ -1357,9 +1298,6 @@ static PyObject *xu_port_deregister(PyOb
  14.252                                        &type) )
  14.253          return NULL;
  14.254      
  14.255 -    printf("DEREGISTER: Dom: %3d  Port: %3d  Type:%3d\n",
  14.256 -        xup->remote_dom, xup->local_port, type);
  14.257 -    
  14.258      msg.type = XCS_MSG_UNBIND;
  14.259      msg.u.bind.port = xup->local_port;
  14.260      msg.u.bind.type = type;
  14.261 @@ -1368,7 +1306,6 @@ static PyObject *xu_port_deregister(PyOb
  14.262      
  14.263      if (msg.result != XCS_RSLT_OK)
  14.264      {
  14.265 -        printf("          : DEREGISTRATION FAILED! (%d)\n", msg.result);
  14.266          return PyInt_FromLong(0);
  14.267      }
  14.268      
    15.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Jan 26 13:09:50 2005 +0000
    15.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Jan 27 20:45:16 2005 +0000
    15.3 @@ -457,9 +457,9 @@ class XendDomainInfo:
    15.4  
    15.5              self.init_domain()
    15.6              self.configure_console()
    15.7 +            self.configure_backends()
    15.8              self.construct_image()
    15.9              self.configure_restart()
   15.10 -            self.configure_backends()
   15.11              deferred = self.configure()
   15.12              def cberr(err):
   15.13                  self.destroy()
    16.1 --- a/tools/python/xen/xend/server/netif.py	Wed Jan 26 13:09:50 2005 +0000
    16.2 +++ b/tools/python/xen/xend/server/netif.py	Thu Jan 27 20:45:16 2005 +0000
    16.3 @@ -140,7 +140,8 @@ class NetDev(controller.SplitDev):
    16.4          self.ipaddr = self._get_config_ipaddr(config) or []
    16.5          
    16.6          try:
    16.7 -            self.backendDomain = int(sxp.child_value(config, 'backend', '0'))
    16.8 +            xd = get_component('xen.xend.XendDomain')
    16.9 +            self.backendDomain = int(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id)
   16.10          except:
   16.11              raise XendError('invalid backend domain')
   16.12  
   16.13 @@ -161,7 +162,8 @@ class NetDev(controller.SplitDev):
   16.14          bridge = sxp.child_value(config, 'bridge')
   16.15          script = sxp.child_value(config, 'script')
   16.16          ipaddr = self._get_config_ipaddr(config)
   16.17 -        backendDomain = sxp.child_value(config, 'backend', '0')
   16.18 +        xd = get_component('xen.xend.XendDomain')
   16.19 +        backendDomain = str(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id)
   16.20          if (mac is not None) and (mac != self.mac):
   16.21              raise XendError("cannot change mac")
   16.22          if (backendDomain is not None) and (backendDomain != str(self.backendDomain)):
    17.1 --- a/tools/sv/Makefile	Wed Jan 26 13:09:50 2005 +0000
    17.2 +++ b/tools/sv/Makefile	Thu Jan 27 20:45:16 2005 +0000
    17.3 @@ -17,15 +17,17 @@ IMAGES	+= next.png previous.png finish.p
    17.4  
    17.5  install:
    17.6  	# copy XenSV Main.rpy file
    17.7 -	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)
    17.8 +	@[ -d $(DESTDIR)$(sv_insdir) ] || $(INSTALL_DIR) $(DESTDIR)$(sv_insdir)
    17.9  	@$(INSTALL_DATA) Main.rpy $(DESTDIR)$(sv_insdir)
   17.10  
   17.11  	# copy XenSV images
   17.12 -	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/images
   17.13 +	@[ -d $(DESTDIR)$(sv_insdir)/images ] || \
   17.14 +		$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/images
   17.15  	@(cd images && $(INSTALL_DATA) $(IMAGES) $(DESTDIR)$(sv_insdir)/images)
   17.16  
   17.17  	# copy XenSV stylesheet
   17.18 -	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/inc
   17.19 +	@[ -d $(DESTDIR)$(sv_insdir)/inc ] || \
   17.20 +		$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/inc
   17.21  	@$(INSTALL_DATA) inc/style.css inc/script.js $(DESTDIR)$(sv_insdir)/inc
   17.22  
   17.23  clean:
    18.1 --- a/tools/vnet/vnetd/Makefile	Wed Jan 26 13:09:50 2005 +0000
    18.2 +++ b/tools/vnet/vnetd/Makefile	Thu Jan 27 20:45:16 2005 +0000
    18.3 @@ -21,7 +21,7 @@ all: vnetd
    18.4  #----------------------------------------------------------------------------
    18.5  
    18.6  XEN_ROOT  = ../../..
    18.7 -include $(XEN_ROOT)/tools/Make.defs
    18.8 +include $(XEN_ROOT)/tools/Rules.mk
    18.9  
   18.10  VNETD_INSTALL_DIR = /usr/sbin
   18.11  
    19.1 --- a/tools/x2d2/Makefile	Wed Jan 26 13:09:50 2005 +0000
    19.2 +++ b/tools/x2d2/Makefile	Thu Jan 27 20:45:16 2005 +0000
    19.3 @@ -1,8 +1,8 @@
    19.4  XEN_ROOT=../..
    19.5 -include $(XEN_ROOT)/tools/Make.defs
    19.6 +include $(XEN_ROOT)/tools/Rules.mk
    19.7  
    19.8  CC       = gcc
    19.9 -CFLAGS   = -Wall -Werror -O3 -fno-strict-aliasing
   19.10 +CFLAGS  += -Wall -Werror -O3 -fno-strict-aliasing
   19.11  
   19.12  CFLAGS  += -I $(XEN_XC)
   19.13  CFLAGS  += -I $(XEN_LIBXC)
    20.1 --- a/tools/xcs/Makefile	Wed Jan 26 13:09:50 2005 +0000
    20.2 +++ b/tools/xcs/Makefile	Thu Jan 27 20:45:16 2005 +0000
    20.3 @@ -2,7 +2,7 @@
    20.4  # Andrew Warfield, 2004
    20.5  
    20.6  XEN_ROOT=../..
    20.7 -include $(XEN_ROOT)/tools/Make.defs
    20.8 +include $(XEN_ROOT)/tools/Rules.mk
    20.9  
   20.10  XCS_INSTALL_DIR = /usr/sbin
   20.11  
    21.1 --- a/tools/xentrace/Makefile	Wed Jan 26 13:09:50 2005 +0000
    21.2 +++ b/tools/xentrace/Makefile	Thu Jan 27 20:45:16 2005 +0000
    21.3 @@ -4,10 +4,10 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    21.4  INSTALL_DATA	= $(INSTALL) -m0644
    21.5  
    21.6  XEN_ROOT=../..
    21.7 -include $(XEN_ROOT)/tools/Make.defs
    21.8 +include $(XEN_ROOT)/tools/Rules.mk
    21.9  
   21.10  CC       = gcc
   21.11 -CFLAGS   = -Wall -Werror -O3
   21.12 +CFLAGS  += -Wall -Werror -O3
   21.13  
   21.14  CFLAGS  += -I $(XEN_XC)
   21.15  CFLAGS  += -I $(XEN_LIBXC)
   21.16 @@ -24,9 +24,11 @@ MAN8     = $(wildcard *.8)
   21.17  all: $(BIN)
   21.18  
   21.19  install: all
   21.20 -	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   21.21 -	$(INSTALL_DIR) $(DESTDIR)/usr/man/man1
   21.22 -	$(INSTALL_DIR) $(DESTDIR)/usr/man/man8
   21.23 +	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
   21.24 +	[ -d $(DESTDIR)/usr/man/man1 ] || \
   21.25 +		$(INSTALL_DIR) $(DESTDIR)/usr/man/man1
   21.26 +	[ -d $(DESTDIR)/usr/man/man8 ] || \
   21.27 +		$(INSTALL_DIR) $(DESTDIR)/usr/man/man8
   21.28  	$(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
   21.29  	$(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/man/man1
   21.30  	$(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/man/man8
    22.1 --- a/tools/xfrd/Makefile	Wed Jan 26 13:09:50 2005 +0000
    22.2 +++ b/tools/xfrd/Makefile	Thu Jan 27 20:45:16 2005 +0000
    22.3 @@ -9,7 +9,7 @@ INSTALL_PROG	= $(INSTALL) -m0755
    22.4  INSTALL_DIR	= $(INSTALL) -d -m0755
    22.5  
    22.6  XEN_ROOT  = ../..
    22.7 -include $(XEN_ROOT)/tools/Make.defs
    22.8 +include $(XEN_ROOT)/tools/Rules.mk
    22.9  
   22.10  XFRD_INSTALL_DIR = /usr/sbin
   22.11  
   22.12 @@ -70,7 +70,8 @@ xfrd: $(XFRD_PROG_OBJ)
   22.13  
   22.14  .PHONY: install
   22.15  install: xfrd
   22.16 -	$(INSTALL_DIR) $(DESTDIR)$(XFRD_INSTALL_DIR)
   22.17 +	[ -d $(DESTDIR)$(XFRD_INSTALL_DIR) ] || \
   22.18 +		$(INSTALL_DIR) $(DESTDIR)$(XFRD_INSTALL_DIR)
   22.19  	$(INSTALL_PROG) xfrd $(DESTDIR)$(XFRD_INSTALL_DIR)
   22.20  
   22.21  .PHONY: libutil
    23.1 --- a/xen/Makefile	Wed Jan 26 13:09:50 2005 +0000
    23.2 +++ b/xen/Makefile	Thu Jan 27 20:45:16 2005 +0000
    23.3 @@ -21,10 +21,11 @@ debug:
    23.4  	objdump -D -S $(TARGET)-syms > $(TARGET).s
    23.5  
    23.6  install: $(TARGET).gz
    23.7 -	$(INSTALL_DIR) $(DESTDIR)/boot
    23.8 +	[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
    23.9  	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot
   23.10  	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot
   23.11 -	$(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
   23.12 +	[ -d $(DESTDIR)/usr/include/xen/io ] || \
   23.13 +		$(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
   23.14  	$(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
   23.15  	$(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
   23.16  	$(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
    24.1 --- a/xen/Rules.mk	Wed Jan 26 13:09:50 2005 +0000
    24.2 +++ b/xen/Rules.mk	Thu Jan 27 20:45:16 2005 +0000
    24.3 @@ -6,14 +6,15 @@ perfc       ?= n
    24.4  trace       ?= n
    24.5  optimize    ?= y
    24.6  
    24.7 -# Currently supported architectures:
    24.8 -#  {COMPILE,TARGET}_ARCH    := x86
    24.9 -#  {COMPILE,TARGET}_SUBARCH := x86_32 | x86_64
   24.10 -COMPILE_ARCH    := x86
   24.11 -COMPILE_SUBARCH := $(shell uname -m | sed -e s/i.86/x86_32/)
   24.12 +# Currently supported architectures: x86_32, x86_64
   24.13 +COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/)
   24.14 +TARGET_ARCH     ?= $(COMPILE_ARCH)
   24.15  
   24.16 -TARGET_ARCH     ?= $(COMPILE_ARCH)
   24.17 -TARGET_SUBARCH  ?= $(COMPILE_SUBARCH)
   24.18 +# Set ARCH/SUBARCH appropriately.
   24.19 +COMPILE_SUBARCH := $(COMPILE_ARCH)
   24.20 +TARGET_SUBARCH  := $(COMPILE_ARCH)
   24.21 +COMPILE_ARCH    := $(patsubst x86%,x86,$(COMPILE_ARCH))
   24.22 +TARGET_ARCH     := $(patsubst x86%,x86,$(TARGET_ARCH))
   24.23  
   24.24  TARGET  := $(BASEDIR)/xen
   24.25  HDRS    := $(wildcard $(BASEDIR)/include/xen/*.h)