base-files: unify get_dt_led helper function
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / lib / ipq806x.sh
index 2790f3f38651d1783f37bd51bfbf304189fe40a1..c4d2c8f25865d74321ecad706c301d59f779585c 100644 (file)
@@ -14,12 +14,42 @@ ipq806x_board_detect() {
        machine=$(cat /proc/device-tree/model)
 
        case "$machine" in
+       *"AP-DK01.1-C1")
+               name="ap-dk01.1-c1"
+               ;;
        *"AP148")
                name="ap148"
                ;;
+       *"4040")
+               name="fritz4040"
+               ;;
+       *"C2600")
+               name="c2600"
+               ;;
+       *"D7800")
+               name="d7800"
+               ;;
        *"DB149")
                name="db149"
                ;;
+       *"NBG6817")
+               name="nbg6817"
+               ;;
+       *"R7500")
+               name="r7500"
+               ;;
+       *"R7500v2")
+               name="r7500v2"
+               ;;
+       *"Linksys EA8500"*)
+               name="ea8500"
+               ;;
+       *"R7800")
+               name="r7800"
+               ;;
+       *"VR2600v")
+               name="vr2600v"
+               ;;
        esac
 
        [ -z "$name" ] && name="unknown"
@@ -32,12 +62,3 @@ ipq806x_board_detect() {
        echo "$IPQ806X_BOARD_NAME" > /tmp/sysinfo/board_name
        echo "$IPQ806X_MODEL" > /tmp/sysinfo/model
 }
-
-ipq806x_board_name() {
-       local name
-
-       [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
-       [ -z "$name" ] && name="unknown"
-
-       echo "$name"
-}