ath79: fix first reboot issue on Netgear WNDR4300 v2 and WNDR4500 v3

From the Netgear u-boot GPL code[1]. Bootloader always unconditionally
marks block 768, 1020 - 1023 as bad blocks on each boot. This may lead
to conflicts with the OpenWrt nand driver since these blocks may be good
blocks. In this case, U-boot will override the oob of these blocks so
that break the ubi volume. The system will be damaged after first reboot.
To avoid this issue, manually skip these blocks by using "mtd-concat".

[1] https://www.downloads.netgear.com/files/GPL/EX7300v2series-V1.0.0.146_gpl_src.tar.bz2.zip

Fixes: https://github.com/openwrt/openwrt/issues/8878
Tested-by: Yousaf <yousaf465@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit 12f53724c6575245cf8b2f0dc75d1b9b2e4fe488)
This commit is contained in:
Shiji Yang
2023-07-09 22:10:54 +08:00
committed by David Bauer
parent 7eda621404
commit d792d20832
3 changed files with 50 additions and 3 deletions

View File

@@ -373,6 +373,9 @@ TARGET_DEVICES += netgear_wndr4300tn
define Device/netgear_wndr4300-v2
SOC := qca9563
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Partition table has been changed to fix the \
first reboot issue. Please reflash factory image with nmrp or tftp.
DEVICE_MODEL := WNDR4300
DEVICE_VARIANT := v2
UIMAGE_MAGIC := 0x27051956
@@ -384,6 +387,9 @@ TARGET_DEVICES += netgear_wndr4300-v2
define Device/netgear_wndr4500-v3
SOC := qca9563
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Partition table has been changed to fix the \
first reboot issue. Please reflash factory image with nmrp or tftp.
DEVICE_MODEL := WNDR4500
DEVICE_VARIANT := v3
UIMAGE_MAGIC := 0x27051956