diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-11-04 03:42:05 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-11-04 13:51:24 +0100 |
commit | 1fb11f96850fac573f1481d40b8e643f9c67d4d1 (patch) | |
tree | 6bf6eafbd1350c175fedca78695e77e847b04334 | |
parent | 0d9295f31f0bd41a2f166bcd94b57aaed821dd28 (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.
-rw-r--r-- | recipes-kernel/linux/linux-toradex-fsl_git.bb | 11 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-toradex_git.bb | 11 |
2 files changed, 20 insertions, 2 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 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() { |