diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2025-07-23 00:38:04 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-28 14:51:50 +0100 |
| commit | 8808d15b02b2ae475ac0c3761ecce6c46513f289 (patch) | |
| tree | 4747dbaa2333417d8902c3c31aeaaa6b705dfe0a | |
| parent | c148c8fc796fb781262ef5cf4604bfa7345f9265 (diff) | |
| download | poky-8808d15b02b2ae475ac0c3761ecce6c46513f289.tar.gz | |
kernel-devsrc: copy arch/powerpc/tools contents
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.
The scripts are listed and copied one by one. Their names and the reasons why
they are copied are as below:
gcc-check-mprofile-kernel.sh: needed by MPROFILE_KERNEL
gcc-check-fpatchable-function-entry.sh: needed by ARCH_USING_PATCHABLE_FUNCTION_ENTRY
head_check.sh/relocs_check.sh/unrel_branch_check.sh: needed by Makefile.postlink
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0
(From OE-Core rev: df1c7c276422eeaf0eac178aec377a315a249c52)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-kernel/linux/kernel-devsrc.bb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb index 0dc9772429..04dd683dde 100644 --- a/meta/recipes-kernel/linux/kernel-devsrc.bb +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb | |||
| @@ -208,6 +208,13 @@ do_install() { | |||
| 208 | fi | 208 | fi |
| 209 | 209 | ||
| 210 | if [ "${ARCH}" = "powerpc" ]; then | 210 | if [ "${ARCH}" = "powerpc" ]; then |
| 211 | # Copy scripts that are needed by powperpc build, but don't error if they aren't present in the source. | ||
| 212 | # 4.18+ needs gcc-check-mprofile-kernel.sh for MPROFILE_KERNEL, for example. | ||
| 213 | # See https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abba759796f9b73eb24df9b734dd063839fc62e0 | ||
| 214 | for script in gcc-check-mprofile-kernel.sh gcc-check-fpatchable-function-entry.sh head_check.sh relocs_check.sh unrel_branch_check.sh; do | ||
| 215 | cp -a --parents arch/powerpc/tools/$script $kerneldir/build/ 2>/dev/null || : | ||
| 216 | done | ||
| 217 | |||
| 211 | # 5.0 needs these files, but don't error if they aren't present in the source | 218 | # 5.0 needs these files, but don't error if they aren't present in the source |
| 212 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || : | 219 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || : |
| 213 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || : | 220 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || : |
