Re: What's the deal with the different boot command lines?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux