direct-io.hg

view buildconfigs/enable-xen-config @ 15505:224da1b2c5c2

Add hooks for a script to update kernel configuration after tree has been
prepared. This is to support upstream sources which do not enable Xen in their
default configurations.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Mon Jul 09 11:29:39 2007 +0100 (2007-07-09)
parents
children
line source
1 #!/bin/sh
3 set -ex
5 if [ $# -ne 1 ] ; then
6 echo "Usage $(basename $0) <config-file>" 1>&2
7 exit 1
8 fi
10 CONFIG=$1
12 setopt()
13 {
14 OPTION=$1
15 VALUE=$2
17 # First remove any existing instances of this option
18 sed -e "s/^# ${OPTION} is not set$//g ; s/^^{OPTION}=.$//g" -i "${CONFIG}"
20 # Then append the new value
21 case ${VALUE} in
22 y|m) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;;
23 n) echo "# ${OPTION} is not set" >> "${CONFIG}" ;;
24 *) echo "Invalid value ${VALUE} for ${OPTION}" 1>&2 ; exit 1 ;;
25 esac
26 }
28 setopt CONFIG_PARAVIRT y
29 setopt CONFIG_XEN y
30 setopt CONFIG_VMI y
31 setopt CONFIG_LGUEST n
32 setopt CONFIG_XEN_BLKDEV_FRONTEND y
33 setopt CONFIG_XEN_NETDEV_FRONTEND y
34 setopt CONFIG_HVC_XEN y
36 exit 0