ia64/xen-unstable
changeset 16807:478c798b9937
pv-on-hvm: fix/adjust pv driver's mkbuildtree
Allow invoking the script from other than the current directory (the
script now infers the tree is where the script lives). Print which
trees are actually being used.
Fix the linking of sources from Linux tree's drivers/xen/ - this was
needlessly invoking lndir on various sub-directories, in some cases
even twice.
Adjust the script to be able to deal with Linux 2.6.24's unified x86
include directory.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Allow invoking the script from other than the current directory (the
script now infers the tree is where the script lives). Print which
trees are actually being used.
Fix the linking of sources from Linux tree's drivers/xen/ - this was
needlessly invoking lndir on various sub-directories, in some cases
even twice.
Adjust the script to be able to deal with Linux 2.6.24's unified x86
include directory.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Fri Jan 18 15:28:59 2008 +0000 (2008-01-18) |
parents | edc95d23493b |
children | 692a91e3b262 |
files | unmodified_drivers/linux-2.6/mkbuildtree |
line diff
1.1 --- a/unmodified_drivers/linux-2.6/mkbuildtree Fri Jan 18 15:27:02 2008 +0000 1.2 +++ b/unmodified_drivers/linux-2.6/mkbuildtree Fri Jan 18 15:28:59 2008 +0000 1.3 @@ -8,27 +8,28 @@ else 1.4 echo "This may be overridden on the command line (i386,x86_64,ia64)." 1.5 fi 1.6 1.7 -C=$PWD 1.8 +C=$(cd $(dirname $0) && pwd) 1.9 +R=${C%/*/*} 1.10 1.11 if [ -n "$XEN" -a -d "$XEN" ]; then 1.12 XEN=$(cd $XEN && pwd) 1.13 else 1.14 - XEN=$C/../../xen 1.15 + XEN=$R/xen 1.16 fi 1.17 +echo "Xen tree: $XEN" 1.18 1.19 if [ -n "$XL" -a -d "$XL" ]; then 1.20 XL=$(cd $XL && pwd) 1.21 else 1.22 - XL=$C/../../linux-2.6.18-xen.hg 1.23 + XL=$R/linux-2.6.18-xen.hg 1.24 fi 1.25 +echo "Linux tree: $XL" 1.26 1.27 -for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do 1.28 - if ! echo $d | egrep -q back; then 1.29 - lndir $d $(basename $d) > /dev/null 2>&1 1.30 - fi 1.31 - if ! echo $d | egrep -q ball; then 1.32 - lndir $d $(basename $d) > /dev/null 2>&1 1.33 - fi 1.34 +cd $C 1.35 + 1.36 +for d in $(find ${XL}/drivers/xen/ -mindepth 1 -maxdepth 1 -type d); do 1.37 + test -d $(basename $d) || continue 1.38 + lndir $d $(basename $d) > /dev/null 2>&1 1.39 done 1.40 1.41 ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci 1.42 @@ -44,23 +45,27 @@ ln -nsf ${XEN}/include/public include/xe 1.43 # Need to be quite careful here: we don't want the files we link in to 1.44 # risk overriding the native Linux ones (in particular, system.h must 1.45 # be native and not xenolinux). 1.46 -case "$uname" 1.47 -in 1.48 -"x86_64") 1.49 - ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm 1.50 - ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm 1.51 - ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm 1.52 - ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm 1.53 - ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/gnttab_dma.h include/asm 1.54 - mkdir -p include/asm-i386 1.55 - lndir -silent ${XL}/include/asm-i386 include/asm-i386 1.56 - ;; 1.57 -i[34567]86) 1.58 - ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm 1.59 - ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm 1.60 - ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm 1.61 - ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm 1.62 - ln -sf ${XL}/include/asm-i386/mach-xen/asm/gnttab_dma.h include/asm 1.63 +case "$uname" in 1.64 +i[34567]86|x86_64) 1.65 + if [ -d ${XL}/include/asm-x86 ]; then 1.66 + ln -sf ${XL}/include/asm-x86/mach-xen/asm/hypervisor.h include/asm 1.67 + ln -sf ${XL}/include/asm-x86/mach-xen/asm/hypercall*.h include/asm 1.68 + ln -sf ${XL}/include/asm-x86/mach-xen/asm/synch_bitops*.h include/asm 1.69 + ln -sf ${XL}/include/asm-x86/mach-xen/asm/maddr*.h include/asm 1.70 + ln -sf ${XL}/include/asm-x86/mach-xen/asm/gnttab_dma.h include/asm 1.71 + else 1.72 + if [ $uname = x86_64 ]; then 1.73 + mkdir -p include/asm-i386 1.74 + lndir -silent ${XL}/include/asm-i386 include/asm-i386 1.75 + else 1.76 + uname=i386 1.77 + fi 1.78 + ln -sf ${XL}/include/asm-$uname/mach-xen/asm/hypervisor.h include/asm 1.79 + ln -sf ${XL}/include/asm-$uname/mach-xen/asm/hypercall.h include/asm 1.80 + ln -sf ${XL}/include/asm-$uname/mach-xen/asm/synch_bitops.h include/asm 1.81 + ln -sf ${XL}/include/asm-$uname/mach-xen/asm/maddr.h include/asm 1.82 + ln -sf ${XL}/include/asm-$uname/mach-xen/asm/gnttab_dma.h include/asm 1.83 + fi 1.84 ;; 1.85 "ia64") 1.86 ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm