ia64/xen-unstable

changeset 972:895f1ca085a7

bitkeeper revision 1.626 (3fbe3eb1WmztnxBIFxm56r8gAVwZig)

Many files:
Some fixes. Also now have a new Makefile target 'dist' which installs stuff to local install directory. Target 'install' now actually does what you expect by installing under /usr
xi_stopdom.py:
Rename: tools/misc/xi_stopdom.py -> tools/examples/xi_stopdom.py
xi_listdoms.py:
Rename: tools/misc/xi_listdoms.py -> tools/examples/xi_listdoms.py
xi_destroydom.py:
Rename: tools/misc/xi_destroydom.py -> tools/examples/xi_destroydom.py
xi_createlinuxdom.py:
Rename: tools/misc/xi_createlinuxdom.py -> tools/examples/xi_createlinuxdom.py
author kaf24@scramble.cl.cam.ac.uk
date Fri Nov 21 16:34:57 2003 +0000 (2003-11-21)
parents b5c1b4c684f2
children 9c7b2b238a29
files .rootkeys Makefile docs/Xeno-HOWTO tools/Makefile tools/balloon/Makefile tools/examples/xi_createlinuxdom.py tools/examples/xi_destroydom.py tools/examples/xi_listdoms.py tools/examples/xi_stopdom.py tools/misc/Makefile tools/misc/miniterm/Makefile tools/misc/xen-clone tools/misc/xi_createlinuxdom.py tools/misc/xi_destroydom.py tools/misc/xi_listdoms.py tools/misc/xi_stopdom.py tools/xc/Makefile tools/xc/lib/Makefile tools/xc/py/Makefile xen/Makefile xen/include/xeno/event.h xenolinux-2.4.22-sparse/arch/xeno/Makefile
line diff
     1.1 --- a/.rootkeys	Fri Nov 21 15:28:25 2003 +0000
     1.2 +++ b/.rootkeys	Fri Nov 21 16:34:57 2003 +0000
     1.3 @@ -39,6 +39,10 @@ 3f776bd1Hy9rn69ntXBhPReUFw9IEA tools/Mak
     1.4  3e6377b24eQqYMsDi9XrFkIgTzZ47A tools/balloon/Makefile
     1.5  3e6377d6eiFjF1hHIS6JEIOFk62xSA tools/balloon/README
     1.6  3e6377dbGcgnisKw16DPCaND7oGO3Q tools/balloon/balloon.c
     1.7 +3fbe2f12OPAkzIUtumU3wRAihnhocQ tools/examples/xi_createlinuxdom.py
     1.8 +3fbe2f12dZbmXLlgQdMgkmnSUj23AQ tools/examples/xi_destroydom.py
     1.9 +3fbe2f12ltvweb13kBSsxqzZDAq4sg tools/examples/xi_listdoms.py
    1.10 +3fbe2f12Bnt8mwmr1ZCP6HWGS6yvYw tools/examples/xi_stopdom.py
    1.11  3f776bd2Xd-dUcPKlPN2vG89VGtfvQ tools/misc/Makefile
    1.12  3f6dc136ZKOjd8PIqLbFBl_v-rnkGg tools/misc/miniterm/Makefile
    1.13  3f6dc140C8tAeBfroAF24VrmCS4v_w tools/misc/miniterm/README
    1.14 @@ -53,10 +57,6 @@ 3f13d81eQ9Vz-h-6RDGFkNR9CRP95g tools/mis
    1.15  3f13d81e6Z6806ihYYUw8GVKNkYnuw tools/misc/xen_nat_enable.README
    1.16  3f1668d4F29Jsw0aC0bJEIkOBiagiQ tools/misc/xen_read_console.c
    1.17  3f87ba90EUVPQLVOlFG0sW89BCwouQ tools/misc/xen_refresh_dev.c
    1.18 -3fbe2f12OPAkzIUtumU3wRAihnhocQ tools/misc/xi_createlinuxdom.py
    1.19 -3fbe2f12dZbmXLlgQdMgkmnSUj23AQ tools/misc/xi_destroydom.py
    1.20 -3fbe2f12ltvweb13kBSsxqzZDAq4sg tools/misc/xi_listdoms.py
    1.21 -3fbe2f12Bnt8mwmr1ZCP6HWGS6yvYw tools/misc/xi_stopdom.py
    1.22  3fbca441SjQr8vJwTQIgH1laysaWog tools/xc/Makefile
    1.23  3fbba6dbDfYvJSsw9500b4SZyUhxjQ tools/xc/lib/Makefile
    1.24  3fbba6dbEVkVMX0JuDFzap9jeaucGA tools/xc/lib/libxc_bvtsched.c
     2.1 --- a/Makefile	Fri Nov 21 15:28:25 2003 +0000
     2.2 +++ b/Makefile	Fri Nov 21 16:34:57 2003 +0000
     2.3 @@ -1,21 +1,11 @@
     2.4 -#
     2.5 +
     2.6  # Grand Unified Makefile for Xen.
     2.7  #
     2.8 -# Keir Fraser, 6/5/2003
     2.9 -#
    2.10  # Builds everything except Xenolinux:
    2.11  #  cd xenolinux-<version>-sparse
    2.12  #  ./mkbuildtree <build dir>
    2.13  #  cd <build dir> && make oldconfig && make dep && make bzImage
    2.14  #  (<build dir> should be a vanilla linux tree with matching version)
    2.15 -#
    2.16 -# If you get errors in tools/domctl or tools/vdmanager, then you need
    2.17 -# the latest Java 2 SDK on your execution path: <http://java.sun.com>
    2.18 -# Also, you will need Apache's 'ant' build tool: <http://ant.apache.org>
    2.19 -#
    2.20 -# If you received this source as part of a Xen release, you should find
    2.21 -# that appropriate versions of the build tools are already installed in
    2.22 -# the initial system setup.
    2.23  
    2.24  all:	
    2.25  	$(MAKE) -C xen
    2.26 @@ -25,6 +15,10 @@ install: all
    2.27  	$(MAKE) -C xen install
    2.28  	$(MAKE) -C tools install
    2.29  
    2.30 +dist: all
    2.31 +	$(MAKE) -C xen dist
    2.32 +	$(MAKE) -C tools dist
    2.33 +
    2.34  clean:
    2.35  	$(MAKE) -C xen clean
    2.36  	$(MAKE) -C tools clean
     3.1 --- a/docs/Xeno-HOWTO	Fri Nov 21 15:28:25 2003 +0000
     3.2 +++ b/docs/Xeno-HOWTO	Fri Nov 21 16:34:57 2003 +0000
     3.3 @@ -17,16 +17,15 @@ To fetch a local copy, first download th
     3.4  http://www.bitmover.com/download with username 'bitkeeper' and
     3.5  password 'get bitkeeper'.
     3.6  
     3.7 -Then install it and run:
     3.8 -# cd /
     3.9 +Then install the tools and then run:
    3.10  # bk clone bk://xen.bkbits.net/xeno-1.1.bk
    3.11  
    3.12  Under your current directory, a new directory named 'xeno-1.1.bk' has
    3.13  been created, which contains all the source codes for Xen and
    3.14 -XenoLinux. Here we suppose you put it under '/'.
    3.15 +XenoLinux. 
    3.16  
    3.17  To get newest changes to the repository, run
    3.18 -# cd /xeno-1.1.bk
    3.19 +# cd xeno-1.1.bk
    3.20  # bk pull
    3.21  
    3.22  
    3.23 @@ -39,7 +38,7 @@ used to clone the repostitory and perfor
    3.24  
    3.25  To build Xen manually:
    3.26  
    3.27 -# cd /xeno-1.1.bk/xen
    3.28 +# cd xeno-1.1.bk/xen
    3.29  # make clean
    3.30  # make
    3.31  
    3.32 @@ -47,8 +46,13 @@ This will (should) produce a file called
    3.33  directory.  This is the ELF 32-bit LSB executable file of Xen.  You
    3.34  can also find a gzip version, named 'image.gz'.
    3.35  
    3.36 -Hint: There is a 'make install' rule which also and then copies it to
    3.37 -../../install ; if this suits your setup, go for it.
    3.38 +To install the built files on your Xenoserver under /usr, type 'make
    3.39 +install' at the root of the BK repository. You will need to be root to
    3.40 +do this!
    3.41 +
    3.42 +Hint: There is also a 'make dist' rule which copies built files to an
    3.43 +install directory just outside the BK repo; if this suits your setup,
    3.44 +go for it.
    3.45  
    3.46  
    3.47  Build XenoLinux
    3.48 @@ -111,9 +115,11 @@ have zlib and devlopment headers install
    3.49  least Python v2.2. 
    3.50  
    3.51  'make install' in the tools directory will place executables and
    3.52 -libraries in an install directory immediately outside you local
    3.53 -repository. NOTE: the installation of the Python modules may need root
    3.54 -privileges if you are not using a personal installation of Python.
    3.55 +libraries in /usr/bin and /usr/lib. You will need to be root to do this!
    3.56 +
    3.57 +As noted earlier, 'make dist' installs files to a local 'install'
    3.58 +directory just outside the BK repository. These files will then need
    3.59 +to be installed manually onto the Xenoserver.
    3.60  
    3.61  
    3.62  Installation
    3.63 @@ -204,7 +210,7 @@ UDP packets to  the local virtual networ
    3.64  by xen_read_console running in Domain  0 and output are printed out to
    3.65  the standard output.
    3.66  
    3.67 -Now edit the installed xi_createlinuxdom.py script to your taste. This
    3.68 +Now edit the tools/examples/xi_createlinuxdom.py script to your taste. This
    3.69  should then be executed as root to create a new domain.
    3.70  
    3.71  You should be able to see XenoLinux boot message on standard output
    3.72 @@ -215,14 +221,14 @@ List and Stop Domains
    3.73  ==============================
    3.74  
    3.75  You can see a list of existing domains with:
    3.76 -# xi_listdoms.py
    3.77 +# tools/examples/xi_listdoms.py
    3.78  
    3.79  In order to stop a domain, you use:
    3.80 -# xi_stopdom.py <domain_id>
    3.81 +# tools/examples/xi_stopdom.py <domain_id>
    3.82  
    3.83  To destroy a domain use ('force' causes an immediate destruction
    3.84  without waiting for the guest OS to shut down cleanly):
    3.85 -# xi_destroydom.py <domain_id> [force]
    3.86 +# tools/examples/xi_destroydom.py <domain_id> [force]
    3.87  
    3.88  
    3.89  Other Control Tasks using Python
     4.1 --- a/tools/Makefile	Fri Nov 21 15:28:25 2003 +0000
     4.2 +++ b/tools/Makefile	Fri Nov 21 16:34:57 2003 +0000
     4.3 @@ -27,6 +27,11 @@ install: all
     4.4  	$(MAKE) -C xc install
     4.5  	$(MAKE) -C misc install
     4.6  
     4.7 +dist: all
     4.8 +	$(MAKE) -C balloon dist
     4.9 +	$(MAKE) -C xc dist
    4.10 +	$(MAKE) -C misc dist
    4.11 +
    4.12  clean:
    4.13  	$(MAKE) -C balloon clean
    4.14  	$(MAKE) -C xc clean
     5.1 --- a/tools/balloon/Makefile	Fri Nov 21 15:28:25 2003 +0000
     5.2 +++ b/tools/balloon/Makefile	Fri Nov 21 16:34:57 2003 +0000
     5.3 @@ -5,6 +5,10 @@ TARGET=balloon
     5.4  	$(CC) -O2 -Wall -o $(TARGET) balloon.c
     5.5  
     5.6  install: $(TARGET)
     5.7 +	mkdir -p /usr/bin
     5.8 +	cp -a $(TARGET) /usr/bin
     5.9 +
    5.10 +dist: $(TARGET)
    5.11  	mkdir -p ../../../install/bin
    5.12  	cp -a $(TARGET) ../../../install/bin
    5.13  
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/tools/examples/xi_createlinuxdom.py	Fri Nov 21 16:34:57 2003 +0000
     6.3 @@ -0,0 +1,101 @@
     6.4 +#!/usr/bin/env python
     6.5 +
     6.6 +#
     6.7 +# Example script for creating and building a new Linux guest OS for Xen.
     6.8 +#
     6.9 +
    6.10 +import Xc, XenoUtil, sys, os
    6.11 +
    6.12 +# Variable declaration. Set these up properly later on, as needed.
    6.13 +nfsserv = nfspath = root_partn = usr_partn = ""
    6.14 +
    6.15 +# STEP 1. Specify kernel image file.
    6.16 +image = "FULL_PATH_TO_IMAGE"
    6.17 +
    6.18 +# STEP 2. Specify IP address, netmask and gateway for the new domain.
    6.19 +ipaddr  = "ADDRESS"
    6.20 +netmask = XenoUtil.get_current_ipmask()
    6.21 +gateway = XenoUtil.get_current_ipgw()
    6.22 +
    6.23 +# STEP 3a. Specify NFS server and path to rootfs (only needed for network boot)
    6.24 +nfsserv = "ADDRESS"
    6.25 +nfspath = "FULL_PATH_TO_ROOT_DIR"
    6.26 +
    6.27 +# STEP 3b. Specify root (and possibly /usr) on local disc (if not NFS booting)
    6.28 +#root_partn = "/dev/sda2"
    6.29 +#usr_partn  = "/dev/sda6"
    6.30 +
    6.31 +# STEP 4. Check that the following cmdline setup is to your taste.
    6.32 +cmdline = "ip="+ipaddr+":"+nfsserv+":"+gateway+":"+netmask+"::eth0:off"
    6.33 +if root_partn:
    6.34 +    # Boot from local disc. May specify a separate /usr.
    6.35 +    cmdline = cmdline + " root="+root_partn+" ro"
    6.36 +    if usr_partn:
    6.37 +        " usr="+usr_partn
    6.38 +elif nfsserv:
    6.39 +    # NFS boot
    6.40 +    cmdline = cmdline + " root=/dev/nfs"
    6.41 +    cmdline = cmdline + " nfsroot="+nfspath
    6.42 +
    6.43 +if root_partn:
    6.44 +    root_info = XenoUtil.lookup_blkdev_partn_info(root_partn)
    6.45 +    if not root_info:
    6.46 +        print "Could not obtain info on partition '" + root_partn + "'"
    6.47 +        sys.exit()
    6.48 +
    6.49 +if usr_partn:
    6.50 +    usr_info = XenoUtil.lookup_blkdev_partn_info(usr_partn)
    6.51 +    if not usr_info:
    6.52 +        print "Could not obtain info on partition '" + usr_partn + "'"
    6.53 +        sys.exit()
    6.54 +
    6.55 +if not os.path.isfile( image ):
    6.56 +    print "Image file '" + image + "' does not exist"
    6.57 +    sys.exit()
    6.58 +
    6.59 +xc = Xc.new()
    6.60 +
    6.61 +id = xc.domain_create()
    6.62 +if id <= 0:
    6.63 +    print "Error creating domain"
    6.64 +    sys.exit()
    6.65 +
    6.66 +if xc.linux_build( dom=id, image=image, cmdline=cmdline ):
    6.67 +    print "Error building Linux guest OS"
    6.68 +    xc.domain_destroy ( dom=id )
    6.69 +    sys.exit()
    6.70 +
    6.71 +if root_partn:
    6.72 +    if xc.vbd_create( dom=id, vbd=root_info[0], writeable=1 ):
    6.73 +        print "Error creating root VBD"
    6.74 +        xc.domain_destroy ( dom=id )
    6.75 +        sys.exit()
    6.76 +    if xc.vbd_add_extent( dom=id,
    6.77 +                          vbd=root_info[0],
    6.78 +                          device=root_info[1],
    6.79 +                          start_sector=root_info[2],
    6.80 +                          nr_sectors=root_info[3] ):
    6.81 +        print "Error populating root VBD"
    6.82 +        xc.domain_destroy ( dom=id )
    6.83 +        sys.exit()
    6.84 +
    6.85 +if usr_partn:
    6.86 +    if xc.vbd_create( dom=id, vbd=usr_info[0], writeable=0 ):
    6.87 +        print "Error creating usr VBD"
    6.88 +        xc.domain_destroy ( dom=id )
    6.89 +        sys.exit()
    6.90 +    if xc.vbd_add_extent( dom=id,
    6.91 +                          vbd=usr_info[0],
    6.92 +                          device=usr_info[1],
    6.93 +                          start_sector=usr_info[2],
    6.94 +                          nr_sectors=usr_info[3] ):
    6.95 +        print "Error populating usr VBD"
    6.96 +        xc.domain_destroy ( dom=id )
    6.97 +        sys.exit()
    6.98 +
    6.99 +XenoUtil.setup_vfr_rules_for_vif( id, 0, ipaddr )
   6.100 +
   6.101 +if xc.domain_start( dom=id ):
   6.102 +    print "Error starting domain"
   6.103 +    xc.domain_destroy ( dom=id )
   6.104 +    sys.exit()
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/tools/examples/xi_destroydom.py	Fri Nov 21 16:34:57 2003 +0000
     7.3 @@ -0,0 +1,18 @@
     7.4 +#!/usr/bin/env python
     7.5 +
     7.6 +#
     7.7 +# Destroy specified domain.
     7.8 +#
     7.9 +
    7.10 +import Xc, sys, re
    7.11 +
    7.12 +xc = Xc.new()
    7.13 +
    7.14 +if len(sys.argv) < 2:
    7.15 +    print "Specify a domain identifier"
    7.16 +    sys.exit()
    7.17 +
    7.18 +if (len(sys.argv) > 2) and re.match( 'force', sys.argv[2] ):
    7.19 +    xc.domain_destroy( dom=int(sys.argv[1]), force=0 )
    7.20 +else:
    7.21 +    xc.domain_destroy( dom=int(sys.argv[1]), force=1 )
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/tools/examples/xi_listdoms.py	Fri Nov 21 16:34:57 2003 +0000
     8.3 @@ -0,0 +1,10 @@
     8.4 +#!/usr/bin/env python
     8.5 +
     8.6 +#
     8.7 +# List info on all domains.
     8.8 +#
     8.9 +
    8.10 +import Xc, sys
    8.11 +xc = Xc.new()
    8.12 +print xc.domain_getinfo()
    8.13 +
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/tools/examples/xi_stopdom.py	Fri Nov 21 16:34:57 2003 +0000
     9.3 @@ -0,0 +1,15 @@
     9.4 +#!/usr/bin/env python
     9.5 +
     9.6 +#
     9.7 +# Stop execution of specified domain.
     9.8 +#
     9.9 +
    9.10 +import Xc, sys, re
    9.11 +
    9.12 +xc = Xc.new()
    9.13 +
    9.14 +if len(sys.argv) != 2:
    9.15 +    print "Specify a domain identifier"
    9.16 +    sys.exit()
    9.17 +
    9.18 +xc.domain_stop( dom=int(sys.argv[1]) )
    10.1 --- a/tools/misc/Makefile	Fri Nov 21 15:28:25 2003 +0000
    10.2 +++ b/tools/misc/Makefile	Fri Nov 21 16:34:57 2003 +0000
    10.3 @@ -10,23 +10,25 @@ OBJS     = $(patsubst %.c,%.o,$(SRCS))
    10.4  TARGETS  = xen_read_console xen_refresh_dev xen_cpuperf
    10.5  
    10.6  INSTALL  = $(TARGETS) xen-mkdevnodes xen_nat_enable xen-clone 
    10.7 -INSTALL += xi_createlinuxdom.py xi_destroydom.py xi_listdoms.py
    10.8 -INSTALL += xi_stopdom.py
    10.9  
   10.10  all: $(TARGETS)
   10.11  	$(MAKE) -C miniterm	
   10.12  
   10.13  install: all
   10.14 +	mkdir -p /usr/bin
   10.15 +	cp -a $(INSTALL) /usr/bin
   10.16 +	chmod 755 /usr/bin/xen-mkdevnodes
   10.17 +	chmod 755 /usr/bin/xen_nat_enable
   10.18 +	chmod 755 /usr/bin/xen-clone
   10.19 +	$(MAKE) -C miniterm install
   10.20 +
   10.21 +dist: all
   10.22  	mkdir -p ../../../install/bin
   10.23  	cp -a $(INSTALL) ../../../install/bin
   10.24  	chmod 755 ../../../install/bin/xen-mkdevnodes
   10.25  	chmod 755 ../../../install/bin/xen_nat_enable
   10.26  	chmod 755 ../../../install/bin/xen-clone
   10.27 -	chmod 755 ../../../install/bin/xi_createlinuxdom.py
   10.28 -	chmod 755 ../../../install/bin/xi_destroydom.py
   10.29 -	chmod 755 ../../../install/bin/xi_listdoms.py
   10.30 -	chmod 755 ../../../install/bin/xi_stopdom.py
   10.31 -	$(MAKE) -C miniterm install
   10.32 +	$(MAKE) -C miniterm dist
   10.33  
   10.34  clean:
   10.35  	$(RM) *.o $(TARGETS)
    11.1 --- a/tools/misc/miniterm/Makefile	Fri Nov 21 15:28:25 2003 +0000
    11.2 +++ b/tools/misc/miniterm/Makefile	Fri Nov 21 16:34:57 2003 +0000
    11.3 @@ -4,6 +4,9 @@ CFLAGS  = -O3 -march=i686 -Wall
    11.4  all: miniterm
    11.5  
    11.6  install: all
    11.7 +	cp -a miniterm /usr/bin/	
    11.8 +
    11.9 +dist: all
   11.10  	cp -a miniterm ../../../../install/bin/	
   11.11  
   11.12  clean:
    12.1 --- a/tools/misc/xen-clone	Fri Nov 21 15:28:25 2003 +0000
    12.2 +++ b/tools/misc/xen-clone	Fri Nov 21 16:34:57 2003 +0000
    12.3 @@ -76,7 +76,7 @@ fi
    12.4  
    12.5  # build and install Xen and tools
    12.6  cd ${DEST_BK_REP}
    12.7 -make install
    12.8 +make dist || make install
    12.9  
   12.10  # Turn linux into xenolinux then build it
   12.11  cd xenolinux-${LINUX_VER}-sparse
   12.12 @@ -89,7 +89,7 @@ export INSTALL_MOD_PATH=${TOP}/install
   12.13  make oldconfig
   12.14  make dep
   12.15  make bzImage
   12.16 -make install
   12.17 +make dist || make install
   12.18  make modules
   12.19  make modules_install
   12.20  cd ..
    13.1 --- a/tools/misc/xi_createlinuxdom.py	Fri Nov 21 15:28:25 2003 +0000
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,101 +0,0 @@
    13.4 -#!/usr/bin/python
    13.5 -
    13.6 -#
    13.7 -# Example script for creating and building a new Linux guest OS for Xen.
    13.8 -#
    13.9 -
   13.10 -import Xc, XenoUtil, sys, os
   13.11 -
   13.12 -# Variable declaration. Set these up properly later on, as needed.
   13.13 -nfsserv = nfspath = root_partn = usr_partn = ""
   13.14 -
   13.15 -# STEP 1. Specify kernel image file.
   13.16 -image = "FULL_PATH_TO_IMAGE"
   13.17 -
   13.18 -# STEP 2. Specify IP address, netmask and gateway for the new domain.
   13.19 -ipaddr  = "ADDRESS"
   13.20 -netmask = XenoUtil.get_current_ipmask()
   13.21 -gateway = XenoUtil.get_current_ipgw()
   13.22 -
   13.23 -# STEP 3. Specify NFS server and path to rootfs (only needed for network boot)
   13.24 -nfsserv = "ADDRESS"
   13.25 -nfspath = "FULL_PATH_TO_ROOT_DIR"
   13.26 -
   13.27 -# STEP 4. Specify root (and possibly /usr) on local disc (if not NFS booting)
   13.28 -#root_partn = "/dev/sda2"
   13.29 -#usr_partn  = "/dev/sda6"
   13.30 -
   13.31 -# STEP 5. Check that the following cmdline setup is to your taste.
   13.32 -cmdline = "ip="+ipaddr+":"+nfsserv+":"+gateway+":"+netmask+"::eth0:off"
   13.33 -if root_partn:
   13.34 -    # Boot from local disc. May specify a separate /usr.
   13.35 -    cmdline = cmdline + " root="+root_partn+" ro"
   13.36 -    if usr_partn:
   13.37 -        " usr="+usr_partn
   13.38 -elif nfsserv:
   13.39 -    # NFS boot
   13.40 -    cmdline = cmdline + " root=/dev/nfs"
   13.41 -    cmdline = cmdline + " nfsroot="+nfspath
   13.42 -
   13.43 -if root_partn:
   13.44 -    root_info = XenoUtil.lookup_blkdev_partn_info(root_partn)
   13.45 -    if not root_info:
   13.46 -        print "Could not obtain info on partition '" + root_partn + "'"
   13.47 -        sys.exit()
   13.48 -
   13.49 -if usr_partn:
   13.50 -    usr_info = XenoUtil.lookup_blkdev_partn_info(usr_partn)
   13.51 -    if not usr_info:
   13.52 -        print "Could not obtain info on partition '" + usr_partn + "'"
   13.53 -        sys.exit()
   13.54 -
   13.55 -if not os.path.isfile( image ):
   13.56 -    print "Image file '" + image + "' does not exist"
   13.57 -    sys.exit()
   13.58 -
   13.59 -xc = Xc.new()
   13.60 -
   13.61 -id = xc.domain_create()
   13.62 -if id <= 0:
   13.63 -    print "Error creating domain"
   13.64 -    sys.exit()
   13.65 -
   13.66 -if xc.linux_build( dom=id, image=image, cmdline=cmdline ):
   13.67 -    print "Error building Linux guest OS"
   13.68 -    xc.domain_destroy ( dom=id )
   13.69 -    sys.exit()
   13.70 -
   13.71 -if root_partn:
   13.72 -    if xc.vbd_create( dom=id, vbd=root_info[0], writeable=1 ):
   13.73 -        print "Error creating root VBD"
   13.74 -        xc.domain_destroy ( dom=id )
   13.75 -        sys.exit()
   13.76 -    if xc.vbd_add_extent( dom=id,
   13.77 -                          vbd=root_info[0],
   13.78 -                          device=root_info[1],
   13.79 -                          start_sector=root_info[2],
   13.80 -                          nr_sectors=root_info[3] ):
   13.81 -        print "Error populating root VBD"
   13.82 -        xc.domain_destroy ( dom=id )
   13.83 -        sys.exit()
   13.84 -
   13.85 -if usr_partn:
   13.86 -    if xc.vbd_create( dom=id, vbd=usr_info[0], writeable=0 ):
   13.87 -        print "Error creating usr VBD"
   13.88 -        xc.domain_destroy ( dom=id )
   13.89 -        sys.exit()
   13.90 -    if xc.vbd_add_extent( dom=id,
   13.91 -                          vbd=usr_info[0],
   13.92 -                          device=usr_info[1],
   13.93 -                          start_sector=usr_info[2],
   13.94 -                          nr_sectors=usr_info[3] ):
   13.95 -        print "Error populating usr VBD"
   13.96 -        xc.domain_destroy ( dom=id )
   13.97 -        sys.exit()
   13.98 -
   13.99 -XenoUtil.setup_vfr_rules_for_vif( id, 0, ipaddr )
  13.100 -
  13.101 -if xc.domain_start( dom=id ):
  13.102 -    print "Error starting domain"
  13.103 -    xc.domain_destroy ( dom=id )
  13.104 -    sys.exit()
    14.1 --- a/tools/misc/xi_destroydom.py	Fri Nov 21 15:28:25 2003 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,18 +0,0 @@
    14.4 -#!/usr/bin/python
    14.5 -
    14.6 -#
    14.7 -# Destroy specified domain.
    14.8 -#
    14.9 -
   14.10 -import Xc, sys, re
   14.11 -
   14.12 -xc = Xc.new()
   14.13 -
   14.14 -if len(sys.argv) < 2:
   14.15 -    print "Specify a domain identifier"
   14.16 -    sys.exit()
   14.17 -
   14.18 -if (len(sys.argv) > 2) and re.match( 'force', sys.argv[2] ):
   14.19 -    xc.domain_destroy( dom=int(sys.argv[1]), force=0 )
   14.20 -else:
   14.21 -    xc.domain_destroy( dom=int(sys.argv[1]), force=1 )
    15.1 --- a/tools/misc/xi_listdoms.py	Fri Nov 21 15:28:25 2003 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,10 +0,0 @@
    15.4 -#!/usr/bin/python
    15.5 -
    15.6 -#
    15.7 -# List info on all domains.
    15.8 -#
    15.9 -
   15.10 -import Xc, sys
   15.11 -xc = Xc.new()
   15.12 -print xc.domain_getinfo()
   15.13 -
    16.1 --- a/tools/misc/xi_stopdom.py	Fri Nov 21 15:28:25 2003 +0000
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,15 +0,0 @@
    16.4 -#!/usr/bin/python
    16.5 -
    16.6 -#
    16.7 -# Stop execution of specified domain.
    16.8 -#
    16.9 -
   16.10 -import Xc, sys, re
   16.11 -
   16.12 -xc = Xc.new()
   16.13 -
   16.14 -if len(sys.argv) != 2:
   16.15 -    print "Specify a domain identifier"
   16.16 -    sys.exit()
   16.17 -
   16.18 -xc.domain_stop( dom=int(sys.argv[1]) )
    17.1 --- a/tools/xc/Makefile	Fri Nov 21 15:28:25 2003 +0000
    17.2 +++ b/tools/xc/Makefile	Fri Nov 21 16:34:57 2003 +0000
    17.3 @@ -3,10 +3,14 @@ all:
    17.4  	$(MAKE) -C lib
    17.5  	$(MAKE) -C py
    17.6  
    17.7 -install:
    17.8 +install: all
    17.9  	$(MAKE) -C lib install
   17.10  	$(MAKE) -C py  install
   17.11  
   17.12 +dist: all
   17.13 +	$(MAKE) -C lib dist
   17.14 +	$(MAKE) -C py  dist
   17.15 +
   17.16  clean:
   17.17  	$(MAKE) -C lib clean
   17.18  	$(MAKE) -C py  clean
    18.1 --- a/tools/xc/lib/Makefile	Fri Nov 21 15:28:25 2003 +0000
    18.2 +++ b/tools/xc/lib/Makefile	Fri Nov 21 16:34:57 2003 +0000
    18.3 @@ -20,6 +20,14 @@ check-for-zlib:
    18.4  	fi
    18.5  
    18.6  install: all
    18.7 +	mkdir -p /usr/lib
    18.8 +	mkdir -p /usr/include
    18.9 +	cp -a $(LIBS) /usr/lib
   18.10 +	for i in $(LIBS); do chmod 755 /usr/bin/$i ; done
   18.11 +	cp -a xc.h /usr/include
   18.12 +	chmod 644 /usr/include/xc.h
   18.13 +
   18.14 +dist: all
   18.15  	mkdir -p ../../../../install/lib
   18.16  	mkdir -p ../../../../install/include
   18.17  	cp -a $(LIBS) ../../../../install/lib
    19.1 --- a/tools/xc/py/Makefile	Fri Nov 21 15:28:25 2003 +0000
    19.2 +++ b/tools/xc/py/Makefile	Fri Nov 21 16:34:57 2003 +0000
    19.3 @@ -2,8 +2,14 @@
    19.4  all: ../lib/libxc.a
    19.5  	python setup.py build
    19.6  
    19.7 -install:
    19.8 +install: all
    19.9  	python setup.py install
   19.10  
   19.11 +dist: all
   19.12 +	mkdir -p ../../../../install/lib/python
   19.13 +	for i in `find . -name 'Xc.so'` ; do                           \
   19.14 +		cp $$i ../../../../install/lib/python/`basename $$i` ; \
   19.15 +	done
   19.16 +
   19.17  clean:
   19.18  	rm -rf build *.pyc *.pyo *.o *.a *~
    20.1 --- a/xen/Makefile	Fri Nov 21 15:28:25 2003 +0000
    20.2 +++ b/xen/Makefile	Fri Nov 21 16:34:57 2003 +0000
    20.3 @@ -19,6 +19,11 @@ debug:
    20.4  
    20.5  install: $(TARGET)
    20.6  	gzip -f -9 < $(TARGET) > $(TARGET).gz
    20.7 +	mkdir -p /boot
    20.8 +	cp -a $(TARGET).gz /boot
    20.9 +
   20.10 +dist: $(TARGET)
   20.11 +	gzip -f -9 < $(TARGET) > $(TARGET).gz
   20.12  	mkdir -p ../../install/boot
   20.13  	cp -a $(TARGET).gz ../../install/boot/
   20.14  
    21.1 --- a/xen/include/xeno/event.h	Fri Nov 21 15:28:25 2003 +0000
    21.2 +++ b/xen/include/xeno/event.h	Fri Nov 21 16:34:57 2003 +0000
    21.3 @@ -47,7 +47,7 @@ static inline unsigned long mark_guest_e
    21.4  /* As above, but hyp_events are handled within the hypervisor. */
    21.5  static inline unsigned long mark_hyp_event(struct task_struct *p, int event)
    21.6  {
    21.7 -    if ( test_and_set_bit(event, &p->shared_info->events) )
    21.8 +    if ( test_and_set_bit(event, &p->hyp_events) )
    21.9          return 0;
   21.10      smp_mb();
   21.11      if ( p->state == TASK_INTERRUPTIBLE ) wake_up(p);
    22.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/Makefile	Fri Nov 21 15:28:25 2003 +0000
    22.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/Makefile	Fri Nov 21 16:34:57 2003 +0000
    22.3 @@ -96,6 +96,10 @@ bzImage: vmlinux
    22.4  	@$(MAKEBOOT) xenolinux.gz
    22.5  
    22.6  install: bzImage
    22.7 +	mkdir -p /boot
    22.8 +	cp -a arch/$(ARCH)/boot/xenolinux.gz /boot/xenolinux.gz
    22.9 +
   22.10 +dist: bzImage
   22.11  	mkdir -p ../install/boot
   22.12  	cp -a arch/$(ARCH)/boot/xenolinux.gz ../install/boot/xenolinux.gz
   22.13