diff options
author | Ian Campbell <ian.campbell@xensource.com> | 2007-07-09 11:29:39 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@xensource.com> | 2007-07-09 11:29:39 +0100 |
commit | 97e8f14b87c39052aeaf017b7e5aef1e329486a0 (patch) | |
tree | 70a05aa27be81cdeb5188a76bb49b0022cf10c57 /buildconfigs/enable-xen-config | |
parent | 2141bdd107a177a87f010853ee998107ae77bb96 (diff) | |
download | xen-97e8f14b87c39052aeaf017b7e5aef1e329486a0.tar.gz xen-97e8f14b87c39052aeaf017b7e5aef1e329486a0.tar.bz2 xen-97e8f14b87c39052aeaf017b7e5aef1e329486a0.zip |
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>
Diffstat (limited to 'buildconfigs/enable-xen-config')
-rw-r--r-- | buildconfigs/enable-xen-config | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/buildconfigs/enable-xen-config b/buildconfigs/enable-xen-config new file mode 100644 index 0000000000..b427a12d90 --- /dev/null +++ b/buildconfigs/enable-xen-config @@ -0,0 +1,36 @@ +#!/bin/sh + +set -ex + +if [ $# -ne 1 ] ; then + echo "Usage $(basename $0) <config-file>" 1>&2 + exit 1 +fi + +CONFIG=$1 + +setopt() +{ + OPTION=$1 + VALUE=$2 + + # First remove any existing instances of this option + sed -e "s/^# ${OPTION} is not set$//g ; s/^^{OPTION}=.$//g" -i "${CONFIG}" + + # Then append the new value + case ${VALUE} in + y|m) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;; + n) echo "# ${OPTION} is not set" >> "${CONFIG}" ;; + *) echo "Invalid value ${VALUE} for ${OPTION}" 1>&2 ; exit 1 ;; + esac +} + +setopt CONFIG_PARAVIRT y +setopt CONFIG_XEN y +setopt CONFIG_VMI y +setopt CONFIG_LGUEST n +setopt CONFIG_XEN_BLKDEV_FRONTEND y +setopt CONFIG_XEN_NETDEV_FRONTEND y +setopt CONFIG_HVC_XEN y + +exit 0 |