diff mbox

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

Message ID 20150810153011.F2FF723A1534@danielcent.thecshore.com
State Rejected
Headers show

Commit Message

Daniel Dickinson Aug. 2, 2015, 7:58 a.m. UTC
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@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(-)

Comments

John Crispin Sept. 16, 2015, 7:02 a.m. UTC | #1
On 02/08/2015 09:58, Daniel Dickinson wrote:
> 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.
> 

looking at the code i believe this is not needed. i marked the patch as
rejected

	John


> Signed-off-by: Daniel Dickinson <openwrt@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@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
diff mbox

Patch

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