openwrt-mirror/target/linux
Roger Pueyo Centelles 68d91f08ed ath79: mikrotik: use 64 KiB SPI NOR erase sectors
This patch removes CONFIG_MTD_SPI_NOR_USE_4K_SECTORS from the default
symbols for the ath79/mikrotik target.

MikroTik devices hold some of their user-configurable settings in the
soft_config partition, which is typically sized 4 KiB, of the SPI NOR
flash memory. Previously, in the ar71xx target, it was possible to use
64 KiB erase sectors but also smaller 4 KiB ones when needed. This is
no longer the case in ath79 with newer kernels so, to be able to write
to these 4 KiB small partitions without erasing 60 KiB around, the
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS symbol was added to the defaults.
However, this ended up making sysupgrade images which were built with
64 KiB size blocks not to keep settings (e.g., the files under
/etc/config/) over the flashing process.

Using 4 KiB erase sector size on the sysupgrade images (by setting
BLOCKSIZE = 4k) allows keeping settings over a flashing process, but
renders the process terribly slow, possibly causing a user to
mistakenly force a manual device reboot while the process is still on-
going. Instead, ditching the 4 KiB erase sectors for the default
64 KiB erase size provides normal SPI write speed and sysupgrade times,
at the expense of not being able to modify the soft_config partition
(which is rarely a required thing).

An OpenWrt patch for MTD_SPI_NOR_USE_4K_SECTORS_LIMIT may once have
allowed to use different per-partition erase sector sizes. Due to
changes on recent kernels it now only works on a per-device basis.
Also, partial eraseblock write can be performed in ath79 with kernels
5.4 and lower, by copying the blocks from the 64 KiB, erasing the whole
sector and restoring those blocks not meant to be modified. A kernel
bump had that patch broken for a long time, but got fixed in bf2870c.

Note: the settings in the soft_config partition can be reset to their
defaults by holding the reset button for 5 seconds (and less than 10
seconds) at device boot.

Fixes: FS#3492 (sysupgrade […] loses settings...)
Fixes: a66eee6336 (ath79: add mikrotik subtarget)

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2021-10-22 08:15:40 -10:00
..
apm821xx kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
arc770 kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
archs38 kernel: Add missing kernel config options 2021-09-13 13:04:21 +02:00
armvirt armvirt: enable MMIO_CMDLINE_DEVICES for firecracker support 2021-10-12 19:22:08 -10:00
at91 kernel: move some drm symbols to generic config 2021-06-13 23:30:10 +02:00
ath25 kernel: bump 5.4 to 5.4.154 2021-10-21 00:17:36 +02:00
ath79 ath79: mikrotik: use 64 KiB SPI NOR erase sectors 2021-10-22 08:15:40 -10:00
bcm27xx kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
bcm47xx bcm47xx: add kernel 5.10 support 2021-10-21 17:38:17 +02:00
bcm53xx bcm53xx: bridge all LAN ports on Linksys EA9500 2021-10-22 13:46:22 +02:00
bcm63xx kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
bcm4908 kernel: bump 5.4 to 5.4.154 2021-10-21 00:17:36 +02:00
bmips kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
gemini gemini: splash banner on framebuffer console 2021-10-10 16:44:15 +02:00
generic kernel: 5.10: backport Marvell 88E1510/2 PHY SFP support 2021-10-21 00:17:36 +02:00
imx6 kernel: 5.10: add missing symbols 2021-10-05 23:54:18 +02:00
ipq40xx ipq40xx: use zImage for GL.iNet GL-B1300, GL-S1300 to shrink below 4096k 2021-10-10 16:47:41 +02:00
ipq806x ipq806x: remove obsolete Kernel 5.4 2021-10-02 18:15:23 +02:00
ipq807x kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21 2021-09-09 20:24:12 +02:00
kirkwood kirkwood: switch to kernel 5.10 2021-10-09 18:44:55 +02:00
lantiq kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
layerscape kernel: bump 5.4 to 5.4.155 2021-10-21 00:17:36 +02:00
malta malta: remove obsolete Kernel 5.4 2021-10-02 18:13:46 +02:00
mediatek kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
mpc85xx mpc85xx: switch to Kernel 5.10 2021-10-05 23:54:48 +02:00
mvebu mvebu: mochabin: correct LED labels in DTS 2021-10-09 19:27:11 +02:00
mxs treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
octeon kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
octeontx kernel: Deactivate some ARM64 errata workarounds 2021-10-03 01:13:18 +02:00
omap kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
oxnas kernel: bump 5.10 to 5.10.72 2021-10-10 00:09:22 +01:00
pistachio kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
ramips kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
realtek kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
rockchip rockchip: rename "Rock Pi 4" to "Rock Pi 4A" 2021-10-10 00:57:56 +02:00
sunxi kernel: Deactivate some ARM64 errata workarounds 2021-10-03 01:13:18 +02:00
tegra tegra: switch to kernel 5.10 2021-10-18 21:32:36 +02:00
uml treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
x86 kernel: bump 5.10 to 5.10.73 2021-10-21 00:17:36 +02:00
zynq zynq: switch to kernel 5.10 2021-10-17 14:13:22 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00