summaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorEdward Chow <equu@openmail.cc>2024-03-05 01:24:10 +0800
committerRobert Marko <robimarko@gmail.com>2024-11-07 14:56:39 +0100
commit6691ff86b70a44ea6683aad85a0fc76fd03417b8 (patch)
tree3e97c8a162fe2e055211aa56c84abc393c0d1c83 /target/linux
parente29bc67f9d8451d3baf80da9358b3a01dc4b20b7 (diff)
downloadopenwrt-6691ff86b70a44ea6683aad85a0fc76fd03417b8.tar.gz
openwrt-6691ff86b70a44ea6683aad85a0fc76fd03417b8.tar.bz2
openwrt-6691ff86b70a44ea6683aad85a0fc76fd03417b8.zip
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>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts10
-rw-r--r--target/linux/ath79/image/nand.mk8
-rw-r--r--target/linux/ath79/nand/base-files/etc/board.d/05_compat-version1
3 files changed, 13 insertions, 6 deletions
diff --git a/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts b/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts
index 6c799efe33..1da46d7214 100644
--- a/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts
+++ b/target/linux/ath79/dts/qca9558_linksys_ea4500-v3.dts
@@ -123,7 +123,7 @@
partition@2c0000 {
label = "firmware";
- reg = <0x2c0000 0x5000000>;
+ reg = <0x2c0000 0x7d40000>;
compatible = "fixed-partitions";
#address-cells = <1>;
@@ -136,7 +136,7 @@
partition@400000 {
label = "ubi";
- reg = <0x400000 0x4c00000>;
+ reg = <0x400000 0x7940000>;
};
/* Original layout for secondary partitions */
@@ -151,11 +151,11 @@
}; */
};
- partition@52c0000 {
+ /* Original layout for user data partition */
+ /* partition@52c0000 {
label = "syscfg";
reg = <0x52c0000 0x2d40000>;
- read-only;
- };
+ }; */
};
};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index a3bdedaf6d..d3c1120aa2 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -281,6 +281,12 @@ TARGET_DEVICES += glinet_gl-x1200-nor
define Device/linksys_ea4500-v3
SOC := qca9558
+ DEVICE_COMPAT_VERSION := 1.1
+ DEVICE_COMPAT_MESSAGE := Partition table has been changed. Please \
+ install kmod-mtd-rw and erase mtd8 (syscfg) before upgrade \
+ to keep configures, or forcibly flash factory image to mtd5 \
+ (firmware) partition with mtd tool to discard configures but \
+ claim additional space immediately.
DEVICE_VENDOR := Linksys
DEVICE_MODEL := EA4500
DEVICE_VARIANT := v3
@@ -288,7 +294,7 @@ define Device/linksys_ea4500-v3
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
- IMAGE_SIZE := 81920k
+ IMAGE_SIZE := 128256k
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
LINKSYS_HWNAME := EA4500V3
IMAGES += factory.img
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version b/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version
index 238927aa7b..4d826d978d 100644
--- a/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version
+++ b/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version
@@ -4,6 +4,7 @@
board_config_update
case "$(board_name)" in
+ linksys,ea4500-v3|\
netgear,wndr4300-v2|\
netgear,wndr4500-v3)
ucidef_set_compat_version "1.1"