From: Rob Herring <robh+dt@kernel.org>
To: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Cc: James Hogan <james.hogan@mips.com>,
Linux-MIPS <linux-mips@linux-mips.org>,
Frank Rowand <frowand.list@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] MIPS: implement a "bootargs-append" DT property
Date: Wed, 15 Nov 2017 23:26:30 -0600 [thread overview]
Message-ID: <CAL_Jsq+MtHo5Da2mDD6c4JCb=kZrWEyOBz9pL+=9_f0VBQNAgA@mail.gmail.com> (raw)
In-Reply-To: <1510796793.16864.25.camel@chimera>
On Wed, Nov 15, 2017 at 7:46 PM, Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> wrote:
> On Tue, 2017-11-14 at 11:18 -0600, Rob Herring wrote:
>> I understand you can't apply random strings in any order you like. I'm
>> questioning the need to do that and what are the concrete example(s)
>> where you need that ability.
>
> Concrete:
> Pre-DT bootloader provides "console=/dev/someunusualdevice" and
> "root=/dev/mtdblock1" in argv. The dtb arranges flash differently and
> supplies "root=/dev/mtd2" in bootargs. Kernel uses /dev/mtdblock1 and
> panics, or alternatively uses /dev/mtd2 with no console.
>
>> I'd generally expect that only board specific options are in the dtb,
>> and a distro will add it's own options common for all and the specific
>> arch into the bootloader config files. And generally, the last thing
>> loaded gets the last say in what is set.
>
> Bootloaders and their configs are not distro-dependent.
For the ones that install grub, they are.
>> What h/w specific options would be needed for recovery kernel? That's
>> getting into putting not just Linux specifics into the dtb, but distro
>> specifics there. While yes, the dts files often already have bootargs
>> filled with Linux options, the intention is really that the bootloader
>> fills in bootargs. And if you have multiple kernels or OSs, then the
>> bootloader provides the mechanism to choose and boot with the right
>> options.
>
> Kernels _are_ distro-specific. A recovery kernel might also have options
> that are not hardware specific in addition to options that are.
>
>> I think the kernel (being last) should fully decide what to do:
>> append, prepend, and/or override. There was some work a while back to
>> support more flexible command line handling and be arch neutral, but
>> it never got merged.
>
> The kernel would not always have all the information needed for this
> decision now like it would before DT. The dtb should decide what
> precedence its bootargs have, and the kernel should decide what
> precedence compiled-in bootargs have. Such logic is provided by this
> patch, but not completely, because there is still no "bootargs-prepend"
> property. The only use case I can think of for "bootargs-prepend" would
> be to provide a default command line that is specific to a board that
> would sometimes have one bootloader, and sometimes another. Currently,
> such a situation can be worked around using a board-specific kernel, but
> this mechanism is a relic from pre-DT days.
>
prev parent reply other threads:[~2017-11-16 5:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1510420788-25184-1-git-send-email-daniel@gimpelevich.san-francisco.ca.us>
[not found] ` <1510420788-25184-1-git-send-email-daniel-R/FLGEdV95bo9U+Z1CfBt0SU0eOFXohjCypLqA8HKkk@public.gmane.org>
2017-11-13 11:23 ` [PATCH] MIPS: implement a "bootargs-append" DT property James Hogan
2017-11-13 12:31 ` Geert Uytterhoeven
2017-11-13 12:42 ` Daniel Gimpelevich
2017-11-13 13:18 ` Geert Uytterhoeven
2017-11-13 16:34 ` Rob Herring
[not found] ` <CAL_JsqJRVB928DVOAVQGrtT_EOuQBHkBhcd9+XFzqemutG65GA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-14 3:05 ` Daniel Gimpelevich
2017-11-14 17:18 ` Rob Herring
[not found] ` <CAL_JsqJoEEkoA1sGocGFXE7WWhCmkb5k2OxVRZ3OnigptoL8_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-16 1:46 ` Daniel Gimpelevich
2017-11-16 5:26 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAL_Jsq+MtHo5Da2mDD6c4JCb=kZrWEyOBz9pL+=9_f0VBQNAgA@mail.gmail.com' \
--to=robh+dt@kernel.org \
--cc=daniel@gimpelevich.san-francisco.ca.us \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=geert@linux-m68k.org \
--cc=james.hogan@mips.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).