blob: 00bfd759af27626161002c5e70d76a111b90261c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Toradex Kernel LOCALVERSION extension
#
# This allow to easy reuse of code between different kernel recipes
#
# The following options are supported:
#
# SCMVERSION Puts the Git hash in kernel local version
# LOCALVERSION Value used in LOCALVERSION
#
# Copyright 2014, 2015 (C) O.S. Systems Software LTDA.
# Copyright 2019 (C) Toradex AG
SCMVERSION ??= "y"
LOCALVERSION ?= "-${TDX_VERSION}"
do_configure_prepend() {
sed -i -e /CONFIG_LOCALVERSION/d ${B}/.config
echo "CONFIG_LOCALVERSION=\"${LOCALVERSION}\"" >> ${B}/.config
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
printf "+git.%s" $head > ${S}/.scmversion
fi
}
|