From: Chunrong Guo Date: Thu, 27 Mar 2014 05:46:20 +0000 (+0800) Subject: u-boot: add git revision to the local version X-Git-Tag: 2.1~534^2~169 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=2aa3a1ccfa820c8dd3188567a1fbc04ccef21a15;p=meta-freescale.git u-boot: add git revision to the local version Signed-off-by: Chunrong Guo --- diff --git a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb index 4f8690c2..406914cb 100644 --- a/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb +++ b/meta-fsl-ppc/recipes-bsp/u-boot/u-boot_git.bb @@ -74,8 +74,9 @@ do_compile () { if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] then - echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion - echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion fi if [ "x${UBOOT_MACHINES}" = "x" ]; then