ar71xx: another fix to wndr3700_board_detect
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
index 5af7adf1afa9ff0434079f0f49dc1d2c1350d231..678482eb156b77a7ea0a7aa5d8d3c698760da53b 100755 (executable)
@@ -39,7 +39,7 @@ wndr3700_board_detect() {
        "33373031")
                model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c)"
                # Use awk to remove everything unprintable
-               model_stripped="$(echo -n "$model" | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')"
+               model_stripped="$(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
@@ -114,6 +114,9 @@ tplink_board_detect() {
        "044403"*)
                model="ANTMINER-S3"
                ;;
+       "44440101"*)
+               model="ANTROUTER-R1"
+               ;;
        "120000"*)
                model="MERCURY MAC1200R"
                ;;
@@ -411,6 +414,12 @@ ar71xx_board_detect() {
        *AW-NR580)
                name="aw-nr580"
                ;;
+       *CAP324)
+               name="cap324"
+               ;;
+       *C-55)
+               name="c-55"
+               ;;
        *CAP4200AG)
                name="cap4200ag"
                ;;
@@ -421,6 +430,12 @@ ar71xx_board_detect() {
                name="cpe510"
                tplink_pharos_board_detect
                ;;
+       *CR3000)
+               name="cr3000"
+               ;;
+       *CR5000)
+               name="cr5000"
+               ;;
        *"DB120 reference board")
                name="db120"
                ;;