ia64/xen-unstable

view install.sh @ 9203:5ea87acc07dc

Adds a new device interface to xend/xm similar to the one for ioports
where an interrupt (irq) can be specified in the configuration file
and permission to bind to that interrupt will be given to a driver
domain.

This functionality could be used when trying to give a legacy device
to a driver domain. For example, by specifying the i/o ports and the
interrupt of your serial controller, you can use this patch to put a
serial port in a driver domain. This was discussed briefly on
xen-users in regards to using an external modem in a domU:

http://article.gmane.org/gmane.comp.emulators.xen.devel/20573
http://article.gmane.org/gmane.comp.emulators.xen.user/8754

Also adds the ability to specify irqs on the xm command-line when
creating a domain (the following examples show a serial port being
given to a domU):

xm create serial-dd irq=4 ioports=03f8-03ff

or in a flat config-file:

irq = [4]
ioports = ['03f8-03ff']

or in an SXP config file:

(device (irq (irq 4)))
(device (ioports (from '0x03f8')(to '0x03ff')))

The ioports functionality is already in xen, but this patch also fixes a
bug with it that I assume cropped up due to changes in xend since it was
submitted ('dev' doesn't exist in iopif.py, returning 'None' seems to be
the solution).

Also adds some in-line documentation in tools/python/xen/xm/create.py
to be more accurate regarding adding pci devices and i/o ports on the
command-line.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 09 11:20:31 2006 +0100 (2006-03-09)
parents e639d53330ba
children edfdeb150f27
line source
1 #!/bin/sh
3 src='./install'
4 if [ -d ./dist ]; then
5 src='./dist/install'
6 fi
8 if ! [ -d $src ]; then
9 echo "ERROR: Could not find a valid distribution directory."
10 echo " If this is a source-only release, try 'make dist'."
11 exit 1
12 fi
14 dst='/'
15 if [ $# -ne 0 ]; then
16 dst=$1
17 fi
19 if ! [ -d $dst ]; then
20 echo "ERROR: You must specify a valid install directory."
21 echo " The specified directory '$dst' is not valid."
22 exit 1
23 fi
25 tmp="`mktemp -d`"
27 echo "Installing Xen from '$src' to '$dst'..."
28 (cd $src; tar -cf - * ) | tar -C "$tmp" -xf -
30 [ -x "$(which udevinfo)" ] && \
31 UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
33 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
34 echo " - installing for udev-based system"
35 rm -rf "$tmp/etc/hotplug"
36 else
37 echo " - installing for hotplug-based system"
38 rm -rf "$tmp/etc/udev"
39 fi
41 echo " - modifying permissions"
42 chmod -R a+rX "$tmp"
44 (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf -
45 rm -rf "$tmp"
47 echo "All done."
49 echo "Checking to see whether prerequisite tools are installed..."
50 cd $src/../check
51 ./chk install
52 echo "All done."
54 exit 0