ar71xx: add support for hornet-ub-x2
authorLuka Perkov <luka@openwrt.org>
Thu, 15 Aug 2013 00:57:47 +0000 (00:57 +0000)
committerLuka Perkov <luka@openwrt.org>
Thu, 15 Aug 2013 00:57:47 +0000 (00:57 +0000)
The hornet-ub-x2 is hornet-ub variant with double more flash and ram.

Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 37788

target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/base-files/lib/upgrade/platform.sh
target/linux/ar71xx/generic/profiles/alfa.mk
target/linux/ar71xx/image/Makefile

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"
index 1b3273d19f165903bf2deb2e64b9a7a5f12ac1ef..8294fa43c8ef9e8bb2ee1213e0fdc6f8362ec98d 100755 (executable)
@@ -113,6 +113,7 @@ platform_check_image() {
        dir-835-a1 | \
        ew-dorin | \
        ew-dorin-router | \
+       hornet-ub-x2 | \
        mzk-w04nu | \
        mzk-w300nh | \
        tew-632brp | \
index 06baf240c21b44455ab82f0dcc8cf83771e1c981..97c843ace1bf1400041e36a44cfe44e325b32163 100644 (file)
@@ -1,12 +1,12 @@
 #
-# Copyright (C) 2011 OpenWrt.org
+# Copyright (C) 2011-2013 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 
 define Profile/ALFAAP96
-       NAME:=ALFA Network AP96  board
+       NAME:=ALFA Network AP96 board
        PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-rtc-pcf2123
 endef
 
@@ -18,17 +18,31 @@ $(eval $(call Profile,ALFAAP96))
 
 
 define Profile/HORNETUB
-       NAME:=ALFA Network Hornet-UB board
+       NAME:=ALFA Network Hornet-UB board (8MB flash, 32MB ram)
        PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
 endef
 
 define Profile/HORNETUB/Description
-       Package set optimized for the ALFA Network Hornet-UB board.
+       Package set optimized for the ALFA Network Hornet-UB board with 8MB
+       flash and 32MB ram.
 endef
 
 $(eval $(call Profile,HORNETUB))
 
 
+define Profile/HORNETUBx2
+       NAME:=ALFA Network Hornet-UB-x2 board (16MB flash, 64MB ram)
+       PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
+endef
+
+define Profile/HORNETUBx2/Description
+       Package set optimized for the ALFA Network Hornet-UB board with 16MB
+       flash and 64MB ram.
+endef
+
+$(eval $(call Profile,HORNETUBx2))
+
+
 define Profile/ALFANX
        NAME:=ALFA Network N2/N5 board
        PACKAGES:=
@@ -39,4 +53,3 @@ define Profile/ALFANX/Description
 endef
 
 $(eval $(call Profile,ALFANX))
-
index 90f0ef1496ebbf57d62e52f3af1f82834d54d932..f5650c9afe265948f6e9c8608a7662045d7f82ad 100644 (file)
@@ -151,6 +151,7 @@ endef
 
 alfa_ap96_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13312k(rootfs),2048k(kernel),512k(caldata)ro,15360k@0x80000(firmware)
 alfa_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
+alfa_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15936k(firmware),64k(nvram),64k(art)ro
 all0258n_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),6272k(firmware),1536k(failsafe),64k(art)
 all0315n_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env),13568k(firmware),2048k(failsafe),256k(art)ro
 ap96_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1728k(kernel),64k(art)ro,7872k@0x40000(firmware)
@@ -894,6 +895,7 @@ $(eval $(call SingleProfile,AthLzma,$(fs_64k),CAP4200AG,cap4200ag,CAP4200AG,ttyS
 $(eval $(call SingleProfile,AthLzma,$(fs_64k),DB120,db120,DB120,ttyS0,115200,$$(db120_mtdlayout),1441792,6488064,RKuImage))
 $(eval $(call SingleProfile,AthLzma,$(fs_64k),EWDORINAP,ew-dorin,EW-DORIN,ttyATH0,115200,$$(ew-dorin_mtdlayout_4M),65536,2752512,KRuImage))
 $(eval $(call SingleProfile,AthLzma,$(fs_64k),EWDORINRT,ew-dorin-router,EW-DORIN-ROUTER,ttyATH0,115200,$$(ew-dorin_mtdlayout_4M),65536,2752512,KRuImage))
+$(eval $(call SingleProfile,AthLzma,$(fs_64k),HORNETUBx2,hornet-ub-x2,HORNET-UB,ttyATH0,115200,$$(alfa_mtdlayout_16M),65536,16318464,KRuImage))
 $(eval $(call SingleProfile,AthLzma,$(fs_64k),PB92,pb92,PB92,ttyS0,115200,$$(pb92_mtdlayout),917504,2818048,KRuImage))
 
 $(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR600A1,dir-600-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-00"))