WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Clean up unmodified_drivers mkbuildtree script

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Clean up unmodified_drivers mkbuildtree script
From: "Travis Betak" <travis.betak@xxxxxxx>
Date: Fri, 1 Sep 2006 16:04:46 -0500 (CDT)
Delivery-date: Fri, 01 Sep 2006 14:05:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The current mkbuildtree script uses `uname -m` when linking the
directories from the xen-sparse directory to unmodified_drivers.  This
doesn't work out well if you are building 32-bit modules on a 64-bit
system.

This patch makes the architecture to be linked against a command line
option -- currently i386 or x86_64.  It also cleans up the indentation a
bit.

Any comments?  Better ideas?

Signed-off-by: Travis Betak <travis.betak@xxxxxxx>

---

diff -r 3e6325b73474 unmodified_drivers/linux-2.6/mkbuildtree
--- a/unmodified_drivers/linux-2.6/mkbuildtree  Fri Sep 01 16:11:51 2006 +0100
+++ b/unmodified_drivers/linux-2.6/mkbuildtree  Fri Sep 01 16:02:29 2006 -0500
@@ -1,4 +1,15 @@
 #! /bin/sh
+
+usage()
+{
+    echo "Usage: mkbuildtree <arch>"
+    echo "supported architectures are i386 and x86_64"
+    exit 1
+}
+
+if [ ! $1 ] ; then
+    usage;
+fi

 C=$PWD

@@ -26,24 +37,22 @@ ln -sf ${XEN}/include/public include/xen
 # 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).
-uname=`uname -m`
-case "$uname"
+case "$1"
 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-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-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-i386 include/asm-i386
+    ;;
+i386)
+    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
+    ;;
 *)
-       echo unknown architecture $uname
-       exit 1
-       ;;
+ usage; + ;;
 esac



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>