[Letux-kernel] LX20 prototype is booting
H. Nikolaus Schaller
hns at goldelico.com
Tue May 6 07:58:07 CEST 2025
Hi Paul,
> Am 06.05.2025 um 01:02 schrieb Paul Boddie <paul at boddie.org.uk>:
>
> On 2025-05-05 22:27, H. Nikolaus Schaller wrote:
>> For the exec() problem I could now trace it down to arch_check_elf() in arch/mips/kernel/elf.c
>> And specifically:
>> https://elixir.bootlin.com/linux/v6.1.28/source/arch/mips/kernel/elf.c#L166
>
> That is some verbose code, but highly readable, I suppose.
>
>> But I have no idea why. And why only for x2000 and not x1600.
>> Values are:
>> [ 0.017085] arch_check_elf elf32=1
>> [ 0.017085] arch_check_elf flags=10001007
>> which means that EF_MIPS_NAN2008 (=0x00000400) is not set in the flags.
>> And mips_use_nan_legacy is not set at all.
>> So either the header is not read properly (alignment issue?) or the mips_use_nan_legacy
>> should be set... Which may be correct that it is not set. Then we have a problem.
I checked the header on some ARM Linux.
root at letux:~# readelf -a /media/sdb/rootfs/sbin/init
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x401d10
Start of program headers: 52 (bytes into file)
Start of section headers: 39480 (bytes into file)
Flags: 0x10001007, noreorder, pic, cpic, o32, mips2
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 11
Size of section headers: 40 (bytes)
Number of section headers: 31
Section header string table index: 30
...
The "Flags" appear to be correct as the x2000 arch_check_elf() is finding them.
So we are missing the mips_use_nan_legacy flag.
> Now, I did read something recently, maybe related to GCC or perhaps Debian, about older XBurst implementations not supporting the appropriate MIPS floating-point semantics. This may have complicated the situation for MIPS32 in Debian, leading to its relegation to only getting support from a third party in future releases.
Well, that should indeed influence future development.
But here I am using good old Jessie which is working fine on all other Ingenic
MIPS devices.
Therefore I think we have some bug in architecture setup. Maybe the x2000 is not
set up as compatible for R3000, o32, mips2?
BR,
Nikolaus
More information about the Letux-kernel
mailing list