summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Sueiro <diego.sueiro@arm.com>2022-11-03 16:06:44 +0000
committerSteve Sakoman <steve@sakoman.com>2022-11-19 03:59:47 -1000
commit69db1b345725af88088b57b0c696eddca5ca2d96 (patch)
treeacfcac94d86f57b6643de0c0aa018eb7e02b0030
parent1859eaba8638549b2dc5d6ab3ae3c0b3793eac67 (diff)
downloadopenembedded-core-contrib-69db1b345725af88088b57b0c696eddca5ca2d96.tar.gz
kernel.bbclass: Include randstruct seed assets in STAGING_KERNEL_BUILDDIR
When building with CONFIG_MODVERSIONS=y and CONFIG_RANDSTRUCT=y we need to copy the build assets generated for the randstrutc seed to STAGING_KERNEL_BUILDDIR, otherwise the out-of-tree modules build will generate those assets which will result in a different RANDSTRUCT_HASHED_SEED. Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit b36303158b2e0273ff415bdedefb379f680b30fc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes-recipe/kernel.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index 7bb3449223..3834a42fb9 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -591,6 +591,22 @@ do_shared_workdir () {
cp tools/objtool/objtool ${kerneldir}/tools/objtool/
fi
fi
+
+ # When building with CONFIG_MODVERSIONS=y and CONFIG_RANDSTRUCT=y we need
+ # to copy the build assets generated for the randstruct seed to
+ # STAGING_KERNEL_BUILDDIR, otherwise the out-of-tree modules build will
+ # generate those assets which will result in a different
+ # RANDSTRUCT_HASHED_SEED
+ if [ -d scripts/basic ]; then
+ mkdir -p ${kerneldir}/scripts
+ cp -r scripts/basic ${kerneldir}/scripts
+ fi
+
+ if [ -d scripts/gcc-plugins ]; then
+ mkdir -p ${kerneldir}/scripts
+ cp -r scripts/gcc-plugins ${kerneldir}/scripts
+ fi
+
}
# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware