aboutsummaryrefslogtreecommitdiffstats
path: root/unmodified_drivers/linux-2.6/mkbuildtree
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-20 10:58:15 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-20 10:58:15 +0100
commit193d77e775b636382b2f2ec1b85a283316f2a92e (patch)
treee32b9c6c0ea8f0e6a0fb407e3025d54006b52d77 /unmodified_drivers/linux-2.6/mkbuildtree
parent5ed80a6a529a5ef04f215adc91009f607d1026b5 (diff)
downloadxen-193d77e775b636382b2f2ec1b85a283316f2a92e.tar.gz
xen-193d77e775b636382b2f2ec1b85a283316f2a92e.tar.bz2
xen-193d77e775b636382b2f2ec1b85a283316f2a92e.zip
Allow default target architecture of PV-on-HVM drivers to be overridden.
Signed-off-by: Travis Betak <travis.betak@amd.com>
Diffstat (limited to 'unmodified_drivers/linux-2.6/mkbuildtree')
-rw-r--r--unmodified_drivers/linux-2.6/mkbuildtree47
1 files changed, 27 insertions, 20 deletions
diff --git a/unmodified_drivers/linux-2.6/mkbuildtree b/unmodified_drivers/linux-2.6/mkbuildtree
index 76e228cbe9..be6b1a6d94 100644
--- a/unmodified_drivers/linux-2.6/mkbuildtree
+++ b/unmodified_drivers/linux-2.6/mkbuildtree
@@ -1,5 +1,13 @@
#! /bin/sh
+if [ $1 ]; then
+ uname="$1"
+else
+ uname=`uname -m`
+ echo "Defaulting to this machine's architecture, $uname, for linking."
+ echo "This may be overridden on the command line (i386,x86_64,ia64)."
+fi
+
C=$PWD
XEN=$C/../../xen
@@ -26,30 +34,29 @@ ln -sf ${XEN}/include/public include/xen/interface
# Need to be quite careful here: we don't want the files we link in to
# risk overriding the native Linux ones (in particular, system.h must
# be native and not xenolinux).
-uname=`uname -m`
case "$uname"
in
"x86_64")
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
- ln -sf ${XL}/include/asm-i386 include/asm-i386
- ;;
+ ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
+ ln -sf ${XL}/include/asm-i386 include/asm-i386
+ ;;
i[34567]86)
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
- ;;
+ ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
+ ;;
"ia64")
- ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
- ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
- ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
- ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
- ;;
+ ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
+ ;;
*)
- echo unknown architecture $uname
- exit 1
- ;;
+ echo unknown architecture $uname
+ exit 1
+ ;;
esac