Re: [PATCH] loongarch: Make CONFIG_CMDLINE work with CONFIG_CMDLINE_EXTEND and CONFIG_CMDLINE_BOOTLOADER

From: ‎ donmor
Date: Mon Jul 10 2023 - 11:10:56 EST


在 2023-07-10星期一的 15:53 +0800,Huacai Chen写道:
> On Mon, Jul 10, 2023 at 1:35 AM ‎ donmor <donmor3000@xxxxxxxxxxx> wrote:
> > 在 2023-07-09星期日的 23:30 +0800,Huacai Chen写道:
> > > How to reproduce? If you use UEFI firmware, this is handled in
> > > drivers/firmware/efi/libstub/efi-stub.c; if you use non-UEFI firmware,
> > > this is handled in drivers/of/fdt.c.
> >
> > In fact it 's not command line retrieved from efi or fdt, but the built-in
> > command line to be concerned. CONFIG_CMDLINE was never been touched during
> > boot on loongarch, unless CONFIG_CMDLINE_FORCE is set because there is code
> > handling this. There should be code handling CONFIG_CMDLINE_FORCE and
> > CONFIG_CMDLINE_EXTEND as well but is absent by now.
>
> I mean the code in drivers/of/fdt.c already handles
> CONFIG_CMDLINE_EXTEND and CONFIG_CMDLINE_FORCE, understand?
>
> On the other hand, I found that for non-FDT system
> CONFIG_CMDLINE_FORCE indeed doesn't work, but
> CONFIG_CMDLINE_BOOTLOADER works, so you needn't fix
> CONFIG_CMDLINE_BOOTLOADER, and you need add "goto out" in the "if
> (initial_boot_params)" condition.
>
> Huacai

Got it. I'll make a v2 asap.

donmor