diff mbox series

kernel-devsrc: copy arch/powerpc/tools contents

Message ID 20250716072129.1041493-1-Qi.Chen@windriver.com
State New
Headers show
Series kernel-devsrc: copy arch/powerpc/tools contents | expand

Commit Message

Chen, Qi July 16, 2025, 7:21 a.m. UTC
From: Chen Qi <Qi.Chen@windriver.com>

For now, using qemuppc64 as MACHINE and building things inside SDK,
we'll get the following error:

  ERROR: modpost: "_mcount" undefined

This is because after [1], MPROFILE_KERNEL is using arch/powerpc/tools/
contents to do the check. This in turn affects HAVE_OBJTOOL.
"""
arch/powerpc/Kconfig:   select HAVE_OBJTOOL                     if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
"""

The current MPROFILE_KERNEL for powerpc:
"""
config MPROFILE_KERNEL
            depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
            def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
            def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mbig-endian) if CPU_BIG_ENDIAN
"""

If MPROFILE_KERNEL is disabled, thus HAVE_OBJTOOL being disabled, then
FTRACE_MCOUNT_USE_RECORDMCOUNT will be enabled, causing this error.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Bruce Ashfield July 16, 2025, 1:23 p.m. UTC | #1
On Wed, Jul 16, 2025 at 3:21 AM Chen Qi via lists.openembedded.org <Qi.Chen=
windriver.com@lists.openembedded.org> wrote:

> From: Chen Qi <Qi.Chen@windriver.com>
>
> For now, using qemuppc64 as MACHINE and building things inside SDK,
> we'll get the following error:
>
>   ERROR: modpost: "_mcount" undefined
>
> This is because after [1], MPROFILE_KERNEL is using arch/powerpc/tools/
> contents to do the check. This in turn affects HAVE_OBJTOOL.
> """
> arch/powerpc/Kconfig:   select HAVE_OBJTOOL                     if
> ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
> """
>
> The current MPROFILE_KERNEL for powerpc:
> """
> config MPROFILE_KERNEL
>             depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
>             def_bool
> $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC)
> -mlittle-endian) if CPU_LITTLE_ENDIAN
>             def_bool
> $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC)
> -mbig-endian) if CPU_BIG_ENDIAN
> """
>
> If MPROFILE_KERNEL is disabled, thus HAVE_OBJTOOL being disabled, then
> FTRACE_MCOUNT_USE_RECORDMCOUNT will be enabled, causing this error.
>
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-kernel/linux/kernel-devsrc.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb
> b/meta/recipes-kernel/linux/kernel-devsrc.bb
> index 3d2eb3929e..c4b5d0e5a6 100644
> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
> @@ -208,6 +208,10 @@ do_install() {
>          fi
>
>          if [ "${ARCH}" = "powerpc" ]; then
> +            # 4.18+ needs these files for MPROFILE_KERNEL, but don't
> error if they aren't present in the source
> +            # See
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0
> +            cp -a --parents arch/powerpc/tools $kerneldir/build/
> 2>/dev/null || :
> +
>

We don't copy the entire tools directory, just copy what you need out of it.

Cheers,

Bruce



>              # 5.0 needs these files, but don't error if they aren't
> present in the source
>              cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl
> $kerneldir/build/ 2>/dev/null || :
>              cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh
> $kerneldir/build/ 2>/dev/null || :
> --
> 2.49.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#220434):
> https://lists.openembedded.org/g/openembedded-core/message/220434
> Mute This Topic: https://lists.openembedded.org/mt/114181303/1050810
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Chen, Qi July 17, 2025, 2:29 a.m. UTC | #2
I’ll check further and send out V2.

Regards,
Qi

From: Bruce Ashfield <bruce.ashfield@gmail.com>
Sent: Wednesday, July 16, 2025 9:24 PM
To: Chen, Qi <Qi.Chen@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] kernel-devsrc: copy arch/powerpc/tools contents



On Wed, Jul 16, 2025 at 3:21 AM Chen Qi via lists.openembedded.org<https://urldefense.com/v3/__http:/lists.openembedded.org__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiCMr1KQSg$> <Qi.Chen=windriver.com@lists.openembedded.org<mailto:windriver.com@lists.openembedded.org>> wrote:
From: Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>

For now, using qemuppc64 as MACHINE and building things inside SDK,
we'll get the following error:

  ERROR: modpost: "_mcount" undefined

This is because after [1], MPROFILE_KERNEL is using arch/powerpc/tools/
contents to do the check. This in turn affects HAVE_OBJTOOL.
"""
arch/powerpc/Kconfig:   select HAVE_OBJTOOL                     if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
"""

The current MPROFILE_KERNEL for powerpc:
"""
config MPROFILE_KERNEL
            depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
            def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh<https://urldefense.com/v3/__http:/gcc-check-mprofile-kernel.sh__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiCT2fzJMg$> $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
            def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh<https://urldefense.com/v3/__http:/gcc-check-mprofile-kernel.sh__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiCT2fzJMg$> $(CC) -mbig-endian) if CPU_BIG_ENDIAN
"""

If MPROFILE_KERNEL is disabled, thus HAVE_OBJTOOL being disabled, then
FTRACE_MCOUNT_USE_RECORDMCOUNT will be enabled, causing this error.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0<https://urldefense.com/v3/__https:/git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD9foQYxw$>

Signed-off-by: Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$> | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$> b/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$>
index 3d2eb3929e..c4b5d0e5a6 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$>
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$>
@@ -208,6 +208,10 @@ do_install() {
         fi

         if [ "${ARCH}" = "powerpc" ]; then
+            # 4.18+ needs these files for MPROFILE_KERNEL, but don't error if they aren't present in the source
+            # See https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0<https://urldefense.com/v3/__https:/git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD9foQYxw$>
+            cp -a --parents arch/powerpc/tools $kerneldir/build/ 2>/dev/null || :
+

We don't copy the entire tools directory, just copy what you need out of it.

Cheers,

Bruce


             # 5.0 needs these files, but don't error if they aren't present in the source
             cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || :
             cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh<https://urldefense.com/v3/__http:/syscalltbl.sh__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiBtir5Akw$> $kerneldir/build/ 2>/dev/null || :
--
2.49.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#220434): https://lists.openembedded.org/g/openembedded-core/message/220434<https://urldefense.com/v3/__https:/lists.openembedded.org/g/openembedded-core/message/220434__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiAubD_nTg$>
Mute This Topic: https://lists.openembedded.org/mt/114181303/1050810<https://urldefense.com/v3/__https:/lists.openembedded.org/mt/114181303/1050810__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiDaMcUjwA$>
Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core%2Bowner@lists.openembedded.org>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub<https://urldefense.com/v3/__https:/lists.openembedded.org/g/openembedded-core/unsub__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiAdjZncxw$> [bruce.ashfield@gmail.com<mailto:bruce.ashfield@gmail.com>]
-=-=-=-=-=-=-=-=-=-=-=-


--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
Chen, Qi July 17, 2025, 2:55 a.m. UTC | #3
Hi Bruce,

With further check, I found all contents (6 shell scripts) under tools are needed.
They are needed either in Kconfig or Makefile in the same way as MPROFILE_KERNEL needs gcc-check-mprofile-kernel.sh.

Take gcc-check-fpatchable-function-entry.sh as an example:
“””
config ARCH_USING_PATCHABLE_FUNCTION_ENTRY
        depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
        depends on $(cc-option,-fpatchable-function-entry=2)
        def_bool y if PPC32
        def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle\
-endian) if PPC64 && CPU_LITTLE_ENDIAN
        def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-en\
dian) if PPC64 && CPU_BIG_ENDIAN
“””

I’ll send out V2 detailing the reason.

Regards,
Qi

From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Chen Qi via lists.openembedded.org
Sent: Thursday, July 17, 2025 10:30 AM
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] kernel-devsrc: copy arch/powerpc/tools contents

I’ll check further and send out V2.

Regards,
Qi

From: Bruce Ashfield <bruce.ashfield@gmail.com<mailto:bruce.ashfield@gmail.com>>
Sent: Wednesday, July 16, 2025 9:24 PM
To: Chen, Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>
Cc: openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH] kernel-devsrc: copy arch/powerpc/tools contents



On Wed, Jul 16, 2025 at 3:21 AM Chen Qi via lists.openembedded.org<https://urldefense.com/v3/__http:/lists.openembedded.org__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiCMr1KQSg$> <Qi.Chen=windriver.com@lists.openembedded.org<mailto:windriver.com@lists.openembedded.org>> wrote:
From: Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>

For now, using qemuppc64 as MACHINE and building things inside SDK,
we'll get the following error:

  ERROR: modpost: "_mcount" undefined

This is because after [1], MPROFILE_KERNEL is using arch/powerpc/tools/
contents to do the check. This in turn affects HAVE_OBJTOOL.
"""
arch/powerpc/Kconfig:   select HAVE_OBJTOOL                     if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
"""

The current MPROFILE_KERNEL for powerpc:
"""
config MPROFILE_KERNEL
            depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
            def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh<https://urldefense.com/v3/__http:/gcc-check-mprofile-kernel.sh__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiCT2fzJMg$> $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
            def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh<https://urldefense.com/v3/__http:/gcc-check-mprofile-kernel.sh__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiCT2fzJMg$> $(CC) -mbig-endian) if CPU_BIG_ENDIAN
"""

If MPROFILE_KERNEL is disabled, thus HAVE_OBJTOOL being disabled, then
FTRACE_MCOUNT_USE_RECORDMCOUNT will be enabled, causing this error.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0<https://urldefense.com/v3/__https:/git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD9foQYxw$>

Signed-off-by: Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$> | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$> b/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$>
index 3d2eb3929e..c4b5d0e5a6 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$>
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb<https://urldefense.com/v3/__http:/kernel-devsrc.bb__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD4hhRWcg$>
@@ -208,6 +208,10 @@ do_install() {
         fi

         if [ "${ARCH}" = "powerpc" ]; then
+            # 4.18+ needs these files for MPROFILE_KERNEL, but don't error if they aren't present in the source
+            # See https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0<https://urldefense.com/v3/__https:/git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiD9foQYxw$>
+            cp -a --parents arch/powerpc/tools $kerneldir/build/ 2>/dev/null || :
+

We don't copy the entire tools directory, just copy what you need out of it.

Cheers,

Bruce


             # 5.0 needs these files, but don't error if they aren't present in the source
             cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || :
             cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh<https://urldefense.com/v3/__http:/syscalltbl.sh__;!!AjveYdw8EvQ!akzd6CsdohTRT7LitLF9Cok-HEpNa4QTmm73hP6s15S4bE4KZrJ7ekyYljAjbSYtTyWmpxTm_p_U2XY0UiBtir5Akw$> $kerneldir/build/ 2>/dev/null || :
--
2.49.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
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 3d2eb3929e..c4b5d0e5a6 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -208,6 +208,10 @@  do_install() {
         fi
 
         if [ "${ARCH}" = "powerpc" ]; then
+            # 4.18+ needs these files for MPROFILE_KERNEL, but don't error if they aren't present in the source
+            # See https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0
+            cp -a --parents arch/powerpc/tools $kerneldir/build/ 2>/dev/null || :
+
             # 5.0 needs these files, but don't error if they aren't present in the source
             cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || :
             cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || :