]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-devsrc: fix for v6.1+
authorBruce Ashfield <bruce.ashfield@gmail.com>
Fri, 18 Nov 2022 22:28:53 +0000 (17:28 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 22 Nov 2022 12:18:41 +0000 (12:18 +0000)
The 6.1 kernel has a number of Kbuild and architecture changes
that required us to update our devsrc recipe. With these changes
we are once again able to build on target modules for all
supported archectures.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-kernel/linux/kernel-devsrc.bb

index 46d706b955f6921776d99ef86c172142dd132f6e..253b8d307d62a206ccebca2191907e2202a6f712 100644 (file)
@@ -145,6 +145,9 @@ do_install() {
 
        cp -a scripts $kerneldir/build
 
+       # for v6.1+ (otherwise we are missing multiple default targets)
+       cp -a --parents Kbuild $kerneldir/build 2>/dev/null || :
+
        # if our build dir had objtool, it will also be rebuilt on target, so
        # we copy what is required for that build
        if [ -f ${B}/tools/objtool/objtool ]; then
@@ -171,6 +174,9 @@ do_install() {
            # arch/arm64/include/asm/opcodes.h references arch/arm
            cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/
 
+           # v6.1+
+           cp -a --parents arch/arm64/kernel/asm-offsets.c $kerneldir/build/
+
             cp -a --parents arch/arm64/kernel/vdso/*gettimeofday.* $kerneldir/build/
             cp -a --parents arch/arm64/kernel/vdso/sigreturn.S $kerneldir/build/
             cp -a --parents arch/arm64/kernel/vdso/note.S $kerneldir/build/
@@ -206,6 +212,9 @@ do_install() {
            cp -a --parents arch/powerpc/kernel/vdso/*.S $kerneldir/build 2>/dev/null || :
            cp -a --parents arch/powerpc/kernel/vdso/*gettimeofday.* $kerneldir/build 2>/dev/null || :
            cp -a --parents arch/powerpc/kernel/vdso/gen_vdso*_offsets.sh $kerneldir/build/ 2>/dev/null || :
+
+           # v6,1+
+           cp -a --parents arch/powerpc/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || :
        fi
        if [ "${ARCH}" = "riscv" ]; then
             cp -a --parents arch/riscv/kernel/vdso/*gettimeofday.* $kerneldir/build/
@@ -234,6 +243,9 @@ do_install() {
             fi
 
             cp -a --parents arch/arm/kernel/module.lds $kerneldir/build/ 2>/dev/null || :
+            # v6.1+
+            cp -a --parents arch/arm/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || :
+            cp -a --parents arch/arm/kernel/signal.h $kerneldir/build/ 2>/dev/null || :
        fi
 
        if [ -d arch/${ARCH}/include ]; then
@@ -282,15 +294,24 @@ do_install() {
            # objtool requires these files
            cp -a --parents arch/x86/lib/inat.c $kerneldir/build/ 2>/dev/null || :
            cp -a --parents arch/x86/lib/insn.c $kerneldir/build/ 2>/dev/null || :
+
+           # v6.1+
+           cp -a --parents arch/x86/kernel/asm-offsets* $kerneldir/build || :
+           # for capabilities.h, vmx.h
+           cp -a --parents arch/x86/kvm/vmx/*.h $kerneldir/build || :
+           # for lapic.h, hyperv.h ....
+           cp -a --parents arch/x86/kvm/*.h $kerneldir/build || :
        fi
 
+       # moved from arch/mips to all arches for v6.1+
+       cp -a --parents kernel/time/timeconst.bc $kerneldir/build 2>/dev/null || :
+       cp -a --parents kernel/bounds.c $kerneldir/build 2>/dev/null || :
+
        if [ "${ARCH}" = "mips" ]; then
            cp -a --parents arch/mips/Kbuild.platforms $kerneldir/build/
            cp --parents $(find  -type f -name "Platform") $kerneldir/build
            cp --parents arch/mips/boot/tools/relocs* $kerneldir/build
            cp -a --parents arch/mips/kernel/asm-offsets.c $kerneldir/build
-           cp -a --parents kernel/time/timeconst.bc $kerneldir/build
-           cp -a --parents kernel/bounds.c $kerneldir/build
            cp -a --parents Kbuild $kerneldir/build
            cp -a --parents arch/mips/kernel/syscalls/*.sh $kerneldir/build 2>/dev/null || :
            cp -a --parents arch/mips/kernel/syscalls/*.tbl $kerneldir/build 2>/dev/null || :