ar71xx: add support for hornet-ub-x2
[openwrt/staging/wigyori.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
index 1554a51e95d7b2f1b01ce4d5132d7fd26b6b9e3d..e7fbfbe58a6800dc96da82610625305f573b8013 100755 (executable)
@@ -280,7 +280,16 @@ ar71xx_board_detect() {
                name="jwap003"
                ;;
        *"Hornet-UB")
-               name="hornet-ub"
+               local size
+               size=$(awk '/firmware/ { print $2 }' /proc/mtd)
+
+               if [ "x$size" = "x00790000" ]; then
+                       name="hornet-ub"
+               fi
+
+               if [ "x$size" = "x00f90000" ]; then
+                       name="hornet-ub-x2"
+               fi
                ;;
        *LS-SR71)
                name="ls-sr71"