aboutsummaryrefslogtreecommitdiffstats
path: root/distrib
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-05-29 19:25:43 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-05-29 19:25:44 -0700
commit77a5ed00afb5ef40081a59dabf3c90734d12f439 (patch)
tree646cbe40a10884d8f93692630dfb7769bfed1a3e /distrib
parent74416cef69ae7e514f5462da2b43d6d50cf01d2c (diff)
parent88f828e91ff4f13fb3d4f873fc0eedd6ef49a156 (diff)
downloadexternal_qemu-77a5ed00afb5ef40081a59dabf3c90734d12f439.zip
external_qemu-77a5ed00afb5ef40081a59dabf3c90734d12f439.tar.gz
external_qemu-77a5ed00afb5ef40081a59dabf3c90734d12f439.tar.bz2
Merge "[MIPS] Add MIPS support to build-kernel.sh"
Diffstat (limited to 'distrib')
-rwxr-xr-xdistrib/build-kernel.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/distrib/build-kernel.sh b/distrib/build-kernel.sh
index 8c9f50a..4b50353 100755
--- a/distrib/build-kernel.sh
+++ b/distrib/build-kernel.sh
@@ -134,6 +134,10 @@ else
CROSSTOOLCHAIN=i686-linux-android-4.6
CROSSPREFIX=i686-linux-android-
;;
+ mips)
+ CROSSTOOLCHAIN=mipsel-linux-android-4.4.3
+ CROSSPREFIX=mipsel-linux-android-
+ ;;
*)
echo "ERROR: Unsupported architecture!"
exit 1
@@ -148,6 +152,9 @@ case $ARCH in
x86)
ZIMAGE=bzImage
;;
+ mips)
+ ZIMAGE=
+ ;;
esac
# If the cross-compiler is not in the path, try to find it automatically
@@ -165,7 +172,11 @@ if [ $? != 0 ] ; then
BUILD_TOP=$(cd $BUILD_TOP && pwd)
fi
fi
- CROSSPREFIX=$BUILD_TOP/prebuilt/$HOST_TAG/toolchain/$CROSSTOOLCHAIN/bin/$CROSSPREFIX
+ if [ "$ARCH" = "mips" ]; then
+ CROSSPREFIX=$BUILD_TOP/prebuilts/gcc/$HOST_TAG/$ARCH/$CROSSTOOLCHAIN/bin/$CROSSPREFIX
+ else
+ CROSSPREFIX=$BUILD_TOP/prebuilt/$HOST_TAG/toolchain/$CROSSTOOLCHAIN/bin/$CROSSPREFIX
+ fi
if [ "$BUILD_TOP" -a -f ${CROSSPREFIX}gcc ]; then
echo "Auto-config: --cross=$CROSSPREFIX"
else
@@ -225,8 +236,12 @@ case $CONFIG in
OUTPUT_VMLINUX=vmlinux-$CONFIG
esac
-cp -f arch/$ARCH/boot/$ZIMAGE $OUTPUT/$OUTPUT_KERNEL
cp -f vmlinux $OUTPUT/$OUTPUT_VMLINUX
+if [ ! -z $ZIMAGE ]; then
+ cp -f arch/$ARCH/boot/$ZIMAGE $OUTPUT/$OUTPUT_KERNEL
+ echo "Kernel $CONFIG prebuilt images ($OUTPUT_KERNEL and $OUTPUT_VMLINUX) copied to $OUTPUT successfully !"
+else
+ echo "Kernel $CONFIG prebuilt image ($OUTPUT_VMLINUX) copied to $OUTPUT successfully !"
+fi
-echo "Kernel $CONFIG prebuilt images ($OUTPUT_KERNEL and $OUTPUT_VMLINUX) copied to $OUTPUT successfully !"
exit 0