ia64/xen-unstable

view unmodified_drivers/linux-2.6/mkbuildtree @ 16806:edc95d23493b

xenctx/x86: fix format for readability and add information
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jan 18 15:27:02 2008 +0000 (2008-01-18)
parents ea0b57e35c2c
children 478c798b9937
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 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/gnttab_dma.h include/asm
55 mkdir -p include/asm-i386
56 lndir -silent ${XL}/include/asm-i386 include/asm-i386
57 ;;
58 i[34567]86)
59 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
60 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
61 ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
62 ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
63 ln -sf ${XL}/include/asm-i386/mach-xen/asm/gnttab_dma.h include/asm
64 ;;
65 "ia64")
66 ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
67 ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
68 ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
69 ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
70 ln -sf ${XL}/include/asm-ia64/gnttab_dma.h include/asm
71 mkdir -p include/asm/xen
72 ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
73 ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
74 ln -sf ${XL}/arch/ia64/xen/xcom_hcall.c platform-pci/
75 ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci/xencomm_arch.c
76 ln -sf ${XL}/drivers/xen/core/xencomm.c platform-pci
77 ;;
78 *)
79 echo unknown architecture $uname
80 exit 1
81 ;;
82 esac