bitkeeper revision 1.468 (3f776bd43_wFRTwYlSu5A4qtJST5zw)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Sun, 28 Sep 2003 23:16:36 +0000 (23:16 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Sun, 28 Sep 2003 23:16:36 +0000 (23:16 +0000)
changes to build system, example config scripts added, READMEs improved.

18 files changed:
.rootkeys
Makefile
README
README.CD
tools/Makefile [new file with mode: 0644]
tools/control/Makefile
tools/control/examples/grub.conf-example [new file with mode: 0644]
tools/control/examples/xen-mynewdom [new file with mode: 0644]
tools/control/examples/xenctl.xml [new file with mode: 0644]
tools/control/examples/xenctl.xml-dom0nfs [new file with mode: 0644]
tools/control/examples/xenctl.xml-linklocal [new file with mode: 0644]
tools/control/examples/xenctl.xml-publicip [new file with mode: 0644]
tools/control/xenctl.xml [deleted file]
tools/misc/Makefile [new file with mode: 0644]
tools/misc/miniterm/Makefile
tools/misc/mkdevnodes [deleted file]
tools/misc/xen-clone
tools/misc/xen-mkdevnodes [new file with mode: 0755]

index 83d1de8bfcdcc337641d62f33ce56d659bba58f2..fd136bba688934ae1afabd1c361e63fa0b3f0efc 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
@@ -6,6 +6,7 @@
 3f5ef5a24IaQasQE2tyMxrfxskMmvw README
 3f5ef5a2l4kfBYSQTUaOyyD76WROZQ README.CD
 3f69d8abYB1vMyD_QVDvzxy5Zscf1A TODO
+3f776bd1Hy9rn69ntXBhPReUFw9IEA tools/Makefile
 3e6377b24eQqYMsDi9XrFkIgTzZ47A tools/balloon/Makefile
 3e6377d6eiFjF1hHIS6JEIOFk62xSA tools/balloon/README
 3e6377dbGcgnisKw16DPCaND7oGO3Q tools/balloon/balloon.c
 3f0d61da3O5gkcntbIOdUmN2-RcZbQ tools/control/doc/INSTALL-cmdline
 3eca6a96a31IwaKtkEa4jmzwTWlm8Q tools/control/doc/INSTALL-web
 3f0d61daCTHGCpQK0Brz3PAp80d_2Q tools/control/doc/USAGE-cmdline
+3f776bd12y6bW-wtcs6rD2qhdpT_Rw tools/control/examples/grub.conf-example
+3f776bd1RBu7Gnce6Bq9328QFUZBsw tools/control/examples/xen-mynewdom
+3eb781fcabCKRogwxJA3-jJKstw9Vg tools/control/examples/xenctl.xml
+3f776bd1bfwM-pP6b2qd0vih1KeV8w tools/control/examples/xenctl.xml-dom0nfs
+3f776bd1-A4vvCCsz-KOgZyAj4ux2g tools/control/examples/xenctl.xml-linklocal
+3f776bd2y1sfPGpfiaj4A-sRdUON7A tools/control/examples/xenctl.xml-publicip
 3f042c35FzVap5QW0UBPnZ2ZM0l3QA tools/control/src/org/xenoserver/cmdline/CommandParser.java
 3eb781fdNQvEJW3tNvovjqoN7GlePA tools/control/src/org/xenoserver/cmdline/Main.java
 3f042c35-TPgpCQViIaJzLts2-CnBw tools/control/src/org/xenoserver/cmdline/ParseDomainDestroy.java
 3ec41f7ek1RffqN2yRUzSTkD5m1J6w tools/control/web/tmpl/xenohead.def
 3ec41f7e1ZpfCsgQ2qRJBooBn_iRtA tools/control/web/tmpl/xenostyle.css
 3eb781fc6vgq5yhkJRGDLY9gWWRY2A tools/control/xenctl
-3eb781fcabCKRogwxJA3-jJKstw9Vg tools/control/xenctl.xml
 3eb781fdl4lXWYZzmqDDUAYhAThRqQ tools/internal/Makefile
 3eb781fdc539MQQm47rYRCCR3N5i-Q tools/internal/dom0_defs.h
 3eb781fdKiQbgozBsgs_zzJQ9ubehw tools/internal/mem_defs.h
 3eb781fd0Eo9K1jEFCSAVzO51i_ngg tools/internal/xi_stop.c
 3f108ae2to5nHRRXfvUK7oxgjcW_yA tools/internal/xi_usage.c
 3eb781fd7211MZsLxJSiuy7W4KnJXg tools/internal/xi_vifinit
+3f776bd2Xd-dUcPKlPN2vG89VGtfvQ tools/misc/Makefile
 3f6dc136ZKOjd8PIqLbFBl_v-rnkGg tools/misc/miniterm/Makefile
 3f6dc140C8tAeBfroAF24VrmCS4v_w tools/misc/miniterm/README
 3f6dc142IHaf6XIcAYGmhV9nNSIHFQ tools/misc/miniterm/miniterm.c
-3f1668d4-FUY6Enc7MB3GcwUtfJ5HA tools/misc/mkdevnodes
 3f5ef5a2ir1kVAthS14Dc5QIRCEFWg tools/misc/xen-clone
 3f5ef5a2dTZP0nnsFoeq2jRf3mWDDg tools/misc/xen-clone.README
+3f1668d4-FUY6Enc7MB3GcwUtfJ5HA tools/misc/xen-mkdevnodes
 3f13d81eQ9Vz-h-6RDGFkNR9CRP95g tools/misc/xen_nat_enable
 3f13d81e6Z6806ihYYUw8GVKNkYnuw tools/misc/xen_nat_enable.README
 3f1668d4F29Jsw0aC0bJEIkOBiagiQ tools/misc/xen_read_console.c
index 725d615849a56359732fcc974bf77870e6ae7008..219669212299d2c666e20f2b3da83b5c988c215e 100644 (file)
--- a/Makefile
+++ b/Makefile
 
 all:   
        $(MAKE) -C xen
-       $(MAKE) -C tools/balloon
-       $(MAKE) -C tools/control
-       $(MAKE) -C tools/internal
+       $(MAKE) -C tools
 
 install: all
        $(MAKE) -C xen install
-       $(MAKE) -C tools/balloon install
-       $(MAKE) -C tools/control install
-       $(MAKE) -C tools/internal install
-
+       $(MAKE) -C tools install
 
 clean:
        $(MAKE) -C xen clean
-       $(MAKE) -C tools/balloon clean
-       $(MAKE) -C tools/control clean
-       $(MAKE) -C tools/internal clean
+       $(MAKE) -C tools clean
 
diff --git a/README b/README
index 1a5e4e9233ef7479db337b1d8107d9136ce4278b..5185409359900a68a1de7fbd1481060cdc291434 100644 (file)
--- a/README
+++ b/README
@@ -98,7 +98,6 @@ We've successfully booted over 128 copies of Linux on the same machine
 more normal to use some smaller number, perhaps 10-20.
 
 
-
 Hardware support
 ================
 
@@ -135,14 +134,29 @@ recommended since they require extra packet copies.
 Building Xen and XenoLinux
 ==========================
 
-Take a look at the tools/misc/xen-clone script in the BK repository,
-which will 'bk clone' the live master tree, and then set about 
-building everything. The build procedure for xenolinux is slightly 
-complicated as its done by running the 'mkbuildtree' script over
-a pristine Linux tree to turn it into a xenolinux tree by adding the
-'xeno' architecture.
+The public master BK repository lives at: bk://xen.bkbits.net/xeno.bk
+
+To fetch a local copy, install the BitKeeper tools, then run: 
+'bk clone bk://xen.bkbits.net/xeno.bk'
+
+To see how to build Xen, Xenolinux, and all the control tools, inspect
+the tools/misc/xen-clone script in the BK repository. This script can
+be used to clone the repostitory and perform a full build.
+
+The build procedure for xenolinux is slightly complicated as its done
+by running the 'mkbuildtree' script over a pristine Linux tree to turn
+it into a xenolinux tree by adding the 'xeno' architecture.
+
+There's also a pre-built source tree on the project downloads page.
+
+
+Using the domain control tools
+==============================
 
-The public master BK repository lives at:   bk://xen.bkbits.net/xeno.bk
+The README.CD file contains some examples of how to use 'xenctl' and
+the other domain control tools. Invoking the tool without any
+arguments prints some usage inforamtion. There's also some
+documentation in the the repository under tools/control/doc
 
 
 
index b141ba7d6098993c46f7f8f269ab70526ccca7e8..12c42289bae97af8996c3c4cff034183a13eba33 100644 (file)
--- a/README.CD
+++ b/README.CD
@@ -89,10 +89,15 @@ via ssh::
  password: xendemo      xendemo
 
 Once logged in, it should look just like any regular linux box. All
-the usual tools and commands should work as per usual.  It's probably
-best to start by configuring networking, either with 'dhclient' or
-manually via ifconfig and route, remembering to edit /etc/resolv.conf
-if you want DNS.
+the usual tools and commands should work as per usual.  However,
+because of the poor random access performance of CD drives, the
+machine will feel rather slugish, and you may run out of memory if you
+make significant modifications to the ramfs filesystem -- for the full
+experience, install a Xen and XenoLinux image on you hard drive :-)
+
+You can configure networking, either with 'dhclient' or manually via
+'ifconfig' and 'route', remembering to edit /etc/resolv.conf if you
+want DNS.
 
 You can start an X server with 'startx'. It defaults to a conservative
 1024x768, but you can edit the script for higher resoloutions.  The CD
@@ -242,7 +247,7 @@ Alternatively, you can use 'virtual disks', which are stored as files
 within a custom file system. "xenctl partitions add" can be used to
 'format' a partition with the file system, and then virtual disks can
 be created with "xenctl vd create". Virtual disks can then be attached
-to a running domain as a 'virtual block device' using "xenctl vdb
+to a running domain as a 'virtual block device' using "xenctl vbd
 create". The virtual disk can optionally be partitioned (e.g. "fdisk
 /dev/xvda") or have a file system created on it directly (e.g. "mkfs
 -t ext3 /dev/xvda").  The virtual disk can then be accessed by a
@@ -329,7 +334,7 @@ xen-devel@lists.sourceforge.net mailing list.
 
 
 Installing from the CD
-----------------------
+======================
 
 If you're installing Xen/XenoLinux onto an existing linux file system
 distribution, just copy the Xen VMM (/boot/image.gz) and XenoLinux
@@ -373,7 +378,7 @@ require a second "module" line.
 
 
 Installing the file systems from the CD
----------------------------------------
+=======================================
 
 If you haven't an existing Linux installation onto which you can just
 drop down the Xen and XenoLinux images, then the file systems on the
@@ -411,7 +416,7 @@ version of the XenDemoCD (see below).
 
 
 Debugging
----------
+=========
 
 Xen has a set of debugging features that can be useful to try and
 figure out what's going on. Hit 'h' on the serial line (if you
@@ -432,7 +437,7 @@ connected to a serial-port server.
 
 
 Description of how the XenDemoCD boots
---------------------------------------
+======================================
 
 1. Grub is used to load Xen, a XenoLinux kernel, and an initrd (initial
 ram disk). [The source of the version of Grub used is in /usr/local/src]
@@ -456,7 +461,7 @@ normally.
 
 
 Building your own version of the XenDemoCD
-------------------------------------------
+==========================================
 
 The 'live ISO' version of RedHat is based heavily on Peter Anvin's
 SuperRescue CD version 2.1.2 and J. McDaniel's Plan-B:
diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644 (file)
index 0000000..590d8ca
--- /dev/null
@@ -0,0 +1,37 @@
+#
+# Grand Unified Makefile for Xen.
+#
+# Keir Fraser, 6/5/2003
+#
+# Builds everything except Xenolinux:
+#  cd xenolinux-<version>-sparse
+#  ./mkbuildtree <build dir>
+#  cd <build dir> && make oldconfig && make dep && make bzImage
+#  (<build dir> should be a vanilla linux tree with matching version)
+#
+# If you get errors in tools/domctl or tools/vdmanager, then you need
+# the latest Java 2 SDK on your execution path: <http://java.sun.com>
+# Also, you will need Apache's 'ant' build tool: <http://ant.apache.org>
+#
+# If you received this source as part of a Xen release, you should find
+# that appropriate versions of the build tools are already installed in
+# the initial system setup.
+
+all:   
+       $(MAKE) -C balloon
+       $(MAKE) -C control
+       $(MAKE) -C internal
+       $(MAKE) -C misc
+
+install: all
+       $(MAKE) -C balloon install
+       $(MAKE) -C control install
+       $(MAKE) -C internal install
+       $(MAKE) -C misc install
+
+clean:
+       $(MAKE) -C balloon clean
+       $(MAKE) -C control clean
+       $(MAKE) -C internal clean
+       $(MAKE) -C misc clean
+
index 0c2ca8e10e5e21e92990f6f5ec7c97133f619cb5..1086f47ddbd4f6e60507e98bcd680d73966935fc 100644 (file)
@@ -2,11 +2,13 @@
 default: cmdline
 
 #install: install-cmdline install-web
-install: install-cmdline
+install: install-cmdline examples
 
 clean: clean-cmdline clean-web
 
-
+examples: FORCE
+       mkdir -p ../../../install/etc
+       cp examples/xen* examples/grub.conf* ../../../install/etc/
 
 cmdline: FORCE
        ant -buildfile build-cmdline.xml dist
diff --git a/tools/control/examples/grub.conf-example b/tools/control/examples/grub.conf-example
new file mode 100644 (file)
index 0000000..0f9cd7a
--- /dev/null
@@ -0,0 +1,48 @@
+# grub.conf 
+#
+timeout=10
+
+# We can control GRUB via COM1. 
+# Disable by default as it hangs on systems without a serial port and
+# doesn't work with slpashimage enabled anyhow.
+#
+# serial --unit=0 --speed=115200
+# terminal --timeout=10 serial console
+
+# These examples are from the Xen Demo CD, so the root filesystem setup
+# using an initrd to mount the read only /usr is all rather non standard.
+# There are arguably more normal examples in the README.CD file. Read
+# the standard Linux documenation to find out about kernel cmd line
+# parameters.
+
+# The two lots of console= parameters cause the domain 0 Linux to use both
+# the VGA scree consoles and the Xen output-only console
+
+# We also make use of the ability to pass arbitrary environment variables
+# on the kernel command line, so set the DOMID variable.
+
+splashimage=/boot/grub/splash.xpm.gz
+
+default=0
+
+title Xen / XenoLinux 2.4.22 
+        kernel /boot/image.gz dom0_mem=100000
+        module /boot/xenolinux.gz root=/dev/ram0 rw init=/linuxrc console=xencons0 console=tty0 DOMID=0
+        module /boot/initrd.gz
+
+title Xen / XenoLinux 2.4.22 w/ cmdline IP config -- edit as required
+        kernel /boot/image.gz dom0_mem=100000
+        module /boot/xenolinux.gz ip=192.168.5.5::192.168.0.1:255.255.0.0::eth0:off root=/dev/ram0 rw init=/linuxrc console=xencons0 console=tty0 DOMID=0
+        module /boot/initrd.gz
+
+title Xen / XenoLinux 2.4.22 in "safe mode"
+        kernel /boot/image.gz ignorebiostables watchdog dom0_mem=100000 
+        module /boot/xenolinux.gz root=/dev/ram0 rw init=/linuxrc console=xencons0 console=tty0 DOMID=0
+        module /boot/initrd.gz
+
+
+title Linux 2.4.22
+        kernel /boot/vmlinuz-2.4.22 root=/dev/ram0 rw init=/linuxrc
+        initrd /boot/initrd.gz
+
+
diff --git a/tools/control/examples/xen-mynewdom b/tools/control/examples/xen-mynewdom
new file mode 100644 (file)
index 0000000..009a584
--- /dev/null
@@ -0,0 +1,3 @@
+domain new
+physical grant -pcdrom_link
+domain start
diff --git a/tools/control/examples/xenctl.xml b/tools/control/examples/xenctl.xml
new file mode 100644 (file)
index 0000000..6f1ed1e
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<domctl_defaults>
+<domain_name>XenoLinux</domain_name>
+<domain_size_kb>98304</domain_size_kb>
+<domain_image>/boot/xenolinux.gz</domain_image>
+<domain_vifs>1</domain_vifs>
+<domain_init_rd>/boot/initrd.gz</domain_init_rd>
+<root_device>/dev/ram0</root_device>
+<root_args>rw</root_args>
+<args>init=/linuxrc 4 DOMID=+</args>
+<nw_ip>169.254.1.0+</nw_ip>
+<nw_gw>169.254.1.0</nw_gw>
+<nw_mask>255.255.0.0</nw_mask>
+<nw_nfs_server>169.254.1.0</nw_nfs_server>
+<max_domain_number>1000</max_domain_number>
+<xi_tools_dir>/usr/local/bin/</xi_tools_dir>
+</domctl_defaults>
diff --git a/tools/control/examples/xenctl.xml-dom0nfs b/tools/control/examples/xenctl.xml-dom0nfs
new file mode 100644 (file)
index 0000000..547ca86
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<domctl_defaults>
+<domain_name>XenoLinux</domain_name>
+<domain_size_kb>98304</domain_size_kb>
+<domain_image>/boot/xenolinux.gz</domain_image>
+<domain_vifs>1</domain_vifs>
+<root_device>/dev/nfs</root_device>
+<root_args>rw</root_args>
+<args>init=/linuxrc 4 DOMID=+</args>
+<nw_ip>169.254.1.0+</nw_ip>
+<nw_gw>169.254.1.0</nw_gw>
+<nw_mask>255.255.0.0</nw_mask>
+<nw_nfs_server>169.254.1.0</nw_nfs_server>
+<nw_nfs_root>169.254.1.0:/local/roots/root+</nw_nfs_root>
+<max_domain_number>1000</max_domain_number>
+<xi_tools_dir>/usr/local/bin/</xi_tools_dir>
+</domctl_defaults>
diff --git a/tools/control/examples/xenctl.xml-linklocal b/tools/control/examples/xenctl.xml-linklocal
new file mode 100644 (file)
index 0000000..6f1ed1e
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<domctl_defaults>
+<domain_name>XenoLinux</domain_name>
+<domain_size_kb>98304</domain_size_kb>
+<domain_image>/boot/xenolinux.gz</domain_image>
+<domain_vifs>1</domain_vifs>
+<domain_init_rd>/boot/initrd.gz</domain_init_rd>
+<root_device>/dev/ram0</root_device>
+<root_args>rw</root_args>
+<args>init=/linuxrc 4 DOMID=+</args>
+<nw_ip>169.254.1.0+</nw_ip>
+<nw_gw>169.254.1.0</nw_gw>
+<nw_mask>255.255.0.0</nw_mask>
+<nw_nfs_server>169.254.1.0</nw_nfs_server>
+<max_domain_number>1000</max_domain_number>
+<xi_tools_dir>/usr/local/bin/</xi_tools_dir>
+</domctl_defaults>
diff --git a/tools/control/examples/xenctl.xml-publicip b/tools/control/examples/xenctl.xml-publicip
new file mode 100644 (file)
index 0000000..fa78a84
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<domctl_defaults>
+<domain_name>XenoLinux</domain_name>
+<domain_size_kb>98304</domain_size_kb>
+<domain_image>/boot/xenolinux.gz</domain_image>
+<domain_vifs>1</domain_vifs>
+<domain_init_rd>/boot/initrd.gz</domain_init_rd>
+<root_device>/dev/ram0</root_device>
+<root_args>rw</root_args>
+<args>init=/linuxrc 4 DOMID=+</args>
+<nw_ip>=+</nw_ip>
+<nw_gw>=</nw_gw>
+<nw_mask>=</nw_mask>
+<nw_nfs_server>169.254.1.0</nw_nfs_server>
+<max_domain_number>10</max_domain_number>
+<xi_tools_dir>/usr/local/bin/</xi_tools_dir>
+</domctl_defaults>
diff --git a/tools/control/xenctl.xml b/tools/control/xenctl.xml
deleted file mode 100644 (file)
index 1d86847..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<domctl_defaults>
-<xi_tools_dir>/usr/local/bin/</xi_tools_dir>
-<domain_name>XenoLinux</domain_name>
-<domain_size_kb>16000</domain_size_kb>
-<domain_image>./image</domain_image>
-<domain_vifs>1</domain_vifs>
-<root_device>/dev/nfs</root_device>
-<root_args>ro</root_args>
-<nw_ip>=+</nw_ip>
-<nw_gw>=</nw_gw>
-<nw_mask>=</nw_mask>
-<nw_nfs_server>128.232.32.20</nw_nfs_server>
-<nw_nfs_root>/usr/groups/srgboot/moonraider/roots/root+</nw_nfs_root>
-<max_domain_number>10</max_domain_number>
-</domctl_defaults>
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
new file mode 100644 (file)
index 0000000..62e1ab7
--- /dev/null
@@ -0,0 +1,30 @@
+
+CC       = gcc
+CFLAGS   = -Wall -O3 
+CFLAGS  += -I../../xen/include -I../../xenolinux-sparse/include
+
+HDRS     = $(wildcard *.h)
+SRCS     = $(wildcard *.c)
+OBJS     = $(patsubst %.c,%.o,$(SRCS))
+
+TARGETS  = xen_read_console 
+
+INSTALL  = $(TARGETS) xen-mkdevnodes xen-clone
+
+all: $(TARGETS)
+       $(MAKE) -C miniterm     
+
+install: all
+       mkdir -p ../../../install/bin
+       cp -a $(INSTALL) ../../../install/bin
+       chmod 755 ../../../install/bin/xen-mkdevnodes
+       chmod 755 ../../../install/bin/xen-clone
+       $(MAKE) -C miniterm install
+
+clean:
+       $(RM) *.o $(TARGETS)
+       $(MAKE) -C miniterm clean       
+
+%: %.c $(HDRS) Makefile
+       $(CC) $(CFLAGS) -o $@ $<
+
index 945ce335935aa37b21af9841c8387c887b687631..59fd0a17bf62e952def367547b7738800f289809 100644 (file)
@@ -3,5 +3,8 @@ CFLAGS  = -O3 -march=i686 -Wall
 
 all: miniterm
 
+install: all
+       cp -a miniterm ../../../../install/bin/ 
+
 clean:
-       rm -f *.o miniterm *~
\ No newline at end of file
+       rm -f *.o miniterm *~
diff --git a/tools/misc/mkdevnodes b/tools/misc/mkdevnodes
deleted file mode 100755 (executable)
index c29208f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/bash
-
-BASE=${1:?"base directory missing (eg. /dev)"}
-
-rm -f ${BASE}/xhd[abcdefghijklmnop]*
-rm -f ${BASE}/xsd[abcdefghijklmnop]*
-rm -f ${BASE}/xvd[abcdefghijklmnop]*
-
-# XLVIRT is 16 devices of 15 partitions
-
-LETTERS="a b c d e f g h i j k l m n o p"
-PARTITIONS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
-
-j=0
-for l in ${LETTERS}; do
-    mknod ${BASE}/xvd${l} b 125 ${j}
-    for i in ${PARTITIONS}; do
-        mknod ${BASE}/xvd${l}${i} b 125 $(($i+$j))
-    done
-    j=$(($j+16))
-done
index 8e54ca64b294687ca52852255ba6d69d32f7b91b..724873b4964978135f3eddbbfd76b35bec13c7ec 100755 (executable)
@@ -50,13 +50,23 @@ UCCL)
 esac
 
 # clone the master repository (now checked-out by default)
+if [ ! -d ${DEST_BK_REP} ] 
+then 
 bk clone ${BK_REP} ${DEST_BK_REP}
+else
+cd ${DEST_BK_REP}
+bk pull
+cd ${TOP}
+fi
 
 # identify this version of linux
 LINUX_VER=`/bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse | sed -e 's!^.*xenolinux-\([0-9.]\+\)-sparse!\1!'`
 
 # copy in the master Linux tree for this kernel
+if [ ! -d linux-${LINUX_VER} ]
+then
 tar -zxf ${LINUX_DIR}/linux-${LINUX_VER}.tar.gz || tar -zxf ${LINUX_DIR}/linux-${LINUX_VER}.tgz || cp -a ${LINUX_DIR}/linux-${LINUX_VER} . ||  wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${LINUX_VER}.tar.gz -O- | tar -zxf - || exit -1
+fi
 
 # build and install Xen and tools
 cd ${DEST_BK_REP}
diff --git a/tools/misc/xen-mkdevnodes b/tools/misc/xen-mkdevnodes
new file mode 100755 (executable)
index 0000000..37c94de
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+BASE=${1:?"base directory missing (eg. /dev)"}
+
+rm -f ${BASE}/xvd[abcdefghijklmnop]*
+
+# XLVIRT is 16 devices of 15 partitions
+
+LETTERS="a b c d e f g h i j k l m n o p"
+PARTITIONS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
+
+j=0
+for l in ${LETTERS}; do
+    mknod ${BASE}/xvd${l} b 125 ${j}
+    for i in ${PARTITIONS}; do
+        mknod ${BASE}/xvd${l}${i} b 125 $(($i+$j))
+    done
+    j=$(($j+16))
+done