From: Rob Herring <robh@kernel.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Saravana Kannan <saravanak@google.com>,
Arnd Bergmann <arnd@arndb.de>, Helge Deller <deller@gmx.de>,
Javier Martinez Canillas <javierm@redhat.com>,
Baoquan He <bhe@redhat.com>, Thomas Gleixner <tglx@linutronix.de>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
David Bauer <mail@david-bauer.net>,
Liviu Dudau <liviu@dudau.co.uk>,
Serge Semin <fancer.lancer@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@vger.kernel.org
Subject: Re: [PATCH 0/4] of: bootargs handling improvement
Date: Mon, 20 May 2024 10:12:07 -0500 [thread overview]
Message-ID: <20240520151207.GA541701-robh@kernel.org> (raw)
In-Reply-To: <20240512132513.2831-1-ansuelsmth@gmail.com>
On Sun, May 12, 2024 at 03:25:07PM +0200, Christian Marangi wrote:
> This is a very simple series that try to solve a very simple problem.
>
> Many emebedded devices have very hacked (by OEMS) bootloader that do all
> kind of modification and makes the kernel unbootable with the very first
> small modification. And also many times these broken bootloader have
> hardcoded values that can't be modified and would require risky
> procedure that can brick the device.
>
> One of the common modification done is hardcoding bootargs in the
> appended kernel DT trashing the bootargs set in the /chosen.
>
> The main usage of this is to have dynamic stuff to support dual
> partition scheme and make the kernel load a dedicated rootfs. But the
> other usage of this is to effectively lockup the device and cause kernel
> panic on modification like using squashfs instead of legacy jffs2.
>
> The simple solution to this is to let the bootloader override the
> bootargs in /chosen and make the kernel parse a different property.
What happens when bootloaders start using these new "standard" bootarg
properties and you need to override them? Perhaps name it something the
OEM wouldn't use (maybe):
"use-this-bootargs-instead-for-the-broken-bootloader"
> >From long time on OpenWRT we use bootargs-override as the alternative
> property for this task fixing the problem of overridden bootargs.
>
> The second feature is bootargs-append. This is self-explanatory,
> sometimes bootargs from bootloader might be good but lack of some
> crucial things that needs to be appended, like rootfstype or rootfs
> path.
It is unfortunate that the kernel's handling of appending or prepending
to bootargs is ambiguous. And MIPS is a further mess with handling
cmdline from multiple sources.
I'm not really interested in adding any more complexity to the cmdline
handling until it is made common. There's been at least 2 approaches to
doing that.
Rob
prev parent reply other threads:[~2024-05-20 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-12 13:25 [PATCH 0/4] of: bootargs handling improvement Christian Marangi
2024-05-12 13:25 ` [PATCH 1/4] docs: dt: Document new bootargs chosen property Christian Marangi
2024-05-12 13:25 ` [PATCH 2/4] of: add support for bootargs-override " Christian Marangi
2024-05-12 13:25 ` [PATCH 3/4] of: add support for bootargs-append " Christian Marangi
2024-05-12 13:25 ` [PATCH 4/4] MIPS: add bootargs-override property Christian Marangi
2024-05-20 15:12 ` 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=20240520151207.GA541701-robh@kernel.org \
--to=robh@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=arnd@arndb.de \
--cc=bhe@redhat.com \
--cc=conor+dt@kernel.org \
--cc=deller@gmx.de \
--cc=devicetree@vger.kernel.org \
--cc=fancer.lancer@gmail.com \
--cc=javierm@redhat.com \
--cc=jiaxun.yang@flygoat.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=liviu@dudau.co.uk \
--cc=mail@david-bauer.net \
--cc=saravanak@google.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
/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).