You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Device: Youku YK-L1(in fact I believe in all mt7620, rt3883, rt305x devices)
Software versions: v19.07
Problem: YK-L1 has a 32 MB flash chip and device has very poor flash read and write performance. It will need 10 minutes to format filesystem after install OpenWrt.
Reason: In kernel config file(/target/linux/ramips/mt7620/config-xxx) it defined CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y. But MT7621 and MT7628 do not has this define. So one block is only 4 KB in MT7620 but 64 KB in MT7628/MT7621. MT7628 is much faster than MT7620 in the same spi frequency.
I do not know why we use 4K sectors in these platform because it seems like won't waste storage space by set block size to 64 KB.
Here is a rt5350 device and we can see erasesize is 4 KB, same as mt7620.
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00001000 "u-boot"
mtd1: 00010000 00001000 "factory"
mtd2: 003d0000 00001000 "firmware"
mtd3: 0013891e 00001000 "kernel"
mtd4: 002976e2 00001000 "rootfs"
mtd5: 00039000 00001000 "rootfs_data"
The text was updated successfully, but these errors were encountered:
Here's a PR trying to fix this: #3271 mtd spi-nor: use 4K erase only where need, with 64K erasesize otherwise
Purely FYI, when enabling VARIABLE_ERASE, the larger 64K erase blocks will be used. Consequently, affected devices must also adjust the image BLOCKSIZE (as defined in e.g. target/linux/ramips/image/mt7620.mk) to match, otherwise the configuration may not be preserved across upgrades.
Ideally, BLOCKSIZE should be updated concurrently with VARIABLE_ERASE, see #3271 (comment)
DragonBluep:
Device: Youku YK-L1(in fact I believe in all mt7620, rt3883, rt305x devices)
Software versions: v19.07
Problem: YK-L1 has a 32 MB flash chip and device has very poor flash read and write performance. It will need 10 minutes to format filesystem after install OpenWrt.
Reason: In kernel config file(/target/linux/ramips/mt7620/config-xxx) it defined CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y. But MT7621 and MT7628 do not has this define. So one block is only 4 KB in MT7620 but 64 KB in MT7628/MT7621. MT7628 is much faster than MT7620 in the same spi frequency.
I do not know why we use 4K sectors in these platform because it seems like won't waste storage space by set block size to 64 KB.
Here is a rt5350 device and we can see erasesize is 4 KB, same as mt7620.
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00001000 "u-boot"
mtd1: 00010000 00001000 "factory"
mtd2: 003d0000 00001000 "firmware"
mtd3: 0013891e 00001000 "kernel"
mtd4: 002976e2 00001000 "rootfs"
mtd5: 00039000 00001000 "rootfs_data"
The text was updated successfully, but these errors were encountered: