ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2
[15.05/openwrt.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
index f0c9ae1..af92b01 100755 (executable)
@@ -38,7 +38,7 @@ wndr3700_board_detect() {
                ;;
        "33373031")
                # Use awk to remove everything after the first zero byte
-               model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')"
+               model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')"
                case $model in
                $'\xff'*)
                        if [ "${model:24:1}" = 'N' ]; then
@@ -107,11 +107,11 @@ tplink_board_detect() {
        "015300"*)
                model="EasyLink EL-MINI"
                ;;
-       "04440001"*)
-               model="BITMAIN ANTMINER S1"
+       "044401"*)
+               model="ANTMINER-S1"
                ;;
-       "04440003"*)
-               model="BITMAIN ANTMINER S3"
+       "044403"*)
+               model="ANTMINER-S3"
                ;;
        "120000"*)
                model="MERCURY MAC1200R"
@@ -119,6 +119,9 @@ tplink_board_detect() {
        "3C0001"*)
                model="OOLITE"
                ;;
+       "3C0002"*)
+               model="MINIBOX_V1"
+               ;;
        "070300"*)
                model="TP-Link TL-WR703N"
                ;;
@@ -341,6 +344,12 @@ ar71xx_board_detect() {
        *ALL0315N)
                name="all0315n"
                ;;
+       *Antminer-S1)
+               name="antminer-s1"
+               ;;
+       *Antminer-S3)
+               name="antminer-s3"
+               ;;
        *AP113)
                name="ap113"
                ;;
@@ -493,6 +502,9 @@ ar71xx_board_detect() {
        *"MAC1200R")
                name="mc-mac1200r"
                ;;
+       *"MiniBox V1.0")
+               name="minibox-v1"
+               ;;
        *MR12)
                name="mr12"
                ;;