[ar71xx] enable sysupgrade on the WRT160Nl
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / base-files / lib / upgrade / platform.sh
index 381b40e322a08c73d52de944cc12e083e26ff7e2..c4c56afdd0ef8b8bc47e007a8717f95b8b5f7493 100755 (executable)
@@ -5,6 +5,7 @@
 . /lib/ar71xx.sh
 
 PART_NAME=firmware
+RAMFS_COPY_DATA=/lib/ar71xx.sh
 
 platform_check_image() {
        local board=$(ar71xx_board_name)
@@ -20,13 +21,20 @@ platform_check_image() {
                }
                return 0
                ;;
-        tl-wr741nd | tl-wr941nd)
+       tl-wr741nd | tl-wr941nd)
                [ "$magic" != "0100" ] && {
                        echo "Invalid image type."
                        return 1
                }
                return 0
                ;;
+       wrt160nl)
+               [ "$magic" != "4e4c" ] && {
+                       echo "Invalid image type."
+                       return 1
+               }
+               return 0
+               ;;
        esac
 
        echo "Sysupgrade is not yet supported on $board."
@@ -42,4 +50,5 @@ disable_watchdog() {
                return 1
        }
 }
+
 append sysupgrade_pre_upgrade disable_watchdog