ia64/xen-unstable

view unmodified_drivers/linux-2.6/mkbuildtree @ 15282:f5a71c9771a8

pv-on-hvm: Allow Linux and Xen paths to be overridden by the environment.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Jun 06 17:49:39 2007 +0100 (2007-06-06)
parents 736e7cf0a3a5
children 276b48771f1e
line source
1 #! /bin/sh
3 if [ $1 ]; then
4 uname="$1"
5 else
6 uname=`uname -m`
7 echo "Defaulting to this machine's architecture, $uname, for linking."
8 echo "This may be overridden on the command line (i386,x86_64,ia64)."
9 fi
11 C=$PWD
13 if [ -n "$XEN" -a -d "$XEN" ]; then
14 XEN=$(cd $XEN && pwd)
15 else
16 XEN=$C/../../xen
17 fi
19 if [ -n "$XL" -a -d "$XL" ]; then
20 XL=$(cd $XL && pwd)
21 else
22 XL=$C/../../linux-2.6.18-xen.hg
23 fi
25 for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
26 if ! echo $d | egrep -q back; then
27 lndir $d $(basename $d) > /dev/null 2>&1
28 fi
29 if ! echo $d | egrep -q ball; then
30 lndir $d $(basename $d) > /dev/null 2>&1
31 fi
32 done
34 ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
35 ln -sf ${XL}/drivers/xen/core/features.c platform-pci
36 ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus
37 ln -sf ${XL}/drivers/xen/core/reboot.c platform-pci
39 mkdir -p include/asm include/xen
41 lndir -silent ${XL}/include/xen include/xen
42 ln -nsf ${XEN}/include/public include/xen/interface
44 # Need to be quite careful here: we don't want the files we link in to
45 # risk overriding the native Linux ones (in particular, system.h must
46 # be native and not xenolinux).
47 case "$uname"
48 in
49 "x86_64")
50 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
51 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
52 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
53 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
54 mkdir -p include/asm-i386
55 lndir -silent ${XL}/include/asm-i386 include/asm-i386
56 ;;
57 i[34567]86)
58 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
59 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
60 ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
61 ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
62 ;;
63 "ia64")
64 ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
65 ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
66 ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
67 ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
68 mkdir -p include/asm/xen
69 ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
70 ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
71 ln -sf ${XL}/arch/ia64/xen/xcom_mini.c platform-pci
72 ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci
73 ;;
74 *)
75 echo unknown architecture $uname
76 exit 1
77 ;;
78 esac