aboutsummaryrefslogtreecommitdiffstats
path: root/unmodified_drivers
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-01-18 15:28:59 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-01-18 15:28:59 +0000
commit8c1a6f6d9d23bb27298ff24f1b134f38a6e28ebf (patch)
tree6caf24f96719bf6fde21f3ce09a1f818e76a7810 /unmodified_drivers
parent7c6b4bb8e891b4cd0d724cf212454192a45a9cbf (diff)
downloadxen-8c1a6f6d9d23bb27298ff24f1b134f38a6e28ebf.tar.gz
xen-8c1a6f6d9d23bb27298ff24f1b134f38a6e28ebf.tar.bz2
xen-8c1a6f6d9d23bb27298ff24f1b134f38a6e28ebf.zip
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>
Diffstat (limited to 'unmodified_drivers')
-rwxr-xr-xunmodified_drivers/linux-2.6/mkbuildtree59
1 files changed, 32 insertions, 27 deletions
diff --git a/unmodified_drivers/linux-2.6/mkbuildtree b/unmodified_drivers/linux-2.6/mkbuildtree
index 741dabc52a..88985a5063 100755
--- a/unmodified_drivers/linux-2.6/mkbuildtree
+++ b/unmodified_drivers/linux-2.6/mkbuildtree
@@ -8,27 +8,28 @@ else
echo "This may be overridden on the command line (i386,x86_64,ia64)."
fi
-C=$PWD
+C=$(cd $(dirname $0) && pwd)
+R=${C%/*/*}
if [ -n "$XEN" -a -d "$XEN" ]; then
XEN=$(cd $XEN && pwd)
else
- XEN=$C/../../xen
+ XEN=$R/xen
fi
+echo "Xen tree: $XEN"
if [ -n "$XL" -a -d "$XL" ]; then
XL=$(cd $XL && pwd)
else
- XL=$C/../../linux-2.6.18-xen.hg
+ XL=$R/linux-2.6.18-xen.hg
fi
+echo "Linux tree: $XL"
-for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
- if ! echo $d | egrep -q back; then
- lndir $d $(basename $d) > /dev/null 2>&1
- fi
- if ! echo $d | egrep -q ball; then
- lndir $d $(basename $d) > /dev/null 2>&1
- fi
+cd $C
+
+for d in $(find ${XL}/drivers/xen/ -mindepth 1 -maxdepth 1 -type d); do
+ test -d $(basename $d) || continue
+ lndir $d $(basename $d) > /dev/null 2>&1
done
ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
@@ -44,23 +45,27 @@ ln -nsf ${XEN}/include/public include/xen/interface
# Need to be quite careful here: we don't want the files we link in to
# risk overriding the native Linux ones (in particular, system.h must
# be native and not xenolinux).
-case "$uname"
-in
-"x86_64")
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/gnttab_dma.h include/asm
- mkdir -p include/asm-i386
- lndir -silent ${XL}/include/asm-i386 include/asm-i386
- ;;
-i[34567]86)
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/gnttab_dma.h include/asm
+case "$uname" in
+i[34567]86|x86_64)
+ if [ -d ${XL}/include/asm-x86 ]; then
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/hypercall*.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/synch_bitops*.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/maddr*.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/gnttab_dma.h include/asm
+ else
+ if [ $uname = x86_64 ]; then
+ mkdir -p include/asm-i386
+ lndir -silent ${XL}/include/asm-i386 include/asm-i386
+ else
+ uname=i386
+ fi
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/maddr.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/gnttab_dma.h include/asm
+ fi
;;
"ia64")
ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm