Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel 6.7+ on big-endian Power4 (PPC970MP in PowerMac G5)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Henr1k
n00b
n00b


Joined: 12 Feb 2024
Posts: 6

PostPosted: Mon Feb 12, 2024 5:01 pm    Post subject: Kernel 6.7+ on big-endian Power4 (PPC970MP in PowerMac G5) Reply with quote

Hi, I cannot boot any 6.7 kernels, last tried 6.7.4
It stops very early without an error message.
6.6.16 works fine.

My system had the same symptoms as Renés PS3 (very related CPU, Cell Power4)
https://www.youtube.com/watch?v=jhSmKtEv2xU (very long video, see summary below)

He fixed his PS3 kernel 6.7 by disabling the use of ELF ABI V2 (due to PS3 hypervisor not supporting that ABI)

I tried changing my .config file to this directly
CONFIG_PPC64_ELF_ABI_V2=n
as that setting is not found in gentoo-sources menuconfig.

It did not help however...
Does it work setting it directly in .config?

Or was ELF ABI V2 introduced in 6.6 already?
If so ELF ABI V2 can be ruled out as cause. (René is fixing a build that was broken for more than half a year)

The rest of the system is compiled with AltiVec ABI, -mabi-altivec, not sure how that all interferes with kernel ABI?
When the kernel fails so early, I do not think it has an effect. Except if the make.conf flags interfere with new kernel ABI build flags?

Any input is appreciated, thanks
Henrik
Back to top
View user's profile Send private message
Henr1k
n00b
n00b


Joined: 12 Feb 2024
Posts: 6

PostPosted: Mon Feb 12, 2024 5:40 pm    Post subject: Reply with quote

Henr1k wrote:

Or was ELF ABI V2 introduced in 6.6 already?


Ok, I tried googling again..:
Build big-endian kernel using ELF ABI V2
configname: CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2
In linux kernel since version 6.2 (release Date: 2023-02-19)


But I think it was only made default y and enabled, probably around new year:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg225076.html
so it is highly likely only made default y in 6.7+
Back to top
View user's profile Send private message
Henr1k
n00b
n00b


Joined: 12 Feb 2024
Posts: 6

PostPosted: Mon Feb 12, 2024 6:07 pm    Post subject: Reply with quote

Ok, found this:
(OpenPOWER ELF V2) expects an OpenPOWER-compliant processor to implement at least Power ISA V2.07B
in https://wiki.raptorcs.com/w/images/7/70/Leabi-20170510.pdf

2.07 is not present until POWER88: https://en.wikipedia.org/wiki/Power_ISA#Power_ISA_v.2.07

So it is highly likely related to ELF ABI V2 being set, even though it is not supported by the CPU.
I will try messing with my config again.
Back to top
View user's profile Send private message
Henr1k
n00b
n00b


Joined: 12 Feb 2024
Posts: 6

PostPosted: Mon Feb 12, 2024 7:51 pm    Post subject: Reply with quote

Found the setting in gentoo-sources menuconfig, I just had to enable Expert :roll:

I tried building with V2 disabled from menuconfig, but it did not start either...

I will look at the menuconfig generated .config when I have patience again, to check if V2 is indeed set to n.
Back to top
View user's profile Send private message
Henr1k
n00b
n00b


Joined: 12 Feb 2024
Posts: 6

PostPosted: Tue Feb 13, 2024 6:34 pm    Post subject: Reply with quote

Ok, it looks like PS3 with ELF V2 in T2 SDE kernel was fixed with this commit:
https://github.com/rxrbln/t2sde/commit/a4154aa0999fe75780b107c227eb2902fbef6bf8

There is some PS3 specific stuff, but also something linker related.

I will try to see if I can get 6.6.16 compiled and running with Clang/LLVM, and then try 6.7 with Clang/LLVM
I cannot remember which linker I use now...
Back to top
View user's profile Send private message
Henr1k
n00b
n00b


Joined: 12 Feb 2024
Posts: 6

PostPosted: Tue Mar 26, 2024 8:05 am    Post subject: Reply with quote

Kernel 6.8.1 works when compiled with clang, still didn't work with GCC.
Back to top
View user's profile Send private message
schwarzygesetzlos
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 187
Location: Funeralopolis

PostPosted: Thu May 23, 2024 6:39 pm    Post subject: Reply with quote

Interesting!

I had no problems running ELFv2 kernels on my PowerMac G5 11,2 and on the Talos II ever since ELFv2 could be enabled. Currently I am doing the builds with GCC 13.2 + binutils 2.42.

Could you upload/bpaste your kernel .config somewhere? I can check this out next week then.
_________________
Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | Vampire V4 SA [ApolloOS / Amiga OS 3.2.2]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum