* What's the deal with the different boot command lines?
@ 2012-12-03 17:08 James Hogan
2013-01-04 10:26 ` James Hogan
0 siblings, 1 reply; 2+ messages in thread
From: James Hogan @ 2012-12-03 17:08 UTC (permalink / raw)
To: Arnd Bergmann, Jonas Bonn, Ralf Baechle, Grant Likely; +Cc: linux-arch
Hi,
I've been trying to figure out how the various copies of the command
line are handled and what they're for, to figure out what the best thing
to do is to avoid getting the same cmdline twice when
early_init_dt_scan_chosen falls back to CONFIG_CMDLINE. As far as I can
tell from the generic code:
setup_arch() is expected to set
* boot_command_line
* the pointer pointed to by it's argument (which goes into
start_kernel()'s command_line variable).
What is the intention of both of these command lines? Are they supposed
to be the same, or different, or what?
boot_command_line:
* passed to parse_args("early options", ...)
* gets printed
* copied to saved_command_line, which is copied to static_command_line
and used for parsing args at each init level
command_line:
* copied to static_command_line first, and passed to parse_args("Booting
kernel", ...)
Some interesting architecture's setup_arch() behaviour that I've noticed:
Openrisc appears to set command_line to CONFIG_CMDLINE, but gets
boot_command_line from the devicetree chosen.bootargs, which defaults to
CONFIG_CMDLINE. So it appears that it provides different values. Was
this intentional?
MIPS appears to use of_scan_flat_dt to set arcs_cmdline from the
devicetree (this will default to CONFIG_CMDLINE). CONFIG_CMDLINE may
then be appended again in arch_mem_init. This is the same problem we
have with metag. I'm of the opinion that of_scan_flat_dt is doing the
wrong thing in falling back to CONFIG_CMDLINE, but maybe I misunderstand
and it just doesn't matter if command line options are repeated. Any
thoughts?
Thanks
James
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: What's the deal with the different boot command lines?
2012-12-03 17:08 What's the deal with the different boot command lines? James Hogan
@ 2013-01-04 10:26 ` James Hogan
0 siblings, 0 replies; 2+ messages in thread
From: James Hogan @ 2013-01-04 10:26 UTC (permalink / raw)
To: Arnd Bergmann, Jonas Bonn, Ralf Baechle, Grant Likely; +Cc: linux-arch, Will
Ping. Any comments on this?
On 03/12/12 17:08, James Hogan wrote:
> Hi,
>
> I've been trying to figure out how the various copies of the command
> line are handled and what they're for, to figure out what the best thing
> to do is to avoid getting the same cmdline twice when
> early_init_dt_scan_chosen falls back to CONFIG_CMDLINE. As far as I can
> tell from the generic code:
>
> setup_arch() is expected to set
> * boot_command_line
> * the pointer pointed to by it's argument (which goes into
> start_kernel()'s command_line variable).
>
> What is the intention of both of these command lines? Are they supposed
> to be the same, or different, or what?
>
> boot_command_line:
> * passed to parse_args("early options", ...)
> * gets printed
> * copied to saved_command_line, which is copied to static_command_line
> and used for parsing args at each init level
>
> command_line:
> * copied to static_command_line first, and passed to parse_args("Booting
> kernel", ...)
>
> Some interesting architecture's setup_arch() behaviour that I've noticed:
>
> Openrisc appears to set command_line to CONFIG_CMDLINE, but gets
> boot_command_line from the devicetree chosen.bootargs, which defaults to
> CONFIG_CMDLINE. So it appears that it provides different values. Was
> this intentional?
>
> MIPS appears to use of_scan_flat_dt to set arcs_cmdline from the
> devicetree (this will default to CONFIG_CMDLINE). CONFIG_CMDLINE may
> then be appended again in arch_mem_init. This is the same problem we
> have with metag. I'm of the opinion that of_scan_flat_dt is doing the
> wrong thing in falling back to CONFIG_CMDLINE, but maybe I misunderstand
> and it just doesn't matter if command line options are repeated. Any
> thoughts?
>
> Thanks
> James
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-04 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 17:08 What's the deal with the different boot command lines? James Hogan
2013-01-04 10:26 ` James Hogan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).