[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240512132513.2831-1-ansuelsmth@gmail.com>
Date: Sun, 12 May 2024 15:25:07 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Saravana Kannan <saravanak@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
Helge Deller <deller@....de>,
Javier Martinez Canillas <javierm@...hat.com>,
Baoquan He <bhe@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
David Bauer <mail@...id-bauer.net>,
Liviu Dudau <liviu@...au.co.uk>,
Serge Semin <fancer.lancer@...il.com>,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org
Cc: Christian Marangi <ansuelsmth@...il.com>
Subject: [PATCH 0/4] of: bootargs handling improvement
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.
>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.
This feature is different than hardcoding the CMDLINE since that is
usable only with some specific case and is really problematic if the
same kernel is used for multiple devices that share a common kernel and
dtsi
Christian Marangi (3):
docs: dt: Document new bootargs chosen property
of: add support for bootargs-override chosen property
of: add support for bootargs-append chosen property
David Bauer (1):
MIPS: add bootargs-override property
Documentation/devicetree/usage-model.rst | 9 +++++++++
arch/mips/kernel/setup.c | 14 +++++++++++++-
drivers/of/fdt.c | 15 +++++++++++++--
3 files changed, 35 insertions(+), 3 deletions(-)
--
2.43.0
Powered by blists - more mailing lists