1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-19 05:13:09 +02:00
openwrt-xburst/target/linux/s3c24xx/patches-2.6.24/1255-add-build-git-head-info.patch.patch
mirko fc54b9bf15 changed Makefile and profiles, added patches for kernel 2.6.24
(stable-branch of Openmoko)


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13613 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-12-12 11:58:53 +00:00

57 lines
1.6 KiB
Diff

From 0c67caf29d655f9ce1c53f8e1433c59d86e04193 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@openmoko.com>
Date: Wed, 6 Aug 2008 20:27:23 +0100
Subject: [PATCH] add-build-git-head-info.patch
This patch adds the branch and truncated head has to the version of the
kernel
# cat /proc/version
Linux version 2.6.26-andy-2.6.26:2b3bf342baac52b9-mokodev (agreen@pads.home.warmcat.com) (gcc version 4.1.2) #878 PREEMPT Sun Jul 27 14:45:25 BST 2008
Note this versioning is visible down /lib/modules
Signed-off-by: Andy Green <andy@openmoko.com>
---
Makefile | 2 +-
build | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 189d8ef..e6f7941 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 24
-EXTRAVERSION =
+EXTRAVERSION +=
NAME = Arr Matey! A Hairy Bilge Rat!
# *DOCUMENTATION*
diff --git a/build b/build
index 12e06bf..9c2d561 100755
--- a/build
+++ b/build
@@ -5,7 +5,15 @@ set -x
export CROSS_COMPILE=../../cross/bin/arm-angstrom-linux-gnueabi-
make -f synthesize-gta-module-configs.mak
make ARCH=arm silentoldconfig
-if make -j5 ARCH=arm; 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 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
--
1.5.6.5