[OpenWrt-Devel] [PATCH 2/5] ath79: port cybertan_part from ar71xx

Christian Lamparter chunkeey at gmail.com
Sun Aug 12 08:53:44 EDT 2018


On Saturday, August 11, 2018 10:16:06 PM CEST Jonas Gorski wrote:
> On 10 August 2018 at 23:24, Christian Lamparter <chunkeey at gmail.com> wrote:
> > The cybertan_part mtd parser is ported over from ar71xx and converted
> > to integrate into the "firmware" mtd splitter. It will no longer add
> > the u-boot, nvram and art partitions, which were never part of the
> > special Cybertan header.
> >
> > Instead these partitions have to be specified in the DT, which has the
> > upside of making it possible to add properties (i.e.: read-only), labels
> > and references to these important partitions.
> 
> Instead of using the OpenWrt proprietary FIRMWARE_PARSER thingy, there
> is now an upstream (device tree) solution for that.
> 
> By giving the parser an of_mach_table (with e.g. "foo,cybertan") you
> can then define it as
> 
> partitions {
>                        ...
> 
>                        partition at 40000 {
>                                label = "firmware";
>                                reg = <0x40000 0x7a0000>;
>                                compatible = "foo,cybertan";
>                        };
>                        ...
> };
> 
> and the parser will be called for the firmware partition.
> 
> And then we can eventually drop the FIRMWARE_PARSER stuff from OpenWrt.
> 
> See http://git.infradead.org/linux-mtd-next.git/blob/HEAD:/drivers/mtd/parsers/parser_trx.c
> for an example of such a parser. Should be really not much change
> needed for that (also it should then reside in the parsers sub
> directory). The hardest part will be figuring out, what the right
> compatible name is ;-)
> 
Thank you, I made all the requested changes and moved the driver to
mtd/parsers/parser_cybertan.c . I'll wait a few days until I post
v2 though.

Regards,
Christian



_______________________________________________
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