From 1fb11f96850fac573f1481d40b8e643f9c67d4d1 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 4 Nov 2015 03:42:05 +0100 Subject: 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. --- recipes-kernel/linux/linux-toradex_git.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'recipes-kernel/linux/linux-toradex_git.bb') diff --git a/recipes-kernel/linux/linux-toradex_git.bb b/recipes-kernel/linux/linux-toradex_git.bb index 7b9051f..b7013c9 100644 --- a/recipes-kernel/linux/linux-toradex_git.bb +++ b/recipes-kernel/linux/linux-toradex_git.bb @@ -3,6 +3,7 @@ require recipes-kernel/linux/linux-toradex.inc LINUX_VERSION ?= "3.1.10" +LOCALVERSION = "-${PR}" SRCREV_apalis-t30 = "a2d16785572f10d08693b3cb6d45555909fc7b83" PR_apalis-t30 = "V2.5b2" SRCREV_colibri-pxa = "a2d16785572f10d08693b3cb6d45555909fc7b83" @@ -38,7 +39,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 } kernel_do_compile() { -- cgit v1.2.3