[OpenWrt-Devel] [PATCH 2/2] ramips: fix RBM11G name and partitioning

Mathias Kresin dev at kresin.me
Thu Jul 19 13:46:42 EDT 2018

2018-07-19 19:12 GMT+02:00 Thibaut VARÈNE <hacks at slashdirt.org>:
> This patch improves faf64056ddd46992a75b1e277d94541c7251035c by setting
> the correct partition scheme for the RouterBoot section of the flash.
> This section is subdivided in several segments, as they are on ar71xx
> RB devices, albeit with different offsets and sizes. The naming convention
> from ar71xx has been preserved, with an overlapping "RouterBoot" top level
> partition added for clarity due to the many holes.
> The resulting partition scheme looks like this:
> [    2.477826] Creating 7 MTD partitions on "spi0.0":
> [    2.482604] 0x000000000000-0x000000040000 : "RouterBoot"
> [    2.488948] 0x000000000000-0x00000000f000 : "routerboot"
> [    2.495289] 0x00000000f000-0x000000010000 : "hard_config"
> [    2.501596] 0x000000010000-0x00000001f000 : "routerboot2"
> [    2.507966] 0x000000020000-0x000000021000 : "soft_config"
> [    2.514307] 0x000000030000-0x000000031000 : "bios"
> [    2.520108] 0x000000040000-0x000001000000 : "firmware"
> The device name is corrected to match the hardware-stored (in hard_config)
> device name.
> Leave a note in DTS to mention this device supports hardware crypto.
> Leave a note in DTS to explain how the original author selected the SPI speed.
> Note: more work is required to get rbcfg working on this device due to
> endianness.
> Tested-by: Tobias Schramm <tobleminer at gmail.com>
> Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>

FYI, I already NAK'ed the very same patch on github after a way to
short conversation on IRC follow by some more words on github.

I neither see the need to add notes for not yet working nodes
[personal preference] to the device tree source file, nor the need to
to create the overlapping partitions "RouterBoot" +
routerboot/hard_config/routerboot2/... [personal preference].

To get the dt compiler accepting the overlapping partitions without a
warning, a style was chosen completely different from all other dts
files in the target [maintenance reason]. Furthermore, nodes sharing
the same reg are usually (always?) expressed as child nodes in the
devicetree similar to [technical reason]:

partitions {
    compatible = "fixed-partitions";

    partition at 0 {
        reg = <0 0x3000>;

        subpartition at 0 {
            reg = <0 0x1000>;

        subpartition at 1000 {
            reg = <0x1000 0x2000>;

    partition at 3000 {
        reg = <0x3000 0x10000>;

To my knowledge, the above isn't possible with fixed-partitions. Which
either means fixed-partitions misses a feature or someone tries to use
it in a way not intended.

This time I'll leave it up to someone else to make a call. I tried my
best to turn it into something that I'm fine to accept and failed.


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list