[kteam-tools][PATCH] git-build-kernel: cross-compile instead of $ARCH chroot

Kamal Mostafa kamal at canonical.com
Thu Sep 12 17:00:48 UTC 2013


ACK's in irc.  Applied.

 -Kamal


On Thu, 2013-09-12 at 09:57 -0700, Kamal Mostafa wrote:
> 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 | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
> index a62d00c..c4a8f6c 100755
> --- a/git-build-kernel/git-build-kernel
> +++ b/git-build-kernel/git-build-kernel
> @@ -81,7 +81,9 @@ then
>      CHROOT="${GITREPODIR##ubuntu-}"
>      CHROOT="${CHROOT%.git}"
>  fi
> -CHROOT="$CHROOT-$ARCH" # append the arch to the chroot name
> +### 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"
>  
>  ### Get the version number - we need it to locate the orig tarball
>  VERSION=`echo "$chg" | sed -n -e '1s/^.*(\([^)]*\)).*$/\1/p'`
> @@ -115,6 +117,7 @@ trap "rm -rf $WORKDIR/building $BUILDDIR" 0
>  echo "git-build-kernel ($CHROOT)"
>  echo "      version: $DISTRO ($VERSION)"
>  echo "      targets: $TARGETS"
> +echo "         arch: $ARCH"
>  echo "  starting build in $HOSTNAME:$WORKDIR ..."
>  
>  function show_elapsed
> @@ -145,6 +148,8 @@ show_elapsed &
>  		set -e
>  		set -x
>  		cd "$BUILDDIR"
> +		export \$(dpkg-architecture -a$ARCH)
> +		[ \$DEB_BUILD_ARCH != \$DEB_HOST_ARCH ] && export CROSS_COMPILE="\${DEB_HOST_GNU_TYPE}-"
>  		fakeroot debian/rules clean
>  		if [ $do_source_pkg = 1 ]
>  		then

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20130912/37f25e79/attachment.sig>


More information about the kernel-team mailing list