diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-15 17:14:27 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-16 15:01:29 -0300 |
commit | f8517afc7a5ada4538b3b7d397fa32586d57ffe5 (patch) | |
tree | 79349f091306d1760fd4687e62336ffa8fb8c721 /classes/fsl-kernel-localversion.bbclass | |
parent | c92b415d653afc55f33b6b93fb9248193bfd4fa0 (diff) | |
download | meta-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-kernel-localversion.bbclass')
-rw-r--r-- | classes/fsl-kernel-localversion.bbclass | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/classes/fsl-kernel-localversion.bbclass b/classes/fsl-kernel-localversion.bbclass new file mode 100644 index 00000000..1004e355 --- /dev/null +++ b/classes/fsl-kernel-localversion.bbclass | |||
@@ -0,0 +1,39 @@ | |||
1 | # Freescale Kernel LOCALVERSION extension | ||
2 | # | ||
3 | # This allow to easy reuse of code between different kernel recipes | ||
4 | # | ||
5 | # The following options are supported: | ||
6 | # | ||
7 | # SCMVERSION Puts the Git hash in kernel local version | ||
8 | # LOCALVERSION Value used in LOCALVERSION (default to '+fslc') | ||
9 | # | ||
10 | # Copyright 2014, 2015 (C) O.S. Systems Software LTDA. | ||
11 | |||
12 | SCMVERSION ??= "y" | ||
13 | LOCALVERSION ??= "+fslc" | ||
14 | |||
15 | kernel_conf_variable() { | ||
16 | CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;" | ||
17 | if test "$2" = "n" | ||
18 | then | ||
19 | echo "# CONFIG_$1 is not set" >> ${B}/.config | ||
20 | else | ||
21 | echo "CONFIG_$1=$2" >> ${B}/.config | ||
22 | fi | ||
23 | } | ||
24 | |||
25 | do_configure_prepend() { | ||
26 | echo "" > ${B}/.config | ||
27 | CONF_SED_SCRIPT="" | ||
28 | |||
29 | kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\"" | ||
30 | kernel_conf_variable LOCALVERSION_AUTO y | ||
31 | |||
32 | sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config' | ||
33 | |||
34 | if [ "${SCMVERSION}" = "y" ]; then | ||
35 | # Add GIT revision to the local version | ||
36 | head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null` | ||
37 | printf "%s%s" +g $head > ${S}/.scmversion | ||
38 | fi | ||
39 | } | ||