source: trunk/packages/xen-common/xen-common/unmodified_drivers/linux-2.6/mkbuildtree @ 77

Last change on this file since 77 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#! /bin/sh
2
3if [ $1 ]; then
4    uname="$1"
5else
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)."
9fi
10
11C=$PWD
12
13XEN=$C/../../xen
14XL=$C/../../linux-2.6-xen-sparse
15
16for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
17    if ! echo $d | egrep -q back; then
18        lndir $d $(basename $d) > /dev/null 2>&1
19    fi
20    if ! echo $d | egrep -q ball; then
21        lndir $d $(basename $d) > /dev/null 2>&1
22    fi
23done
24
25ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
26ln -sf ${XL}/drivers/xen/core/features.c platform-pci
27ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus
28ln -sf ${XL}/drivers/xen/core/reboot.c platform-pci
29
30mkdir -p include/asm include/xen
31
32lndir -silent ${XL}/include/xen include/xen
33ln -nsf ${XEN}/include/public include/xen/interface
34
35# Need to be quite careful here: we don't want the files we link in to
36# risk overriding the native Linux ones (in particular, system.h must
37# be native and not xenolinux).
38case "$uname"
39in
40"x86_64")
41    ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
42    ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
43    ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
44    ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
45    mkdir include/asm-i386
46    lndir -silent ${XL}/include/asm-i386 include/asm-i386
47  ;;
48i[34567]86)
49    ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
50    ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
51    ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
52    ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
53  ;;
54"ia64")
55    ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
56    ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
57    ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
58    ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
59    mkdir include/asm/xen
60    ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
61    ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
62    ln -sf ${XL}/arch/ia64/xen/xcom_mini.c platform-pci
63    ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci
64  ;;
65*)
66    echo unknown architecture $uname
67    exit 1
68  ;;
69esac
Note: See TracBrowser for help on using the repository browser.