[OpenWrt-Devel] [PATCH 4/6] bcm53xx: bcm47xxpart: add support for parsing device tree partitions

Rafał Miłecki zajec5 at gmail.com
Mon May 18 11:05:25 EDT 2015


On 16 May 2015 at 15:28, Rafał Miłecki <zajec5 at gmail.com> wrote:
> On 16 May 2015 at 13:53, Álvaro Fernández Rojas <noltari at gmail.com> wrote:
>> This patch splits firmware partition based on TRX header, while ofpart won't be able to split firmware partition into kernel (linux) + rootfs.
>> It's very similar to bcm63xx code, where bcmtag contains the information needed to split linux partition into kernel + rootfs.
>
> Let me think about this, but I guess it's not the way we want to
> handle it. We probably should use TRX MTD splitter.

OK, let me share my thoughts. There is a chain of problems ;) but we
can handle it with a bit of time.

It seems the main reason for you hacking bcm47xxpart is its support
for creating "firmware" partition subpartitions. This is not a way to
go. We should allow any driver (bcm47xxpart, ofpart) to just create
"firmware" and then have separated splitter handling "firmware"
partition.

There already is a driver for that, see MTD_SPLIT_TRX_FW.
Unfortunately, we can't enable it for bcm53xx as it will conflict with
bcm47xxpart.

So we should drop support for TRX parsing from bcm47xxpart and then
enable MTD_SPLIT_TRX_FW. Unfortunately bcm47xxpart is already
upstreamed (and I want to use upstream version). There is no reason to
drop TRX parting from bcm47xpart mainline, since MTD_SPLIT_TRX_FW
exists in OpenWrt only.

So we should add MTD_SPLIT_TRX_FW to the mainline kernel.
Unfortunately this also isn't possible, because mainline kernel
doesn't support mtdsplit.

So there is a good news. I've just sent patch to linux-mtd ML adding
support for splitting parsers:
https://patchwork.ozlabs.org/patch/473363/

Once we got my patch accepted we can work on every step from the above
chain one by one.

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list