[ramips] add Huawei D105
[openwrt.git] / target / linux / ramips / base-files / lib / ramips.sh
index 4b3e362..4948e5b 100755 (executable)
@@ -6,6 +6,19 @@
 RAMIPS_BOARD_NAME=
 RAMIPS_MODEL=
 
+all500x_board_detect() {
+       local systype
+
+       systype=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /system type/ {print $2}' /proc/cpuinfo)
+       case "$systype" in
+       *"RT5350"*)
+               RAMIPS_MODEL="Allnet ALL5003"
+               ;;
+       *"RT3352"*)
+               RAMIPS_MODEL="Allnet ALL5002"
+               ;;
+       esac
+}
 
 ramips_board_detect() {
        local machine
@@ -20,6 +33,9 @@ ramips_board_detect() {
        *"Edimax 3g-6200n")
                name="3g-6200n"
                ;;
+       *"Edimax 3g-6200nl")
+               name="3g-6200nl"
+               ;;
        *"AirLive Air3GII")
                name="air3gii"
                ;;
@@ -89,6 +105,9 @@ ramips_board_detect() {
        *"Hauppauge Broadway")
                name="broadway"
                ;;
+       *"Huawei D105")
+               name="d105"
+               ;;
        *"La Fonera 2.0N")
                name="fonera20n"
                ;;
@@ -179,6 +198,9 @@ ramips_board_detect() {
        *"WR512-3GN-like router")
                name="wr512-3gn"
                ;;
+       *"UR-326N4G Wireless N router")
+               name="ur-326n4g"
+               ;;
        *"UR-336UN Wireless N router")
                name="ur-336un"
                ;;
@@ -193,6 +215,12 @@ ramips_board_detect() {
                ;;
        esac
 
+       case "$machine" in
+       *"Allnet ALL5002/ALL5003")
+               all500x_board_detect
+               ;;
+       esac
+
        [ -z "$RAMIPS_BOARD_NAME" ] && RAMIPS_BOARD_NAME="$name"
        [ -z "$RAMIPS_MODEL" ] && RAMIPS_MODEL="$machine"