[OpenWrt-Devel] Random data on rootfs_data for tp-wr2543nd-v1 only with ath79

Luiz Angelo Daros de Luca luizluca at gmail.com
Fri Feb 7 14:53:48 EST 2020


Thanks Chuanhong,

That is exactly what introduced the issue. I double check with and without
the patch and without it I got the random data from mtd:

Without the patch
target/linux/ath79/patches-4.14/461-spi-ath79-add-fast-flash-read.patch:

root at OpenWrt:/# dd if=/dev/mtd4 | md5sum -
d339cbfaf5ce709878d98bf83b853b63  -
7936+0 records in
7936+0 records out
root at OpenWrt:/# dd if=/dev/mtd4 | md5sum -
b97c976391ae881a8139f325a18ecdb2  -
7936+0 records in
7936+0 records out
root at OpenWrt:/# uname -a
Linux OpenWrt 4.14.167 #0 Mon Feb 3 15:18:08 2020 mips GNU/Linux

With the patch
target/linux/ath79/patches-4.14/461-spi-ath79-add-fast-flash-read.patch:

root at OpenWrt:/# dd if=/dev/mtd4 | md5sum -
2404e891bd9e420fc4ec45e61cdd0ca9  -
7936+0 records in
7936+0 records out
root at OpenWrt:/# dd if=/dev/mtd4 | md5sum -
2404e891bd9e420fc4ec45e61cdd0ca9  -
7936+0 records in
7936+0 records out
root at OpenWrt:/# dd if=/dev/mtd4 | md5sum -
2404e891bd9e420fc4ec45e61cdd0ca9  -
7936+0 records in
7936+0 records out
root at OpenWrt:/# uname -a
Linux OpenWrt 4.14.167 #0 Mon Feb 3 15:18:08 2020 mips GNU/Linux

Buildtime are equal... maybe it is because of some reproducibility effort
that does not consider patches.
All my tests are using initram image and kernel 4.14.

The flash is a Spansion S25FL064PIF. It is the same of TL-WR842NDv1, which
has the flash section of DTS identical.

Kernel always detects it as:
[    0.656283] m25p80 spi0.0: s25sl064p (8192 Kbytes)

I tried some random changes (without knowing what I'm really doing) like:

compatible = "spansion,spi-nor";
compatible = "spansion,s25sl064p", "spansion,m25p80", "jedec,spi-nor"
m25p,fast-read;

But I guess all those name variations will, in the end, mean just the same.
"m25p,fast-read" does not fix the issue as well.

Regards,

---
     Luiz Angelo Daros de Luca
            luizluca at gmail.com


Em qui., 6 de fev. de 2020 às 23:57, Chuanhong Guo <gch981213 at gmail.com>
escreveu:

> Hi!
>
> On Fri, Feb 7, 2020 at 6:44 AM Luiz Angelo Daros de Luca
> <luizluca at gmail.com> wrote:
> >
> > Hello,
> >
> > I isolated the problem to be kernel upgrade from 4.14 to 4.19. If I
> build ath79 with 4.14, it simply works.
> > The mtd problem also happens while booting 4.19 without touching the
> flash 4.19 (using initram image).
> >
>
> Flash reading is handled differently between 4.14 and 4.19. 4.14 reads
> directly from 0x1f000000 where spi is mapped. But the interface used
> for that got removed in 4.19 so bit-bang mode is used instead.
> Could you try if removing
> target/linux/ath79/patches-4.14/461-spi-ath79-add-fast-flash-read.patch
> also breaks ath79/4.14?
>
> Regards,
> Chuanhong Guo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200207/616a0bd0/attachment.htm>
-------------- next part --------------
_______________________________________________
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