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

Andreas Kemnade andreas at kemnade.info
Wed Feb 7 07:46:03 CET 2024


On Tue, 6 Feb 2024 22:38:08 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:

> Hi all,
> 
> > Am 06.02.2024 um 20:20 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> > 
> > Hi all,
> >   
> >> Am 06.02.2024 um 19:24 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> >>   
> > All this does not fit to copying fw_arg2 to _fw_envp in fw_init_cmdline()
> > and starting to scan at index 0 in fw_getenv().
> > 
> > Here is a hint on what U-Boot bootm is doing:
> > 
> > https://docs.u-boot.org/en/stable/usage/cmd/bootm.html?highlight=bootm
> > 
> > If I read correctly there are two different formats. And, the second parameter
> > is NOT a list of some environment variables but the start address of a RAMDISK?
> > 
> > But what is then the story behind fw_getenv() at all?
> > 
> > And U-Boot starts the kernel by
> > 
> > bootcmd=fatload mmc 0 0x80a00000 /uImage; bootm 0x80a00000
> > 
> > I.e. there is no second parameter???  
> 
> I just realized that this all fw_getenv() is MIPS specific! No other architecture
> or driver uses this.
> 
> arch/mips/fw/lib/cmdline.c:char *fw_getenv(char *envname)
> 
> So I am not sure if this needs some patch in U-Boot to do what is expected.
> And I do not exactly know what is expected :)
> 
> Some MIPS processors seem to use fw_getenv() to look for "initrd_start", "fdt_start",
> "yamontty", "cpuclock", "memsize", "modetty0".
> 
well, initrd_start and stop is put by recent enough arm u-boot into the choosen section
of the devicetree. Maybe just tell the u-boot to do the same...

Regards,
Andreas


More information about the Letux-kernel mailing list