[kteam-tools][PATCH] git-build-kernel: do not cross-compile i386

Kamal Mostafa kamal at canonical.com
Tue Oct 1 16:12:34 UTC 2013


Build amd64 and i386 in $ARCH chroots, instead of CROSS_COMPILE since the
builders don't support cross-compile for i386.  Other $ARCH'es (armhf) still
get CROSS_COMPILE'd in an amd64 chroot.

Signed-off-by: Kamal Mostafa <kamal at canonical.com>
Cc: Brad Figg <brad.figg at canonical.com>
Cc: Steve Conklin <steve.conklin at canonical.com>
---
 git-build-kernel/git-build-kernel | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
index c4a8f6c..c1e885a 100755
--- a/git-build-kernel/git-build-kernel
+++ b/git-build-kernel/git-build-kernel
@@ -81,9 +81,15 @@ then
     CHROOT="${GITREPODIR##ubuntu-}"
     CHROOT="${CHROOT%.git}"
 fi
-### Cross-compile in an amd64 chroot; don't use an ARCH chroot.
-# CHROOT="$CHROOT-$ARCH" # append the arch to the chroot name
-CHROOT="$CHROOT-amd64"
+
+### Compile amd64 and i386 in a native chroot.
+### Cross-compile ARM in an amd64 chroot (for dramatically better performance).
+if [ "$ARCH" = "amd64" -o "$ARCH" = "i386" ]
+then
+	CHROOT="$CHROOT-$ARCH"
+else
+	CHROOT="$CHROOT-amd64"
+fi
 
 ### Get the version number - we need it to locate the orig tarball
 VERSION=`echo "$chg" | sed -n -e '1s/^.*(\([^)]*\)).*$/\1/p'`
-- 
1.8.1.2





More information about the kernel-team mailing list