summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorc-thaler <christian.thaler@tes-dst.com>2019-09-24 14:18:53 +0200
committerArmin Kuster <akuster808@gmail.com>2019-10-13 08:50:39 -0700
commit85da4ccfff2103815eb3cd9a0b0f1af122b05567 (patch)
tree819bd5ae1f40a36480e1d028fe0a712be4d02df8
parentd68441ed80fd43f091baf01bfdb47c3ec010c662 (diff)
downloadopenembedded-core-85da4ccfff2103815eb3cd9a0b0f1af122b05567.tar.gz
openembedded-core-85da4ccfff2103815eb3cd9a0b0f1af122b05567.tar.bz2
openembedded-core-85da4ccfff2103815eb3cd9a0b0f1af122b05567.zip
kernel-devsrc: check for localversion files in the kernel source tree
localversion files are ignored. This might lead to a bad version magic when building out-of-tree modules via SDK. (Backport from master https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-kernel/linux/kernel-devsrc.bb?id=59fcee90de0cbb5b6b8333ab2b0e36214b174e52) Signed-off-by: Christian Thaler <christian.thaler@tes-dst.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 361ad21e1f..ec5cf0993a 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -62,6 +62,12 @@ do_install() {
cd ${S}
cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build
cp --parents $(find -type f -name "Build" -o -name "Build.include") $kerneldir/build
+
+ # Copy localversion file if any to keep correct version magic after
+ # modules_prepare.
+ if [ -f *localversion* ]; then
+ cp *localversion* $kerneldir/build
+ fi
)
# then drop all but the needed Makefiles/Kconfig files
@@ -213,6 +219,9 @@ do_install() {
# required to build scripts/selinux/genheaders/genheaders
cp -a --parents security/selinux/include/* $kerneldir/build/
+
+ # copy any localversion files
+ cp -a localversion* $kerneldir/build/ 2>/dev/null || :
)
# Make sure the Makefile and version.h have a matching timestamp so that