diff options
author | Chunrong Guo <B40290@freescale.com> | 2014-03-27 13:41:02 +0800 |
---|---|---|
committer | Zhenhua Luo <zhenhua.luo@freescale.com> | 2014-04-02 11:16:59 +0800 |
commit | 18eb1a43e33ec477ba7ec3a4a8f0bdb427206ed5 (patch) | |
tree | 685c1183985ca623d37dce37485f13a37cd939cf /meta-fsl-ppc | |
parent | 2aa3a1ccfa820c8dd3188567a1fbc04ccef21a15 (diff) | |
download | meta-freescale-18eb1a43e33ec477ba7ec3a4a8f0bdb427206ed5.tar.gz |
linux-qoriq-sdk: add git revision to the local version
Signed-off-by: Chunrong Guo <B40290@freescale.com>
Diffstat (limited to 'meta-fsl-ppc')
-rw-r--r-- | meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb index 0ff68ced9..275691ab5 100644 --- a/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb +++ b/meta-fsl-ppc/recipes-kernel/linux/linux-qoriq-sdk.bb | |||
@@ -9,6 +9,8 @@ require recipes-kernel/linux/linux-qoriq-sdk.inc | |||
9 | 9 | ||
10 | PR = "${INC_PR}.1" | 10 | PR = "${INC_PR}.1" |
11 | 11 | ||
12 | SCMVERSION ?= "y" | ||
13 | |||
12 | DEPENDS_append = " libgcc" | 14 | DEPENDS_append = " libgcc" |
13 | KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" | 15 | KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" |
14 | KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" | 16 | KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" |
@@ -23,7 +25,13 @@ do_configure_prepend() { | |||
23 | fi | 25 | fi |
24 | 26 | ||
25 | # append sdk version in kernel version if SDK_VERSION is defined | 27 | # append sdk version in kernel version if SDK_VERSION is defined |
26 | if [ -n "${SDK_VERSION}" ]; then | 28 | if [ -n "${SDK_VERSION}" ]; then |
27 | echo "CONFIG_LOCALVERSION=\"-${SDK_VERSION}\"" >> ${S}/.config | 29 | echo "CONFIG_LOCALVERSION=\"-${SDK_VERSION}\"" >> ${S}/.config |
28 | fi | 30 | fi |
31 | |||
32 | # Add GIT revision to the local version | ||
33 | if [ "${SCMVERSION}" = "y" ]; then | ||
34 | head=`git rev-parse --verify --short HEAD 2> /dev/null` | ||
35 | printf "%s%s" +g $head > ${S}/.scmversion | ||
36 | fi | ||
29 | } | 37 | } |