From: "Rafał Miłecki" <zajec5@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: "Mikhail Zhilkin" <csharper2005@gmail.com>,
"Christian Marangi" <ansuelsmth@gmail.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"Chaitanya Kulkarni" <kch@nvidia.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"Jens Axboe" <axboe@kernel.dk>,
"Andrew Morton" <akpm@linux-foundation.org>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH V3 1/2] dt-bindings: mtd: partitions: support marking rootfs partition
Date: Sat, 22 Oct 2022 23:13:17 +0200 [thread overview]
Message-ID: <20221022211318.32009-1-zajec5@gmail.com> (raw)
From: Rafał Miłecki <rafal@milecki.pl>
Linux needs to know what to use as root device. On embedded devices with
flash the only common way to specify that is cmdline & root= parameter.
That solution works with U-Boot which is Linux & cmdline aware but isn't
available with all market bootloaders. Also that method is fragile:
1. Requires specific probing order on multi-flash devices
2. Uses hardcoded partitions indexes
A lot of devices use different partitioning methods. It may be
"fixed-partitions" or some dynamic partitioning (e.g. based on parts
table). For such cases allow "linux,rootfs" property to mark correct
flash partition.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Use "linux,rootfs" as more accurate. Thanks Rob.
---
.../devicetree/bindings/mtd/partitions/fixed-partitions.yaml | 1 +
.../devicetree/bindings/mtd/partitions/partition.yaml | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
index ad3ccd250802..d66a6e3bcb56 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
@@ -84,6 +84,7 @@ examples:
partition@0 {
label = "filesystem";
reg = <0x00000000 0x1 0x00000000>;
+ linux,rootfs;
};
};
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index f1a02d840b12..a25cd23a34c0 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -52,6 +52,10 @@ properties:
immune to paired-pages corruptions
type: boolean
+ linux,rootfs:
+ description: Marks partition that contains root filesystem to mount and boot
+ user space from
+
if:
not:
required: [ reg ]
--
2.34.1
next reply other threads:[~2022-10-22 21:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 21:13 Rafał Miłecki [this message]
2022-10-22 21:13 ` [PATCH V3 2/2] mtd: core: set ROOT_DEV for partitions marked as rootfs in DT Rafał Miłecki
2022-11-07 16:21 ` Miquel Raynal
2022-10-26 19:41 ` [PATCH V3 1/2] dt-bindings: mtd: partitions: support marking rootfs partition Rob Herring
2022-11-07 16:22 ` Miquel Raynal
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=20221022211318.32009-1-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ansuelsmth@gmail.com \
--cc=axboe@kernel.dk \
--cc=csharper2005@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=kch@nvidia.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=martin.petersen@oracle.com \
--cc=miquel.raynal@bootlin.com \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.com \
--cc=wsa+renesas@sang-engineering.com \
/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).