summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-11-17 23:56:33 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-09 23:49:00 +0000
commitb0f10ef1f3d06570baa0da73f700051df4c96dbe (patch)
treea75bfcbbfa4d939bba9057b470d6591370f8ad2e /meta/classes/kernel.bbclass
parent5981a05525442f1a0db1c4e710b319dbf1fbba8b (diff)
downloadpoky-b0f10ef1f3d06570baa0da73f700051df4c96dbe.tar.gz
kernel: relocate copy of module.lds to module compilation task
There were two copies of this patch floating around, and the merged variant has the copy in the wrong place. module.lds is only created during modules_prepare, and that target is not invoked during our main build of the kernel. We aren't about to change the kernel build (there's no need), so we move the copy into the compile_kernelmodules task. After that runs, we have module.lds availble to copy. This has been tested against clean kernel + out of tree module builds, and the dependencies are correct that the file is copied before the out of tree module build starts. (From OE-Core rev: 38c6c6f4a460e9c0593e2530ffeaf20b24fd83a9) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7d94f9209ebaaf59ea001239a889dd7f928a0e7c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 58c9f171dc..700ba0ad8d 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -358,6 +358,10 @@ do_compile_kernelmodules() {
358 # other kernel modules and will look at this 358 # other kernel modules and will look at this
359 # file to do symbol lookups 359 # file to do symbol lookups
360 cp ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/ 360 cp ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/
361 # 5.10+ kernels have module.lds that we need to copy for external module builds
362 if [ -e "${B}/scripts/module.lds" ]; then
363 install -Dm 0644 ${B}/scripts/module.lds ${STAGING_KERNEL_BUILDDIR}/scripts/module.lds
364 fi
361 else 365 else
362 bbnote "no modules to compile" 366 bbnote "no modules to compile"
363 fi 367 fi
@@ -465,7 +469,6 @@ do_shared_workdir () {
465 # Copy files required for module builds 469 # Copy files required for module builds
466 cp System.map $kerneldir/System.map-${KERNEL_VERSION} 470 cp System.map $kerneldir/System.map-${KERNEL_VERSION}
467 [ -e Module.symvers ] && cp Module.symvers $kerneldir/ 471 [ -e Module.symvers ] && cp Module.symvers $kerneldir/
468 [ -e scripts/module.lds ] && install -Dm 0644 scripts/module.lds $kerneldir/scripts/module.lds
469 cp .config $kerneldir/ 472 cp .config $kerneldir/
470 mkdir -p $kerneldir/include/config 473 mkdir -p $kerneldir/include/config
471 cp include/config/kernel.release $kerneldir/include/config/kernel.release 474 cp include/config/kernel.release $kerneldir/include/config/kernel.release