summaryrefslogtreecommitdiff
path: root/classes/toradex-u-boot-localversion.bbclass
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2020-04-01 14:21:34 +0000
committerStefan Agner <stefan.agner@toradex.com>2020-04-01 14:45:19 +0000
commit45bd3b76849449d2b6de2b75e07d49097d5f1dbf (patch)
tree965353b7bd44ceed9d1f2b7a752d458d5dffed7a /classes/toradex-u-boot-localversion.bbclass
parentc6be4ddf709f00546caa534f96cb553b883d1ea3 (diff)
toradex-kernel/u-boot-localversion: use fixed length git hash
Make sure the git hash is always 12 characters long. This avoids issues where we can get different length git hashes between to independent builds. This can be problematic when sstate is shared. Related-to: TOR-810 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'classes/toradex-u-boot-localversion.bbclass')
-rw-r--r--classes/toradex-u-boot-localversion.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/toradex-u-boot-localversion.bbclass b/classes/toradex-u-boot-localversion.bbclass
index 153469d..3ad86db 100644
--- a/classes/toradex-u-boot-localversion.bbclass
+++ b/classes/toradex-u-boot-localversion.bbclass
@@ -19,7 +19,7 @@ UBOOT_LOCALVERSION = "${LOCALVERSION}"
do_compile_prepend() {
if [ "${SCMVERSION}" = "y" ]; then
- head=`cd ${S} ; git rev-parse --verify --short HEAD 2> /dev/null`
+ head=`cd ${S} ; git rev-parse --verify --short=12 HEAD 2> /dev/null`
printf "%s+git.%s" "${UBOOT_LOCALVERSION}" $head > ${S}/.scmversion
printf "%s+git.%s" "${UBOOT_LOCALVERSION}" $head > ${B}/.scmversion
fi