Bug 14760 - linux-yocto has problems with textrel on qemuppc64
Summary: linux-yocto has problems with textrel on qemuppc64
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: unspecified
Hardware: Other ppc64
: Medium+ normal
Target Milestone: Future
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-03-13 04:30 UTC by Khem Raj
Modified: 2025-07-17 14:57 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2022-03-13 04:30:36 UTC
On master branch, when building for qemuppc64, kernel ends up failing to build with following error

ERROR: linux-yocto-5.15.26+gitAUTOINC+ea948a0983_5bd4bda819-r0 do_package_qa: QA Issue: kernel-vmlinux: ELF binary /boot/vmlinux-5.15.26-yocto-standard has relocations in .text [textrel]
ERROR: linux-yocto-5.15.26+gitAUTOINC+ea948a0983_5bd4bda819-r0 do_package_qa: Fatal QA errors were found, failing task.
ERROR: Logfile of failure stored in: /mnt/b/yoe/master/build/tmp/work/qemuppc64-yoe-linux-musl/linux-yocto/5.15.26+gitAUTOINC+ea948a0983_5bd4bda819-r0/temp/log.do_package_qa.1244790
ERROR: Task (/mnt/b/yoe/master/sources/openembedded-core/meta/recipes-kernel/linux/linux-yocto_5.15.bb:do_package_qa) failed with exit code '1'
Waiting for 37 running tasks to finish:

And looking at the objdump

powerpc64le-yoe-linux-objdump -p /mnt/b/yoe/master/build/tmp/work/qemuppc64-yoe-linux/linux-yocto/5.15.26+gitAUTOINC+ea948a0983_5bd4bda819-r0/packages-split/kernel-vmlinux/boot/vmlinux-5.15.26-yocto-standard


vmlinux:     file format elf64-powerpcle

Program Header:
    LOAD off    0x0000000000010000 vaddr 0xc000000000000000 paddr 0x0000000000000000 align 2**16
         filesz 0x0000000001ad9b90 memsz 0x0000000001bd8fd8 flags rwx
    NOTE off    0x000000000139f318 vaddr 0xc00000000138f318 paddr 0x000000000138f318 align 2**2
         filesz 0x000000000000006c memsz 0x000000000000006c flags ---

Dynamic Section:
  HASH                 0xc000000001510250
  GNU_HASH             0xc000000001510280
  STRTAB               0xc0000000015100f0
  SYMTAB               0xc000000001510048
  STRSZ                0x0000000000000030
  SYMENT               0x0000000000000018
  DEBUG                0x0000000000000000
  0x70000003           0x0000000000000000
  RELA                 0xc0000000015102b0
  RELASZ               0x0000000000348b40
  RELAENT              0x0000000000000018
  TEXTREL              0x0000000000000000
  FLAGS_1              0x0000000008000000
  RELACOUNT            0x0000000000023073
private flags = 0x2: [abiv2]


so there really are TEXTRELS being generated into kernel binary.
Comment 1 Randy MacLeod 2022-03-17 14:32:48 UTC
There may already be a patch for this... Bruce?
Comment 2 Khem Raj 2022-03-17 15:30:47 UTC
FWIW we have installed a workaround in kernel 5.15 recipe to ignore textrels for now, but I agree, it should be root caused.
Comment 3 Bruce Ashfield 2022-09-29 15:23:51 UTC
might be fixed, will retest in 4.2
Comment 4 Khem Raj 2022-10-13 18:46:04 UTC
5.19 still shows the issue

ERROR: linux-yocto-5.19.9+gitAUTOINC+350b544d07_65a9a22786-r0 do_package_qa: QA Issue: kernel-vmlinux: ELF binary /boot/vmlinux-5.19.9-yocto-standard has relocations in .text [textrel]
ERROR: linux-yocto-5.19.9+gitAUTOINC+350b544d07_65a9a22786-r0 do_package_qa: Fatal QA errors were found, failing task.
ERROR: Logfile of failure stored in: /mnt/b/yoe/master/build/tmp/work/qemuppc64-yoe-linux/linux-yocto/5.19.9+gitAUTOINC+350b544d07_65a9a22786-r0/temp/log.do_package_qa.1768833
ERROR: Task (/mnt/b/yoe/master/sources/poky/meta/recipes-kernel/linux/linux-yocto_5.19.bb:do_package_qa) failed with exit code '1'
Comment 5 Randy MacLeod 2022-10-13 21:39:03 UTC
Add Kevin who may be or may know someone interested in qemuppc64
Comment 6 Bruce Ashfield 2023-07-11 17:54:31 UTC
This now builds with 6.4.x

qemuppc64 login: root
root@qemuppc64:~# uname -a
Linux qemuppc64 6.4.2-yocto-standard #1 SMP PREEMPT Thu Jul  6 18:43:38 UTC 2023 ppc64le GNU/Linux
Comment 7 Khem Raj 2023-07-11 18:36:13 UTC
(In reply to Bruce Ashfield from comment #6)
> This now builds with 6.4.x
> 
> qemuppc64 login: root
> root@qemuppc64:~# uname -a
> Linux qemuppc64 6.4.2-yocto-standard #1 SMP PREEMPT Thu Jul  6 18:43:38 UTC
> 2023 ppc64le GNU/Linux

did you try it after removing following line from meta/recipes-kernel/linux/linux-yocto_6.4.bb ?

INSANE_SKIP:kernel-vmlinux:qemuppc64 = "textrel"
Comment 8 Bruce Ashfield 2023-07-11 19:03:18 UTC
Ah, no I didn't.

I was more worried about the build side of things, since there still isn't a plan to fully support the target.
Comment 9 Bruce Ashfield 2023-07-11 19:03:25 UTC
Ah, no I didn't.

I was more worried about the build side of things, since there still isn't a plan to fully support the target.
Comment 10 Bruce Ashfield 2023-07-11 19:30:51 UTC
re-opening, since this wasn't about building, but about textrel. Which we currently have no intention of fixing.

Also moving out to 4.99 future, so it doesn't have to be constantly updated.
Comment 11 Randy MacLeod 2025-07-17 14:57:54 UTC
qemuppc64 is present but not testing or supported by YP so obsolete.