debuggers.hg

annotate unmodified_drivers/linux-2.6/mkbuildtree @ 12243:af1403dd13af

PV-on-HVM: Use ln -nsf in mkbuildtree to avoid creating a symlink loop
if include/xen/interfaces already exists.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Thu Nov 02 11:56:26 2006 +0000 (2006-11-02)
parents eb3fe0620e3d
children fcaf34bc5e41
rev   line source
kfraser@11202 1 #! /bin/sh
kfraser@11202 2
kfraser@11885 3 if [ $1 ]; then
kfraser@11885 4 uname="$1"
kfraser@11885 5 else
kfraser@11885 6 uname=`uname -m`
kfraser@11885 7 echo "Defaulting to this machine's architecture, $uname, for linking."
kfraser@11885 8 echo "This may be overridden on the command line (i386,x86_64,ia64)."
kfraser@11885 9 fi
kfraser@11885 10
kfraser@11202 11 C=$PWD
kfraser@11202 12
kfraser@11202 13 XEN=$C/../../xen
kfraser@11202 14 XL=$C/../../linux-2.6-xen-sparse
kfraser@11202 15
kfraser@11209 16 for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
kfraser@11209 17 if ! echo $d | egrep -q back; then
kfraser@11209 18 lndir $d $(basename $d) > /dev/null 2>&1
kfraser@11209 19 fi
kfraser@11209 20 done
kfraser@11209 21
kfraser@11203 22 ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
kfraser@11202 23 ln -sf ${XL}/drivers/xen/core/features.c platform-pci
kfraser@11209 24 ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus
ssmith@12074 25 ln -sf ${XL}/drivers/xen/core/reboot.c util
kfraser@11202 26
kfraser@11202 27 mkdir -p include
kfraser@11202 28 mkdir -p include/xen
kfraser@11202 29 mkdir -p include/public
kfraser@11202 30 mkdir -p include/asm
awilliam@12012 31 mkdir -p include/asm/xen
kfraser@11202 32
kfraser@11202 33 lndir -silent ${XL}/include/xen include/xen
ian@12243 34 ln -nsf ${XEN}/include/public include/xen/interface
kfraser@11202 35
kfraser@11202 36 # Need to be quite careful here: we don't want the files we link in to
kfraser@11202 37 # risk overriding the native Linux ones (in particular, system.h must
kfraser@11202 38 # be native and not xenolinux).
kfraser@11202 39 case "$uname"
kfraser@11202 40 in
kfraser@11202 41 "x86_64")
kfraser@11885 42 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
kfraser@11885 43 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
kfraser@11885 44 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
kfraser@11885 45 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
kfraser@11885 46 ln -sf ${XL}/include/asm-i386 include/asm-i386
kfraser@11885 47 ;;
kfraser@11202 48 i[34567]86)
kfraser@11885 49 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
kfraser@11885 50 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
kfraser@11885 51 ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
kfraser@11885 52 ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
kfraser@11885 53 ;;
kaf24@11502 54 "ia64")
kfraser@11885 55 ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
kfraser@11885 56 ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
kfraser@11885 57 ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
kfraser@11885 58 ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
awilliam@12036 59 ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
awilliam@12036 60 ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
awilliam@12036 61 ln -sf ${XL}/arch/ia64/xen/xcom_mini.c platform-pci
awilliam@12036 62 ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci
kfraser@11885 63 ;;
kfraser@11202 64 *)
kfraser@11885 65 echo unknown architecture $uname
kfraser@11885 66 exit 1
kfraser@11885 67 ;;
kfraser@11202 68 esac