]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-devsrc: fix arm/arm64 target module build
authorBruce Ashfield <bruce.ashfield@windriver.com>
Thu, 30 Aug 2018 13:45:41 +0000 (09:45 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Aug 2018 15:16:06 +0000 (16:16 +0100)
module.lds is required for arch/arm* to build modules out of tree, but
isn't required for scripts/prepare, so it was missed in the initial
devsrc rework:

root@qemuarm64:/tmp# make -C /usr/src/kernel M=/tmp modules
make: Entering directory '/lib/modules/4.18.3-yocto-standard/build'
  CC [M]  /tmp/hellomod.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/hellomod.mod.o
  LD [M]  /tmp/hellomod.ko
make: Leaving directory '/lib/modules/4.18.3-yocto-standard/build'
root@qemuarm64:/tmp# insmod hellomod.ko
[  675.743628] hellomod: loading out-of-tree module taints kernel.
[  675.794959] Hello world!

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/linux/kernel-devsrc.bb

index b3f529237a9025e62ff6f1a2651cf3d3a6cbc4ed..463305e89aa8bac390923e23640c7e88991db46d 100644 (file)
@@ -146,6 +146,8 @@ do_install() {
             cp -a --parents arch/arm64/kernel/vdso/sigreturn.S $kerneldir/build/
             cp -a --parents arch/arm64/kernel/vdso/note.S $kerneldir/build/
             cp -a --parents arch/arm64/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/
+
+            cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/
        fi
 
        # include the machine specific headers for ARM variants, if available.
@@ -156,6 +158,8 @@ do_install() {
            cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/
            cp -a --parents arch/arm/tools/mach-types $kerneldir/build/
            cp -a --parents arch/arm/tools/syscall* $kerneldir/build/
+
+            cp -a --parents arch/arm/kernel/module.lds $kerneldir/build/
        fi
 
        if [ -d arch/${ARCH}/include ]; then