ia64/xen-unstable

view buildconfigs/enable-xen-config @ 17044:419a141ca16d

[BUILD] Fixup support for building upstream kernels.

In particular:
- support merged x86 architecture. To facilitate this it made sense
to encode some existing logic in shell scripts rather than
increasing complicated make conditionals.
- set CONFIG_PARAVIRT_GUEST=y which is required for newer kernels.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 12 14:59:01 2008 +0000 (2008-02-12)
parents 0eaa9f605b92
children 761604c6136d
line source
1 #!/bin/sh
3 set -e
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_PARAVIRT_GUEST y
30 setopt CONFIG_XEN y
31 setopt CONFIG_VMI y
32 setopt CONFIG_KVM y
33 setopt CONFIG_KVM_INTEL y
34 setopt CONFIG_KVM_AMD y
35 setopt CONFIG_LGUEST n
36 setopt CONFIG_XEN_BLKDEV_FRONTEND y
37 setopt CONFIG_XEN_NETDEV_FRONTEND y
38 setopt CONFIG_HVC_XEN y
39 setopt CONFIG_NUMA n
41 case ${XEN_TARGET_ARCH} in
42 x86_32) setopt CONFIG_64BIT n ;;
43 x86_64) setopt CONFIG_64BIT y ;;
44 *) ;;
45 esac
47 exit 0