|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] pv-on-hvm: fix/adjust pv driver's mkbuild
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1200670139 0
# Node ID 478c798b9937a6c15905e4c194009684e7c56bf0
# Parent edc95d23493be83569395f290f95b909bd82c24c
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@xxxxxxxxxx>
---
unmodified_drivers/linux-2.6/mkbuildtree | 59 ++++++++++++++++---------------
1 files changed, 32 insertions(+), 27 deletions(-)
diff -r edc95d23493b -r 478c798b9937 unmodified_drivers/linux-2.6/mkbuildtree
--- a/unmodified_drivers/linux-2.6/mkbuildtree Fri Jan 18 15:27:02 2008 +0000
+++ b/unmodified_drivers/linux-2.6/mkbuildtree Fri Jan 18 15:28:59 2008 +0000
@@ -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/xe
# 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
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] pv-on-hvm: fix/adjust pv driver's mkbuildtree,
Xen patchbot-unstable <=
|
|
|
|
|