direct-io.hg

changeset 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 27768e6ca214
children 8426e8a36290
files buildconfigs/enable-xen-config buildconfigs/mk.linux-2.6-paravirt buildconfigs/mk.linux-2.6-xen
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/buildconfigs/enable-xen-config	Mon Jul 09 11:29:39 2007 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +set -ex
     1.7 +
     1.8 +if [ $# -ne 1 ] ; then
     1.9 +	echo "Usage $(basename $0) <config-file>" 1>&2
    1.10 +	exit 1
    1.11 +fi
    1.12 +
    1.13 +CONFIG=$1
    1.14 +
    1.15 +setopt()
    1.16 +{
    1.17 +	OPTION=$1
    1.18 +	VALUE=$2
    1.19 +
    1.20 +	# First remove any existing instances of this option
    1.21 +	sed -e "s/^# ${OPTION} is not set$//g ; s/^^{OPTION}=.$//g" -i "${CONFIG}"
    1.22 +
    1.23 +	# Then append the new value
    1.24 +	case ${VALUE} in
    1.25 +	    y|m) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;;
    1.26 +	    n)   echo "# ${OPTION} is not set" >> "${CONFIG}" ;;
    1.27 +	    *)   echo "Invalid value ${VALUE} for ${OPTION}" 1>&2 ; exit 1 ;;
    1.28 +	esac
    1.29 +}
    1.30 +
    1.31 +setopt CONFIG_PARAVIRT y
    1.32 +setopt CONFIG_XEN y
    1.33 +setopt CONFIG_VMI y
    1.34 +setopt CONFIG_LGUEST n
    1.35 +setopt CONFIG_XEN_BLKDEV_FRONTEND y
    1.36 +setopt CONFIG_XEN_NETDEV_FRONTEND y
    1.37 +setopt CONFIG_HVC_XEN y
    1.38 +
    1.39 +exit 0
     2.1 --- a/buildconfigs/mk.linux-2.6-paravirt	Mon Jul 09 11:29:30 2007 +0100
     2.2 +++ b/buildconfigs/mk.linux-2.6-paravirt	Mon Jul 09 11:29:39 2007 +0100
     2.3 @@ -8,6 +8,8 @@ IMAGE_TARGET ?= vmlinux bzImage
     2.4  
     2.5  XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y
     2.6  
     2.7 -EXTRAVERSION ?=
     2.8 +XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
     2.9 +
    2.10 +EXTRAVERSION ?= -paravirt
    2.11  
    2.12  include buildconfigs/mk.linux-2.6-xen
     3.1 --- a/buildconfigs/mk.linux-2.6-xen	Mon Jul 09 11:29:30 2007 +0100
     3.2 +++ b/buildconfigs/mk.linux-2.6-xen	Mon Jul 09 11:29:39 2007 +0100
     3.3 @@ -74,6 +74,10 @@ endif
     3.4  	else \
     3.5            echo "No configuration method found for this kernel" ; \
     3.6  	fi
     3.7 +ifneq ($(XEN_LINUX_CONFIG_UPDATE),)
     3.8 +	echo "Updating $(CONFIG_FILE) using $(XEN_LINUX_CONFIG_UPDATE)"
     3.9 +	sh $(XEN_LINUX_CONFIG_UPDATE) $(CONFIG_FILE)
    3.10 +endif
    3.11  ifeq ($(XEN_TARGET_ARCH),x86_32)
    3.12  ifeq ($(pae),y)
    3.13  	sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)