aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rwxr-xr-xbuild9
2 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7f9ff9bf154..23325b2314f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 28
-EXTRAVERSION = -rc4
+EXTRAVERSION += -rc4
NAME = Killer Bat of Doom
# *DOCUMENTATION*
diff --git a/build b/build
index 8c78e8da403..b2c21b6973c 100755
--- a/build
+++ b/build
@@ -4,7 +4,14 @@ set -x
export CROSS_COMPILE=../../cross/bin/arm-angstrom-linux-gnueabi-
make ARCH=arm silentoldconfig
-if make -j5 ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y ; then
+VERSION=
+if [ -d .git ] ; then
+ HEAD=`git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16`
+ BRANCH=`git branch | grep ^\* | cut -d' ' -f2`
+ VERSION=-$BRANCH:$HEAD
+fi
+
+if make -j5 ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y EXTRAVERSION=$VERSION; then
${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 30008000 -e 30008000 -n "Openmoko Kernel Image Neo1973(GTA02)" -d linux.bin uImage.bin
exit 0