diff mbox series

[09/10] kernel-devsrc: fix for v6.1+

Message ID 71cfe4b75e2078194882ea32325683dd88050536.1668558954.git.bruce.ashfield@gmail.com
State Accepted, archived
Commit a3972b3f919400a12bb9a546ae98092cbfdcdbb8
Headers show
Series [01/10] linux-yocto-dev: bump to v6.0+ | expand

Commit Message

Bruce Ashfield Nov. 16, 2022, 12:38 a.m. UTC
From: Bruce Ashfield <bruce.ashfield@gmail.com>

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>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 25 ++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

Comments

Alexander Kanavin Nov. 16, 2022, 8:24 a.m. UTC | #1
I guess many people have seen already seen this, but 6.1 has initial
rust support:
https://lwn.net/Articles/910762/

So if anyone wants a project that will make them look hip and sexy and
cool (software development-wise): draft an RFC patch for how we could
do this in Yocto.

Alex


On Wed, 16 Nov 2022 at 01:38, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
> From: Bruce Ashfield <bruce.ashfield@gmail.com>
>
> 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>
> ---
>  meta/recipes-kernel/linux/kernel-devsrc.bb | 25 ++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
> index 46d706b955..253b8d307d 100644
> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
> @@ -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 || :
> --
> 2.19.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#173372): https://lists.openembedded.org/g/openembedded-core/message/173372
> Mute This Topic: https://lists.openembedded.org/mt/95057295/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Bruce Ashfield Nov. 16, 2022, 1:26 p.m. UTC | #2
On Wed, Nov 16, 2022 at 3:24 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> I guess many people have seen already seen this, but 6.1 has initial
> rust support:
> https://lwn.net/Articles/910762/

Indeed. I was just happy that it is optional now, so I could get through the 6.1
introduction cycle without needing to figure out how to get the rust
dependencies included (I think I'd still be waiting for rust to build
now, if that
had been the case).

>
> So if anyone wants a project that will make them look hip and sexy and
> cool (software development-wise): draft an RFC patch for how we could
> do this in Yocto.

+1

I'll eventually look at it, but I'd be happy to be beaten to the work by an
interested party!

Bruce

>
> Alex
>
>
> On Wed, 16 Nov 2022 at 01:38, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> >
> > From: Bruce Ashfield <bruce.ashfield@gmail.com>
> >
> > 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>
> > ---
> >  meta/recipes-kernel/linux/kernel-devsrc.bb | 25 ++++++++++++++++++++--
> >  1 file changed, 23 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
> > index 46d706b955..253b8d307d 100644
> > --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
> > +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
> > @@ -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 || :
> > --
> > 2.19.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#173372): https://lists.openembedded.org/g/openembedded-core/message/173372
> > Mute This Topic: https://lists.openembedded.org/mt/95057295/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 46d706b955..253b8d307d 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -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 || :