[OpenWrt-Devel] [PATCH 1/1] sysupgrade, wndr3700/wndr3800: Add allnet safety check

Daniel Dickinson openwrt at daniel.thecshore.com
Sun Aug 2 03:58:17 EDT 2015


This patch may not actually be necessary, but adds the allnet
uboot-envtools safety checks before allow a firmware upgrade to
and Netgear WNDR3700/3800 device.

Note that the Netgear devices already have a hardware id check so
this may be superfulous.

Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 5 ++++-
 target/linux/ar71xx/generic/profiles/netgear.mk        | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index bc53040..5241752 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -400,7 +400,10 @@ platform_check_image() {
 		}
 		return 0
 		;;
-	wndr3700 | \
+	wndr3700)
+		# Use the new ubootenvtools safety check
+		platform_check_image_allnet "$1" || return 1
+		# Fall through to common wnndr/wnr hardware check
 	wnr2000-v3 | \
 	wnr612-v2 | \
 	wnr1000-v2)
diff --git a/target/linux/ar71xx/generic/profiles/netgear.mk b/target/linux/ar71xx/generic/profiles/netgear.mk
index 16b1087..34067c6 100644
--- a/target/linux/ar71xx/generic/profiles/netgear.mk
+++ b/target/linux/ar71xx/generic/profiles/netgear.mk
@@ -18,7 +18,7 @@ $(eval $(call Profile,WNDAP360))
 
 define Profile/WNDR3700
 	NAME:=NETGEAR WNDR3700/WNDR3800/WNDRMAC
-	PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev kmod-leds-wndr3700-usb
+	PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev kmod-leds-wndr3700-usb uboot-envtools
 endef
 
 define Profile/WNDR3700/Description
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list