[OpenWrt-Devel,2/2] base-files: fix sysupgrade for Netgear WNDR4300
diff mbox series

Message ID 20191011111845.4601ac6b@kosmio.komorska
State Changes Requested
Delegated to: John Crispin
Headers show
Series
  • ath79: add support for Netgear WNDR4300
Related show

Commit Message

Michal Cieslakiewicz Oct. 11, 2019, 9:18 a.m. UTC
This patch provides correct flashing via sysupgrade for Netgear
WNDR4300 router with NAND flash memory. Without this fix
upgrade process is not aware of UBI layer and corrupts volume
data putting router in Firmware Recovery mode.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
---
 target/linux/ath79/base-files/lib/upgrade/platform.sh | 5 +++++
 1 file changed, 5 insertions(+)

Patch
diff mbox series

diff --git a/target/linux/ath79/base-files/lib/upgrade/platform.sh b/target/linux/ath79/base-files/lib/upgrade/platform.sh
index f4fca06384..fb1bf607f8 100644
--- a/target/linux/ath79/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/base-files/lib/upgrade/platform.sh
@@ -2,6 +2,8 @@ 
 # Copyright (C) 2011 OpenWrt.org
 #
 
+. /lib/upgrade/nand.sh
+
 PART_NAME=firmware
 REQUIRE_IMAGE_METADATA=1
 
@@ -51,6 +53,9 @@  platform_do_upgrade() {
 	ubnt,routerstation-pro)
 		redboot_fis_do_upgrade "$1" kernel
 		;;
+	netgear,wndr4300)
+		nand_do_upgrade "$1"
+		;;
 	*)
 		default_do_upgrade "$1"
 		;;