aboutsummaryrefslogtreecommitdiffstats
path: root/buildconfigs/select-linux-arch
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-02-12 14:59:01 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-02-12 14:59:01 +0000
commit3eae93972b9e0b74e3060603d29eebec7d89d14a (patch)
tree2b12334583c5203f37d793cb7f9b0152864025d8 /buildconfigs/select-linux-arch
parentb650bde790d6e2c918de3d2ce3b2a89d56b25896 (diff)
downloadxen-3eae93972b9e0b74e3060603d29eebec7d89d14a.tar.gz
xen-3eae93972b9e0b74e3060603d29eebec7d89d14a.tar.bz2
xen-3eae93972b9e0b74e3060603d29eebec7d89d14a.zip
[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>
Diffstat (limited to 'buildconfigs/select-linux-arch')
-rwxr-xr-xbuildconfigs/select-linux-arch30
1 files changed, 30 insertions, 0 deletions
diff --git a/buildconfigs/select-linux-arch b/buildconfigs/select-linux-arch
new file mode 100755
index 0000000000..a5d0856e12
--- /dev/null
+++ b/buildconfigs/select-linux-arch
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+ME=$(basename $0)
+
+if [ $# -lt 1 ] || [ $# -gt 2 ] ; then
+ echo "usage: $ME <linux-build-directory>" 1>&2
+ exit 1;
+fi
+
+LINUX_DIR=$1
+
+case ${XEN_TARGET_ARCH} in
+ x86_32|x86_64)
+ if [ -d ${LINUX_DIR}/arch/x86 ] ; then
+ ARCH=x86
+ elif [ "${XEN_TARGET_ARCH}" = "x86_32" ] ; then
+ ARCH=i386
+ else
+ ARCH=x86_64
+ fi
+ ;;
+ *)
+ ARCH=${XEN_TARGET_ARCH}
+ ;;
+esac
+
+echo "$ME: ${ARCH}" 1>&2
+echo ${ARCH}
+
+exit 0