diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-11-17 23:56:33 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-11-18 13:59:27 +0000 |
commit | d8f47a68a92802fc47f297de05a0f2817963a7ee (patch) | |
tree | bc6281cf9fc6da754f92f15502fad6dd143ce741 /meta | |
parent | 41e09418f399289d6191dbf9e12e6d8d6c3b8a73 (diff) | |
download | poky-d8f47a68a92802fc47f297de05a0f2817963a7ee.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: 7d94f9209ebaaf59ea001239a889dd7f928a0e7c)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 681b0be4e1..1a444efabf 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -383,6 +383,10 @@ do_compile_kernelmodules() { | |||
383 | # other kernel modules and will look at this | 383 | # other kernel modules and will look at this |
384 | # file to do symbol lookups | 384 | # file to do symbol lookups |
385 | cp ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/ | 385 | cp ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/ |
386 | # 5.10+ kernels have module.lds that we need to copy for external module builds | ||
387 | if [ -e "${B}/scripts/module.lds" ]; then | ||
388 | install -Dm 0644 ${B}/scripts/module.lds ${STAGING_KERNEL_BUILDDIR}/scripts/module.lds | ||
389 | fi | ||
386 | else | 390 | else |
387 | bbnote "no modules to compile" | 391 | bbnote "no modules to compile" |
388 | fi | 392 | fi |
@@ -486,7 +490,6 @@ do_shared_workdir () { | |||
486 | # Copy files required for module builds | 490 | # Copy files required for module builds |
487 | cp System.map $kerneldir/System.map-${KERNEL_VERSION} | 491 | cp System.map $kerneldir/System.map-${KERNEL_VERSION} |
488 | [ -e Module.symvers ] && cp Module.symvers $kerneldir/ | 492 | [ -e Module.symvers ] && cp Module.symvers $kerneldir/ |
489 | [ -e scripts/module.lds ] && install -Dm 0644 scripts/module.lds $kerneldir/scripts/module.lds | ||
490 | cp .config $kerneldir/ | 493 | cp .config $kerneldir/ |
491 | mkdir -p $kerneldir/include/config | 494 | mkdir -p $kerneldir/include/config |
492 | cp include/config/kernel.release $kerneldir/include/config/kernel.release | 495 | cp include/config/kernel.release $kerneldir/include/config/kernel.release |