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

Thibaut hacks at slashdirt.org
Thu Jul 19 13:57:45 EDT 2018


> On 19 Jul 2018, at 19:46, Mathias Kresin <dev at kresin.me> wrote:
> 
> 
> 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.

I don’t see why. AIUI DTS syntax is respected, all nodes have a unique name and all nodes refer to their top boundary as the unit address.

> Which
> either means fixed-partitions misses a feature or someone tries to use
> it in a way not intended.

The above is in line with the canonical way to define partitions in DTS, as documented in Documentation/devicetree/bindings/mtd/partition.txt

This method is apparently used in all bcm targets, as well as ath79, ipq and lantiq. I’d suggest that _not_ using this method is a bug, and not the correct way to go, as evidenced by the aforementioned documentation. Quoting:

	For backwards compatibility partitions as direct subnodes of the flash device are
	supported. This use is discouraged.

If this gets accepted it should be cherry-picked for 18.06.

T.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list