summaryrefslogtreecommitdiffstats
path: root/classes/fsl-u-boot-localversion.bbclass
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2015-07-15 17:14:27 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2015-07-16 15:01:29 -0300
commitf8517afc7a5ada4538b3b7d397fa32586d57ffe5 (patch)
tree79349f091306d1760fd4687e62336ffa8fb8c721 /classes/fsl-u-boot-localversion.bbclass
parentc92b415d653afc55f33b6b93fb9248193bfd4fa0 (diff)
downloadmeta-freescale-f8517afc7a5ada4538b3b7d397fa32586d57ffe5.tar.gz
Move meta-fsl-arm content to layer root
The meta-fsl-arm is going to be used as the base for this layer. It contains a clean history and allowing a more granullar set of changes. This commit is just a rename of all contents of meta-fsl-arm subdirectory to this layer's root, subsequent changes are based on top of that. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'classes/fsl-u-boot-localversion.bbclass')
-rw-r--r--classes/fsl-u-boot-localversion.bbclass27
1 files changed, 27 insertions, 0 deletions
diff --git a/classes/fsl-u-boot-localversion.bbclass b/classes/fsl-u-boot-localversion.bbclass
new file mode 100644
index 00000000..f7e09714
--- /dev/null
+++ b/classes/fsl-u-boot-localversion.bbclass
@@ -0,0 +1,27 @@
1# Freescale U-Boot LOCALVERSION extension
2#
3# This allow to easy reuse of code between different U-Boot recipes
4#
5# The following options are supported:
6#
7# SCMVERSION Puts the Git hash in U-Boot local version
8# LOCALVERSION Value used in LOCALVERSION (default to '+fslc')
9#
10# Copyright 2014 (C) O.S. Systems Software LTDA.
11
12SCMVERSION ??= "y"
13LOCALVERSION ??= "+fslc"
14
15UBOOT_LOCALVERSION = "${LOCALVERSION}"
16
17do_compile_prepend() {
18 if [ "${SCMVERSION}" = "y" ]; then
19 # Add GIT revision to the local version
20 head=`git rev-parse --verify --short HEAD 2> /dev/null`
21 printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${S}/.scmversion
22 printf "%s%s%s" "${UBOOT_LOCALVERSION}" +g $head > ${B}/.scmversion
23 else
24 printf "%s" "${UBOOT_LOCALVERSION}" > ${S}/.scmversion
25 printf "%s" "${UBOOT_LOCALVERSION}" > ${B}/.scmversion
26 fi
27}