aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/nand
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@qq.com>2023-07-09 22:10:54 +0800
committerDavid Bauer <mail@david-bauer.net>2023-08-24 20:45:12 +0200
commitd792d20832ee160563ce23b49edd6f149db10a35 (patch)
tree074eeafeda6f165e5832dc7e9aebdf7aaa305d9b /target/linux/ath79/nand
parent7eda621404627ea244f770b36c20c71ff942e7cf (diff)
downloadupstream-d792d20832ee160563ce23b49edd6f149db10a35.tar.gz
upstream-d792d20832ee160563ce23b49edd6f149db10a35.tar.bz2
upstream-d792d20832ee160563ce23b49edd6f149db10a35.zip
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)
Diffstat (limited to 'target/linux/ath79/nand')
-rw-r--r--target/linux/ath79/nand/base-files/etc/board.d/05_compat-version15
1 files changed, 15 insertions, 0 deletions
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
new file mode 100644
index 0000000000..238927aa7b
--- /dev/null
+++ b/target/linux/ath79/nand/base-files/etc/board.d/05_compat-version
@@ -0,0 +1,15 @@
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+ netgear,wndr4300-v2|\
+ netgear,wndr4500-v3)
+ ucidef_set_compat_version "1.1"
+ ;;
+esac
+
+board_config_flush
+
+exit 0