Browse Source

fix sysupgrade for the Netgear WNR854T (#7484)

SVN-Revision: 21833
Jo-Philipp Wich 15 năm trước cách đây
mục cha
commit
c32b99c0bd

+ 9 - 1
target/linux/orion/base-files/lib/upgrade/platform.sh

@@ -9,13 +9,21 @@ platform_check_image() {
 
 
 	case "${hardware}" in
 	case "${hardware}" in
 	 # hardware with padded uImage + padded rootfs
 	 # hardware with padded uImage + padded rootfs
-	 'Netgear WNR854T' | 'Linksys WRT350N v2')
+	 'Linksys WRT350N v2')
 		[ "${magic}" != '2705' ] && {
 		[ "${magic}" != '2705' ] && {
 			echo "Invalid image type ${magic}."
 			echo "Invalid image type ${magic}."
 			return 1
 			return 1
 		}
 		}
 		return 0
 		return 0
 		;;
 		;;
+	 # Netgear WNR854T has extra header before uImage
+	 'Netgear WNR854T')
+		[ "${magic}" != '8519' ] && {
+			echo "Invalid image type ${magic}."
+			return 1
+		}
+		return 0
+		;;
 	esac
 	esac
 
 
 	echo "Sysupgrade is not yet supported on ${hardware}."
 	echo "Sysupgrade is not yet supported on ${hardware}."