aboutsummaryrefslogtreecommitdiffstats
path: root/distrib
diff options
context:
space:
mode:
authorBhanu Chetlapalli <bhanu@mips.com>2012-05-21 16:39:51 -0700
committerBhanu Chetlapalli <bhanu@mips.com>2012-05-21 16:39:51 -0700
commit88f828e91ff4f13fb3d4f873fc0eedd6ef49a156 (patch)
treeeaff1468038bd2bcfd9c198fbadce6b433a6105b /distrib
parentf808ea33913102e45ab1d91197ac5e59b01ef158 (diff)
downloadexternal_qemu-88f828e91ff4f13fb3d4f873fc0eedd6ef49a156.zip
external_qemu-88f828e91ff4f13fb3d4f873fc0eedd6ef49a156.tar.gz
external_qemu-88f828e91ff4f13fb3d4f873fc0eedd6ef49a156.tar.bz2
[MIPS] Add MIPS support to build-kernel.sh
Enables building of mips goldfish kernel Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com>
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 20d85c6..ec5c4f1 100755
--- a/distrib/build-kernel.sh
+++ b/distrib/build-kernel.sh
@@ -134,6 +134,10 @@ else
CROSSTOOLCHAIN=i686-android-linux-4.4.3
CROSSPREFIX=i686-android-linux-
;;
+ 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