[Letux-kernel] X1600 / LX16 support - here: fw_getenv() issue

H. Nikolaus Schaller hns at goldelico.com
Tue Feb 6 17:15:57 CET 2024



> Am 06.02.2024 um 09:28 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> So I added some more ll_printk() and it appears as if the _fw_argv processing is ok,
> but someone overwrites some pointers of the _fw_envp so that scanning for env strings
> fails.
> 
> The values overwriting the pointers look like ASCII characters "3=me" and "0 at M2".
> 
> Next I'll check values at the beginning of the initialization,right after kernel_entry
> in start_kernel. Maybe it is possible to "bisect" the code location where these pointers
> are overwritten.

First analysis results indicate that the env string pointers are already damaged when
start_kernel() is called.

Next, I plan to do comparable tests on the letux-5.10.y-lx16 tests (which is a little
difficult as we can't printk() so early in kernel startup).

One new hypothesis comes to my mind: the new kernel is bigger than the letux-5.10.y-lx16
kernel. So loading the kernel may overwrite something which U-Boot assumes to be safe.

Another hypothesis is that it is compiler dependent. At least on my setup - but Paul
has the same issue. I compile the 5.10 kernels with gcc 4.9.2 and the 6.8 kernel with
gcc 6.3.0. That is not a big deal to test.

BR,
Nikolaus



More information about the Letux-kernel mailing list