From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: What's the deal with the different boot command lines? Date: Fri, 4 Jan 2013 10:26:42 +0000 Message-ID: <50E6AE62.7020501@imgtec.com> References: <50BCDC93.4080100@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from multi.imgtec.com ([194.200.65.239]:51624 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752719Ab3ADK1W (ORCPT ); Fri, 4 Jan 2013 05:27:22 -0500 In-Reply-To: <50BCDC93.4080100@imgtec.com> Sender: linux-arch-owner@vger.kernel.org List-ID: 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 >