[OpenWrt-Devel] [PATCH 1/8] kernel: add DT binding support to the fit parser

Christian Lamparter chunkeey at gmail.com
Mon Dec 10 20:10:38 EST 2018


On Monday, December 10, 2018 10:28:22 PM CET John Crispin wrote:
> 
> On 10/12/2018 16:47, Piotr Dymacz wrote:
> > Hi Christian,
> >
> > On 09.12.2018 16:34, Christian Lamparter wrote:
> >> It allows specifying default and Netgear parsers directly in the DT.
> >>
> >> Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
> >> ---
> >>   .../linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c | 6 ++++++
> >>   1 file changed, 6 insertions(+)
> >>
> >> diff --git 
> >> a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c 
> >> b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
> >> index f356adcd4e..b7e56fc083 100644
> >> --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
> >> +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
> >> @@ -120,9 +120,15 @@ mtdsplit_fit_parse(struct mtd_info *mtd,
> >>       return 2;
> >>   }
> >>   +static const struct of_device_id mtdsplit_fit_of_match_table[] = {
> >> +    { .compatible = "openwrt,fit-firmware" },
> >
> > Shouldn't that be "denx,fit", same as in case of "denx,uimage"? AFAIK, 
> > FIT format also comes from U-Boot and it's not OpenWrt specific 
> > (please, correct me if I'm wrong here).
> >

I didn't know that DENX is fine with calling this mtdsplit binding their own
creation, since their u-boot does not contain any bindings for this (yet?).
So I went for openwrt,fit-firmware because OpenWrt puts so much more than
just the FIT in that partition. The FIT, rootfs, optional padding and 
rootfs_data(aligned JFFS2 marker) are concatenated together in that specific
order so the firmware can be flashed in one go.
On boot The u-boot only loads the first thing it finds at a specified 
offset of the flash (Note: the FIT image does have support to store a 
rootfs in it too! But from what I can tell, no official OpenWrt image 
is using this feature). Only the kernel uses a combination of 
mtdsplit_fit/uimage and mtdsplit_squashfs.c to create the dynamic mtd
partitions for the kernel, rootfs and rootfs_data.

That said, I'm fine with calling it "denx,fit" and I hope DENX is as well :-D.

> i was about to ask the same. a owrt prefix means we have to worry about 
> it in the future and we dont want that....
Done.



_______________________________________________
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