ath79: linksys_ea4500-v3: take over the space for user data
authorEdward Chow <equu@openmail.cc>
Mon, 4 Mar 2024 17:24:10 +0000 (01:24 +0800)
committerRobert Marko <robimarko@gmail.com>
Thu, 7 Nov 2024 13:57:37 +0000 (14:57 +0100)
commit983a753f389efb893e3b75fff1b8af28839e3f3e
treeb41b8bfc20593308bd7345a6ca6d08a865f7a78f
parentf3359da4b89380144c91d1d05c5f6bacb14e6ce2
ath79: linksys_ea4500-v3: take over the space for user data

The last "syscfg" partition of the OEM firmware turns out to be a
UBIFS used to store user data, just as the "rootfs_data" of OpenWrt,
so it should be reasonable to absorb it into the "ubi" partition.

Factory installations via either OEM firmware or tftp, or by forcibly
flashing factory image to mtd5 (firmware) partition with mtd tool are
confirmed working, but the UBI remaining inside "syscfg" partition
could break upgrade. Fortunately, installing kmod-mtd-rw and erasing
"syscfg" partition before upgrade is confirmed working, in which case,
"ubi" will automatically expand to the blank space once occupied by
the former mtd8 (syscfg), with the total block number increased, but
the UBIFS for rootfs_data will not automatically claim the newly
available space (since it is created when mtd8 still exists, and
sysupgrade does not set "autoresize" flag to rootfs_data). These space
will be claimed during the next upgrade, when rootfs_data is removed
and created again.

Fixes: 50f727b7737d1 ("ath79: add support for Linksys EA4500 v3")
Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/14791
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts
target/linux/ath79/image/nand.mk
target/linux/ath79/nand/base-files/etc/board.d/05_compat-version