X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Flib%2Far71xx.sh;h=645c5d9a506becf263c72a00770595cc471ec6e2;hb=19ac39e650f4d0a2506d5841babd9978940ce2c8;hp=04fb716c424c631a2af0d456db922aa806bd2f09;hpb=68da941be4f53c088b5d41ec4db79ced01d4b6ac;p=openwrt.git diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 04fb716c42..645c5d9a50 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -37,16 +37,26 @@ wndr3700_board_detect() { machine="NETGEAR WNDR3700" ;; "33373031") - local model - model=$(ar71xx_get_mtd_offset_size_format art 56 10 %c) - if [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' ]; then - machine="NETGEAR WNDR3700v2" - elif [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN' ]; then - machine="NETGEAR WNDRMAC" - else + # 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}')" + case $model in + $'\xff'*) + if [ "${model:24:1}" = 'N' ]; then + machine="NETGEAR WNDRMAC" + else + machine="NETGEAR WNDR3700v2" + fi + ;; + '29763654+16+64'*) + machine="NETGEAR ${model:14}" + ;; + '29763654+16+128'*) + machine="NETGEAR ${model:15}" + ;; + *) + # Unknown ID machine="NETGEAR $model" - fi - ;; + esac esac AR71XX_BOARD_NAME="$name" @@ -512,6 +522,9 @@ ar71xx_board_detect() { *OM5P) name="om5p" ;; + *"OM5P AN") + name="om5p-an" + ;; *PB42) name="pb42" ;; @@ -569,6 +582,9 @@ ar71xx_board_detect() { *"RouterBOARD 911G-5HPnD") name="rb-911g-5hpnd" ;; + *"RouterBOARD 911G-5HPacD") + name="rb-911g-5hpacd" + ;; *"RouterBOARD 912UAG-2HPnD") name="rb-912uag-2hpnd" ;; @@ -605,6 +621,9 @@ ar71xx_board_detect() { *"Rocket M") name="rocket-m" ;; + *"Rocket M XW") + name="rocket-m-xw" + ;; *RouterStation) name="routerstation" ;; @@ -785,6 +804,9 @@ ar71xx_board_detect() { *WPE72) name="wpe72" ;; + *WPJ344) + name="wpj344" + ;; *WPJ558) name="wpj558" ;;