From 7fa4796eb8b5726af0176b8c47cd15804e584c2c Mon Sep 17 00:00:00 2001 From: Diego Sueiro Date: Thu, 3 Nov 2022 16:06:44 +0000 Subject: 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. (From OE-Core rev: b36303158b2e0273ff415bdedefb379f680b30fc) Signed-off-by: Diego Sueiro Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/classes-recipe/kernel.bbclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'meta/classes-recipe/kernel.bbclass') 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 -- cgit v1.2.3-54-g00ecf