summaryrefslogtreecommitdiffstats
path: root/classes/fsl-u-boot-localversion.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/fsl-u-boot-localversion.bbclass')
-rw-r--r--classes/fsl-u-boot-localversion.bbclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/classes/fsl-u-boot-localversion.bbclass b/classes/fsl-u-boot-localversion.bbclass
index ebde8ea7..d160ca98 100644
--- a/classes/fsl-u-boot-localversion.bbclass
+++ b/classes/fsl-u-boot-localversion.bbclass
@@ -17,9 +17,10 @@ UBOOT_LOCALVERSION = "${LOCALVERSION}"
17do_compile:prepend() { 17do_compile:prepend() {
18 if [ "${SCMVERSION}" = "y" ]; then 18 if [ "${SCMVERSION}" = "y" ]; then
19 # Add GIT revision to the local version 19 # Add GIT revision to the local version
20 head=`cd ${S} ; git rev-parse --verify --short HEAD 2> /dev/null` 20 head=`cd ${S} ; git rev-parse --verify --short ${SRCREV} 2> /dev/null`
21 printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${S}/.scmversion 21 patches=`cd ${S} ; git rev-list --count ${SRCREV}..HEAD 2> /dev/null`
22 printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${B}/.scmversion 22 printf "%s%s%s%s%s" "${UBOOT_LOCALVERSION}" +g $head +p $patches > ${S}/.scmversion
23 printf "%s%s%s%s%s" "${UBOOT_LOCALVERSION}" +g $head +p $patches > ${B}/.scmversion
23 else 24 else
24 printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion 25 printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion
25 printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion 26 printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion