From 361fff778b7c4d2c78f28833415335148d86a1aa Mon Sep 17 00:00:00 2001 From: merge Date: Fri, 5 Dec 2008 09:59:34 +0000 Subject: MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-build-fix-path-to-toolchain-on-1228470136 pending-tracking-hist top was MERGE-via-stable-tracking-build-fix-path-to-toolchain-on-1228470136 / 21b67ab8e79998b0a534263282dab1dda0f11b00 ... parent commitmessage: From: merge MERGE-via-stable-tracking-hist-build-fix-path-to-toolchain-on stable-tracking-hist top was build-fix-path-to-toolchain-on / ca14ba894df9b28822066c578dde48d7dbe931de ... parent commitmessage: From: Andy Green build-fix-path-to-toolchain-one-at-last.patch Signed-off-by: Andy Green --- build | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build b/build index a0f60e520f7..1726b2d5361 100755 --- a/build +++ b/build @@ -1,10 +1,20 @@ #!/bin/sh +# +# Kernel building helper script (C)2008 Openmoko, Inc +# Andy Green +# +# Licensed under GPLv3 or later +# # set -x -export CROSS_COMPILE=../../cross/bin/arm-angstrom-linux-gnueabi- +export CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi- make ARCH=arm silentoldconfig +# +# figure out what we are building +# + PRODUCT= if [ ! -z "`grep CONFIG_MACH_NEO1973_GTA01=y .config`" ] ; then @@ -32,6 +42,11 @@ if [ -z "$PRODUCT" ] ; then exit 1 fi +# +# get the branch and head hash for the version we are building to +# allow source tracability +# + VERSION= if [ -d .git ] ; then HEAD=`git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16` @@ -42,7 +57,17 @@ fi echo $MKIMAGECMD +# +# actually make it +# + if make -j5 ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y EXTRAVERSION=$VERSION; then + + # + # if the build is happy, postprocess it by strip and with U-Boot header wrapper + # you can get mkimage from U-Boot or Qi build + # + ${CROSS_COMPILE}objcopy -O binary -R .note -R .comment -S arch/arm/boot/compressed/vmlinux linux.bin mkimage -A arm -O linux -T kernel -C none -a $START -e $START -n "OM $PRODUCT $BRANCH""_$HEAD" -d linux.bin uImage-$PRODUCT.bin -- cgit v1.2.3