summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2015-11-04 03:42:05 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-11-04 13:51:24 +0100
commitebc2b43e83e8e4fc29c7c5d814050142f0a9dcda (patch)
treec8b6413c0ecaddc3b47e61493ae4b68805d40316 /recipes-kernel/linux
parent58a08ce48012bfc356c0b3d78bd05e854d671f5a (diff)
apalis/colibri_imx6/t20/t30: add version/git hash to Kernel
Add LOCALVERSION and generate a scmversion file to annotate the Kernel with the Toradex release and a git hash.
Diffstat (limited to 'recipes-kernel/linux')
-rw-r--r--recipes-kernel/linux/linux-toradex-fsl_git.bb11
1 files changed, 10 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-toradex-fsl_git.bb b/recipes-kernel/linux/linux-toradex-fsl_git.bb
index cccedd7..ca07f8d 100644
--- a/recipes-kernel/linux/linux-toradex-fsl_git.bb
+++ b/recipes-kernel/linux/linux-toradex-fsl_git.bb
@@ -11,6 +11,7 @@ DEPENDS += "lzop-native "
LINUX_VERSION_mx6 = "3.14.28"
+LOCALVERSION = "-${PR}"
SRCREV_mx6 = "77e525493f74f9f2e33a41e9e65b54e810ac3dd0"
PR_mx6 = "V2.5b2"
@@ -43,7 +44,15 @@ do_configure_prepend () {
oe_runmake $DEFCONFIG
#maybe change some configuration
- config_script
+ config_script
+
+ #Add Toradex BSP Version as LOCALVERSION
+ sed -i -e /CONFIG_LOCALVERSION/d ${B}/.config
+ echo "CONFIG_LOCALVERSION=\"${LOCALVERSION}\"" >> ${B}/.config
+
+ #Add GIT revision to the local version
+ head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
+ printf "%s%s" +g $head > ${S}/.scmversion
}
# We need to pass it as param since kernel might support more then one