From: Chunrong Guo <[email protected]>

Signed-off-by: Chunrong Guo <[email protected]>
---
 recipes-kernel/linux/linux-qoriq-sdk.bb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/recipes-kernel/linux/linux-qoriq-sdk.bb 
b/recipes-kernel/linux/linux-qoriq-sdk.bb
index 0ff68ce..50d6e62 100644
--- a/recipes-kernel/linux/linux-qoriq-sdk.bb
+++ b/recipes-kernel/linux/linux-qoriq-sdk.bb
@@ -9,6 +9,8 @@ require recipes-kernel/linux/linux-qoriq-sdk.inc
 
 PR = "${INC_PR}.1"
 
+SCMVERSION ?= "y"
+
 DEPENDS_append = " libgcc"
 KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
 KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
@@ -26,4 +28,10 @@ do_configure_prepend() {
        if [ -n "${SDK_VERSION}" ]; then
                echo "CONFIG_LOCALVERSION=\"-${SDK_VERSION}\"" >> ${S}/.config
        fi
+    
+        # Add GIT revision to the local version 
+        if [ "${SCMVERSION}" = "y" ]; then
+               head=`git rev-parse --verify --short HEAD 2> /dev/null`
+               printf "%s%s" +g $head > ${S}/.scmversion
+        fi
 }
-- 
1.8.3.2


-- 
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to