From: "Rafał Miłecki" <zajec5@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
bcm-kernel-feedback-list@broadcom.com,
"John Crispin" <john@phrozen.org>,
"Arınç ÜNAL" <arinc.unal@arinc9.com>,
"Sergio Paracuellos" <sergio.paracuellos@gmail.com>,
linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH V2 1/2] dt-bindings: mtd: partitions: add TP-Link SafeLoader layout
Date: Sat, 15 Oct 2022 10:57:56 +0200 [thread overview]
Message-ID: <27607fc6-fcab-ec13-7a21-16e6e0de7602@gmail.com> (raw)
In-Reply-To: <20221012162117.GA2275712-robh@kernel.org>
On 12.10.2022 18:21, Rob Herring wrote:
> On Wed, Oct 12, 2022 at 07:04:41AM +0200, Rafał Miłecki wrote:
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> Most TP-Link home routers use the same partitioning system based on a
>> custom ASCII table.
>>
>> It doesn't seem to have any official name. GPL sources contain tool
>> named simply "make_flash" and Makefile target "FlashMaker".
>>
>> This partitions table format was first found in devices with a custom
>> SafeLoader bootloader so it was called SafeLoader by a community. Later
>> it was ported to other bootloaders but it seems the name sticked.
>>
>> Add binding for describing flashes with SafeLoader partitions table. It
>> allows operating systems to parse it properly and register proper flash
>> layout.
>>
>> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>> ---
>> V2: Fix typo in commit: s/same/name/
>> ---
>> .../tplink,safeloader-partitions.yaml | 44 +++++++++++++++++++
>> 1 file changed, 44 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml
>> new file mode 100644
>> index 000000000000..e38aaea5aa11
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml
>> @@ -0,0 +1,44 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/mtd/partitions/tplink,safeloader-partitions.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: TP-Link SafeLoader partitions
>> +
>> +description: |
>> + TP-Link home routers store various data on flash (e.g. bootloader,
>> + flash layout, firmware, product info, configuration, calibration
>> + data). That requires flash partitioning.
>> +
>> + Flash space layout of TP-Link devices is stored on flash itself using
>> + a custom ASCII-based format. That format was first found in TP-Link
>> + devices with a custom SafeLoader bootloader. Later it was adapted to
>> + CFE and U-Boot bootloaders.
>> +
>> + This binding describes partitioning method and defines offset of ASCII
>> + based partitions table. That offset is picked at manufacturing process
>> + and doesn't change.
>> +
>> +maintainers:
>> + - Rafał Miłecki <rafal@milecki.pl>
>> +
>> +properties:
>> + compatible:
>> + const: tplink,safeloader-partitions
>> +
>> + partitions-table-offset:
>> + description: Flash offset of partitions table
>> + $ref: "/schemas/types.yaml#/definitions/uint32"
>
> Don't need quotes.
>
>> +
>> +required:
>> + - partitions-table-offset
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + partitions {
>> + compatible = "tplink,safeloader-partitions";
>> + partitions-table-offset = <0x100000>;
>
> What is in the space before this? It is part of the safeloader
> partitions? If the safeloader partitions are not the entire device, then
> perhaps we still need fixed partitions.
Various partitions are placed before and after partitions table.
Usually/always the whole flash space is covered by partitions defined in
the partitions table.
prev parent reply other threads:[~2022-10-15 8:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 5:04 [PATCH V2 1/2] dt-bindings: mtd: partitions: add TP-Link SafeLoader layout Rafał Miłecki
2022-10-12 5:04 ` [PATCH V2 2/2] mtd: parsers: add TP-Link SafeLoader partitions table parser Rafał Miłecki
2022-10-12 16:21 ` [PATCH V2 1/2] dt-bindings: mtd: partitions: add TP-Link SafeLoader layout Rob Herring
2022-10-15 8:57 ` Rafał Miłecki [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=27607fc6-fcab-ec13-7a21-16e6e0de7602@gmail.com \
--to=zajec5@gmail.com \
--cc=arinc.unal@arinc9.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=sergio.paracuellos@gmail.com \
--cc=vigneshr@ti.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