Add support for Hak5 WiFi Pineapple NANO (AR9331 based)
authorPiotr Dymacz <pepe2k@gmail.com>
Tue, 20 Feb 2018 20:06:51 +0000 (21:06 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Thu, 22 Feb 2018 14:13:53 +0000 (15:13 +0100)
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Makefile
README.md
u-boot/Makefile
u-boot/include/configs/ap121.h

index 928daf85f08d0b19807c8118e9caaa8ec9d4285a..51d49c126015d1e0bf973276658683c2f9392621 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -210,6 +210,7 @@ endef
 COMMON_AR933X_TARGETS = \
        gainstrong_oolite_v1_dev \
        gl-inet_6416 \
+       hak5_wifi-pineapple-nano \
        tp-link_tl-mr10u_v1 \
        tp-link_tl-mr13u_v1 \
        tp-link_tl-mr3020_v1 \
index 61c107031a12d676c937dcf89af8757232442bea..d8044db2b5b6b5a5b992b0d145ed385f9691cd5b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -73,6 +73,7 @@ Currently supported devices:
   - GL.iNet GL-AR150
   - GL.iNet GL-USB150
   - GS-Oolite/Elink EL-M150 module with dev board ([photos in my gallery](http://galeria.tech-blog.pl/Elink_EL-M150_Development-Board/))
+  - Hak5 WiFi Pineapple NANO
   - TP-Link TL-MR10U v1 ([photos in my gallery](http://galeria.tech-blog.pl/TP-Link_TL-MR10U/))
   - TP-Link TL-MR13U v1
   - TP-Link TL-MR3020 v1 ([photos in my gallery](http://galeria.tech-blog.pl/TPLINK_TL-MR3020/))
@@ -158,6 +159,7 @@ More information about supported devices:
 | GL.iNet GL-AR750 | QCA9531 | 16 MiB | 128 MiB DDR2 | 256 KiB | R/W |
 | GL.iNet GL-USB150 | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
 | GS-Oolite/Elink EL-M150 module | AR9331 | 4/8/16 MiB | 64 MiB DDR2 | 64 KiB, LZMA | RO |
+| Hak5 WiFi Pineapple NANO | AR9331 | 16 MiB | 64 MiB DDR2 | 128 KiB | R/W |
 | P&W CPE505N | QCA9531 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
 | P&W R602N | QCA9531 | 16 MiB | 64 MiB DDR2 | 256 KiB | R/W |
 | [TP-Link TL-MR10U v1](http://wiki.openwrt.org/toh/tp-link/tl-mr10u) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO |
index 5f584ee127adae96d7a1c603b4f90429ad1c500f..1b3cbe125fd774fd2a1b53da35ce12ecea3dc091 100644 (file)
@@ -521,6 +521,11 @@ gl-inet_gl-usb150: ar933x_common
        @$(call define_add,CONFIG_FOR_GLINET_GL_USB150,1)
        @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
 
+hak5_wifi-pineapple-nano: ar933x_common
+       @$(call config_init,Hak5 WiFi Pineapple NANO,wifi-pineapple-nano,16,12,1,QCA_AR9331_SOC)
+       @$(call define_add,CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO,1)
+       @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
+
 p2w_cpe505n: qca953x_common
        @$(call config_init,P&W CPE505N,cpe505n,16,17,1,QCA_QCA9531_SOC)
        @$(call define_add,CONFIG_FOR_P2W_CPE505N,1)
index 4677181f331681d7fbae04a6beea9b281c965ebe..ae840d13d9f8ac1224999dbe13aec5f19e3b2655 100644 (file)
        #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO13 | GPIO15 | GPIO17 |\
                                                GPIO27
 
+#elif defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO)
+
+       #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO18
+       #define CONFIG_QCA_GPIO_MASK_IN         GPIO19 | GPIO20
+       #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L GPIO23
+
 #elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
 
        #define CONFIG_QCA_GPIO_MASK_LED_ACT_L  GPIO27
                                "rootfstype=squashfs init=/sbin/init "\
                                "mtdparts=ar7240-nor0:192k(u-boot),64k(u-boot-env),16064k(firmware),64k(art)"
 
-#elif defined(CONFIG_FOR_GLINET_6416)        ||\
-      defined(CONFIG_FOR_TPLINK_MR10U_V1)    ||\
-      defined(CONFIG_FOR_TPLINK_MR13U_V1)    ||\
-      defined(CONFIG_FOR_TPLINK_MR3020_V1)   ||\
-      defined(CONFIG_FOR_TPLINK_MR3040_V1V2) ||\
-      defined(CONFIG_FOR_TPLINK_MR3220_V2)   ||\
-      defined(CONFIG_FOR_TPLINK_WR703N_V1)   ||\
-      defined(CONFIG_FOR_TPLINK_WR720N_V3)   ||\
+#elif defined(CONFIG_FOR_GLINET_6416)              ||\
+      defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO) ||\
+      defined(CONFIG_FOR_TPLINK_MR10U_V1)          ||\
+      defined(CONFIG_FOR_TPLINK_MR13U_V1)          ||\
+      defined(CONFIG_FOR_TPLINK_MR3020_V1)         ||\
+      defined(CONFIG_FOR_TPLINK_MR3040_V1V2)       ||\
+      defined(CONFIG_FOR_TPLINK_MR3220_V2)         ||\
+      defined(CONFIG_FOR_TPLINK_WR703N_V1)         ||\
+      defined(CONFIG_FOR_TPLINK_WR720N_V3)         ||\
       defined(CONFIG_FOR_TPLINK_WR740N_V4)
 
        #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 "\
        #define OFFSET_MAC_DATA_BLOCK_LENGTH    0x010000
        #define OFFSET_MAC_ADDRESS              0x00FC00
 
+#elif defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO)
+
+       #define OFFSET_MAC_DATA_BLOCK           0xFF0000
+       #define OFFSET_MAC_DATA_BLOCK_LENGTH    0x010000
+       #define OFFSET_MAC_ADDRESS              0x000006
+
 #else
 
        #define OFFSET_MAC_DATA_BLOCK           0x010000
     !defined(CONFIG_FOR_GLINET_GL_AR150)             &&\
     !defined(CONFIG_FOR_GLINET_GL_USB150)            &&\
     !defined(CONFIG_FOR_GS_OOLITE_V1_DEV)            &&\
+    !defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO)    &&\
     !defined(CONFIG_FOR_UNWIRED_DEVICES_UNWIRED_ONE) &&\
     !defined(CONFIG_FOR_VILLAGE_TELCO_MP2)
 
     !defined(CONFIG_FOR_DRAGINO_MS14)                &&\
     !defined(CONFIG_FOR_GLINET_GL_AR150)             &&\
     !defined(CONFIG_FOR_GLINET_GL_USB150)            &&\
+    !defined(CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO)    &&\
     !defined(CONFIG_FOR_UNWIRED_DEVICES_UNWIRED_ONE) &&\
     !defined(CONFIG_FOR_VILLAGE_TELCO_MP2)