diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2024-08-01 11:35:01 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 11:35:01 -0300 |
commit | bf9b59bbf0e6616d84ae3827b5c885ac4f23009c (patch) | |
tree | 324064b00fbed2bd33ff095e008b12d9060a9360 | |
parent | 0f8091c63dd8805610c09b08409bc58492a3b16f (diff) | |
parent | 358dfab86c3655852f8bd596de8ebf2716fd64c3 (diff) | |
download | meta-freescale-bf9b59bbf0e6616d84ae3827b5c885ac4f23009c.tar.gz |
Merge pull request #1890 from Freescale/backport-1888-to-scarthgap
[Backport scarthgap] Fix uboot localversion
-rw-r--r-- | classes/fsl-u-boot-localversion.bbclass | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/classes/fsl-u-boot-localversion.bbclass b/classes/fsl-u-boot-localversion.bbclass index 94b30c04..df4ac5fb 100644 --- a/classes/fsl-u-boot-localversion.bbclass +++ b/classes/fsl-u-boot-localversion.bbclass | |||
@@ -17,21 +17,21 @@ UBOOT_LOCALVERSION = "${LOCALVERSION}" | |||
17 | do_compile:prepend() { | 17 | do_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 | if [ "${SRCREV}" = "INVALID" ]; then | 20 | if [ "${SRCREV}" = "INVALID" ]; then |
21 | hash=${SRCREV_machine} | 21 | hash=${SRCREV_machine} |
22 | else | 22 | else |
23 | hash=${SRCREV} | 23 | hash=${SRCREV} |
24 | fi | 24 | fi |
25 | if [ "$hash" = "AUTOINC" ]; then | 25 | if [ "$hash" = "AUTOINC" ]; then |
26 | branch=`git --git-dir=${S}/.git symbolic-ref --short -q HEAD` | 26 | branch=`git --git-dir=${S}/.git symbolic-ref --short -q HEAD` |
27 | head=`git --git-dir=${S}/.git rev-parse --verify --short origin/${branch} 2> /dev/null` | 27 | head=`git --git-dir=${S}/.git rev-parse --verify --short origin/${branch} 2> /dev/null` |
28 | else | 28 | else |
29 | head=`git --git-dir=${S}/.git rev-parse --verify --short $hash 2> /dev/null` | 29 | head=`git --git-dir=${S}/.git rev-parse --verify --short $hash 2> /dev/null` |
30 | fi | 30 | fi |
31 | patches=`git --git-dir=${S}/.git rev-list --count $head..HEAD 2> /dev/null` | 31 | patches=`git --git-dir=${S}/.git rev-list --count $head..HEAD 2> /dev/null` |
32 | printf "%s%s%s%s" +g $head +p $patches > ${S}/.scmversion | 32 | printf "%s%s%s%s%s" "${UBOOT_LOCALVERSION}" +g $head +p $patches > ${S}/.scmversion |
33 | printf "%s%s%s%s" +g $head +p $patches > ${B}/.scmversion | 33 | printf "%s%s%s%s%s" "${UBOOT_LOCALVERSION}" +g $head +p $patches > ${B}/.scmversion |
34 | else | 34 | else |
35 | printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion | 35 | printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion |
36 | printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion | 36 | printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion |
37 | fi | 37 | fi |