ramips: add support for Tenda 3G150B
[openwrt/staging/yousong.git] / target / linux / ramips / base-files / lib / upgrade / platform.sh
index 61a0935d7ece49f6f44ec119ba835bafa1fd556f..0dfdf9de86163b181600d84a5b02868567d09ce1 100755 (executable)
@@ -16,8 +16,11 @@ platform_check_image() {
        case "$board" in
        3g-6200n | \
        3g-6200nl | \
+       3g150b | \
        3g300m | \
+       a5-v11 | \
        air3gii | \
+       ai-br100 |\
        all0239-3g | \
        all0256n | \
        all5002 | \
@@ -43,18 +46,22 @@ platform_check_image() {
        dir-620-a1 | \
        dir-620-d1 | \
        dir-810l | \
+       e1700 | \
        esr-9753 | \
        f7c027 | \
        fonera20n | \
        freestation5 | \
+       firewrt |\
        hg255d | \
        hlk-rm04 | \
        ht-tm02 | \
        hw550-3g | \
        ip2202 | \
+       m2m | \
        m3 | \
        m4 | \
        mlw221 | \
+       mlwg2 | \
        mofi3500-3gn | \
        mpr-a1 | \
        mpr-a2 | \
@@ -85,6 +92,9 @@ platform_check_image() {
        w306r-v20 |\
        w502u |\
        whr-g300n |\
+       whr-600d |\
+       whr-1166d |\
+       wsr-600 |\
        wl-330n | \
        wl-330n3g | \
        wl-351 | \
@@ -97,6 +107,7 @@ platform_check_image() {
        wr8305rt |\
        wrtnode |\
        wt1520 |\
+       wt3020 |\
        x5 |\
        x8 |\
        y1 |\
@@ -108,9 +119,24 @@ platform_check_image() {
                }
                return 0
                ;;
+       wsr-1166)
+               [ "$magic" != "48445230" ] && {
+                       echo "Invalid image type."
+                       return 1
+               }
+               return 0
+               ;;
+       ar670w)
+               [ "$magic" != "6d000080" ] && {
+                       echo "Invalid image type."
+                       return 1
+               }
+               return 0
+               ;;
        cy-swr1100 |\
        dir-610-a1 |\
-       dir-645)
+       dir-645 |\
+       dir-860l-b1)
                [ "$magic" != "5ea3a417" ] && {
                        echo "Invalid image type."
                        return 1
@@ -124,6 +150,13 @@ platform_check_image() {
                }
                return 0
                ;;
+       c20i)
+               [ "$magic" != "03000000" ] && {
+                       echo "Invalid image type."
+                       return 1
+               }
+               return 0
+               ;;
        esac
 
        echo "Sysupgrade is not yet supported on $board."