The wrong version of this patch merged to oe-core, so you don't want this one as-is.
You also need the follow up that I posted today, and that hopefully will be in oe-core soon. Bruce On Tue, Nov 17, 2020 at 10:36 AM Anuj Mittal <[email protected]> wrote: > From: Bruce Ashfield <[email protected]> > > The upstream commit 596b0474d3d [kbuild: preprocess module linker > script], adds a dependency on module.lds for external module > building. > > Since module.lds is generated as part of 'modules_prepare', we > must make it available with the other kernel artifacts in the > kernel shared workdir, otherwise out of tree builds fail. > > This fixes errors like: > > | make[4]: *** No rule to make target 'scripts/module.lds', needed by > > 'build/tmp/work/qemuarm64-poky-linux/cryptodev-module/1.11-r0/git/cryptodev.ko'. > Stop. > | make[4]: *** Waiting for unfinished jobs.... > > We also ensure that kernel-devsrc has a copy to support on > target module builds that are often prepared with 'make scripts > prepare'. Those targets won't regenerate it, so the build fails. > If 'make modules_prepare' is used, the file will be regenerated > and overwrite our copy (as expected). > > Signed-off-by: Pan, Kris <[email protected]> > Signed-off-by: Lili Li <[email protected]> > Signed-off-by: Bruce Ashfield <[email protected]> > Signed-off-by: Richard Purdie <[email protected]> > (cherry picked from commit 0fc66a0b64953aae38d0124b57615fffaec8de52) > Signed-off-by: Anuj Mittal <[email protected]> > --- > meta/classes/kernel.bbclass | 1 + > meta/recipes-kernel/linux/kernel-devsrc.bb | 6 ++++++ > 2 files changed, 7 insertions(+) > > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass > index 78def5bbc1..22c92381c0 100644 > --- a/meta/classes/kernel.bbclass > +++ b/meta/classes/kernel.bbclass > @@ -486,6 +486,7 @@ do_shared_workdir () { > # Copy files required for module builds > cp System.map $kerneldir/System.map-${KERNEL_VERSION} > [ -e Module.symvers ] && cp Module.symvers $kerneldir/ > + [ -e scripts/module.lds ] && install -Dm 0644 scripts/module.lds > $kerneldir/scripts/module.lds > cp .config $kerneldir/ > mkdir -p $kerneldir/include/config > cp include/config/kernel.release > $kerneldir/include/config/kernel.release > diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb > b/meta/recipes-kernel/linux/kernel-devsrc.bb > index aa8e162f4f..8373c97a31 100644 > --- a/meta/recipes-kernel/linux/kernel-devsrc.bb > +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb > @@ -86,6 +86,12 @@ do_install() { > # be dealt with. > # cp -a scripts $kerneldir/build > > + # although module.lds can be regenerated on target via 'make > modules_prepare' > + # there are several places where 'makes scripts prepare' is done, > and that won't > + # regenerate the file. So we copy it onto the target as a > migration to using > + # modules_prepare > + cp -a --parents scripts/module.lds $kerneldir/build/ 2>/dev/null > || : > + > if [ -d arch/${ARCH}/scripts ]; then > cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH} > fi > -- > 2.28.0 > > > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#144737): https://lists.openembedded.org/g/openembedded-core/message/144737 Mute This Topic: https://lists.openembedded.org/mt/78318299/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
