From 97e8f14b87c39052aeaf017b7e5aef1e329486a0 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 9 Jul 2007 11:29:39 +0100 Subject: 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 --- buildconfigs/enable-xen-config | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 buildconfigs/enable-xen-config (limited to 'buildconfigs/enable-xen-config') 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) " 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 -- cgit v1.2.3