From: Piotr Dymacz Date: Mon, 7 Nov 2016 21:40:54 +0000 (+0100) Subject: Add support for ALFA NETWORK Hornet-UB (AR9331 based) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=924b9d2854c36f85081347201a17970491165cae;p=oweals%2Fu-boot_mod.git Add support for ALFA NETWORK Hornet-UB (AR9331 based) This should also work with 16/64 MB version (-64 or x2), models sold with plastic enclosure (AP121{,U,U-64}) and rebranded Gargoyle Pocket Router v2. --- diff --git a/Makefile b/Makefile index 389f9bb..446d60b 100644 --- a/Makefile +++ b/Makefile @@ -217,7 +217,8 @@ COMMON_ETHS27_TARGETS = \ $(COMMON_ETHS27_TARGETS): @$(call build,123,1,ETH_CONFIG=_s27) -8devices_carambola2: +8devices_carambola2 \ +alfa-network_hornet-ub: @$(call build,256,1) comfast_cf-e314n \ diff --git a/README.md b/README.md index 4c58b70..1c176d0 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Currently supported devices: - **Atheros AR9331**: - 8devices Carambola 2 (for version with development board, [photos in my gallery](http://galeria.tech-blog.pl/8devices_Carambola_2/)) + - ALFA NETWORK Hornet-UB/Hornet-UB-64 (aka Hornet-UB x2) - TP-Link TL-MR3020 v1 ([photos in my gallery](http://galeria.tech-blog.pl/TPLINK_TL-MR3020/)) - TP-Link TL-MR3040 v1 and v2 - TP-Link TL-WR703N v1, ([photos in my gallery](http://galeria.tech-blog.pl/TPLINK_TL-WR703N/)) @@ -114,6 +115,7 @@ More information about supported devices: | Model | SoC | FLASH | RAM | U-Boot image | U-Boot env | |:--- | :--- | ---: | ---: | ---: | ---: | | [8devices Carambola 2](http://8devices.com/carambola-2) | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB | 64 KiB, R/W | +| [ALFA NETWORK Hornet-UB](https://wiki.openwrt.org/toh/alfa.network/hornet-ub) | AR9331 | 8/16 MiB | 32/64 MiB DDR1 | 256 KiB | R/W | | [TP-Link TL-MR3020 v1](http://wiki.openwrt.org/toh/tp-link/tl-mr3020) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR3040 v1/2](http://wiki.openwrt.org/toh/tp-link/tl-mr3040) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-WR703N](http://wiki.openwrt.org/toh/tp-link/tl-wr703n) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | diff --git a/READMEPL.md b/READMEPL.md index 6651887..c1e7948 100644 --- a/READMEPL.md +++ b/READMEPL.md @@ -62,6 +62,7 @@ Lista obecnie wspieranych urządzeń: - **Atheros AR9331**: - 8devices Carambola 2 (w wersji z płytką developerską, [zdjęcia w mojej galerii](http://galeria.tech-blog.pl/8devices_Carambola_2/)) + - ALFA NETWORK Hornet-UB/Hornet-UB-64 (aka Hornet-UB x2) - TP-Link TL-MR3020 v1 ([zdjęcia w mojej galerii](http://galeria.tech-blog.pl/TPLINK_TL-MR3020/)) - TP-Link TL-MR3040 v1 i v2 - TP-Link TL-WR703N v1, ([zdjęcia w mojej galerii](http://galeria.tech-blog.pl/TPLINK_TL-WR703N/)) @@ -111,6 +112,7 @@ Dodatkowe informacje o wspieranych urządzeniach: | Model | SoC | FLASH | RAM | Obraz U-Boot | U-Boot env | |:--- | :--- | ---: | ---: | ---: | ---: | | [8devices Carambola 2](http://8devices.com/carambola-2) | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB | 64 KiB, R/W | +| [ALFA NETWORK Hornet-UB](https://wiki.openwrt.org/toh/alfa.network/hornet-ub) | AR9331 | 8/16 MiB | 32/64 MiB DDR1 | 256 KiB | R/W | | [TP-Link TL-MR3020 v1](http://wiki.openwrt.org/toh/tp-link/tl-mr3020) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-MR3040 v1/2](http://wiki.openwrt.org/toh/tp-link/tl-mr3040) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | | [TP-Link TL-WR703N](http://wiki.openwrt.org/toh/tp-link/tl-wr703n) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, LZMA | RO | diff --git a/u-boot/Makefile b/u-boot/Makefile index 585367e..5931af4 100644 --- a/u-boot/Makefile +++ b/u-boot/Makefile @@ -393,6 +393,11 @@ qca953x_common: unconfig config_common @$(call define_add,CONFIG_FOR_8DEVICES_CARAMBOLA2,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 +alfa-network_hornet-ub: ar933x_common + @$(call config_init,ALFA NETWORK Hornet-UB,hornet-ub,8,12,1,QCA_AR933X_SOC) + @$(call define_add,CONFIG_FOR_ALFA_NETWORK_HORNET_UB,1) + @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 + comfast_cf-e314n: qca953x_common @$(call config_init,Comfast CF-E314N,cf-e314n,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_COMFAST_CF_E314N,1) diff --git a/u-boot/include/configs/ap121.h b/u-boot/include/configs/ap121.h index 7bfe379..9581dc4 100644 --- a/u-boot/include/configs/ap121.h +++ b/u-boot/include/configs/ap121.h @@ -31,6 +31,18 @@ #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H CONFIG_QCA_GPIO_MASK_LED_ACT_L #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L CONFIG_QCA_GPIO_MASK_LED_ACT_H +#elif defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) + + #define CONFIG_QCA_GPIO_MASK_LED_ACT_H GPIO0 | GPIO1 | GPIO13 + #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO17 | GPIO27 + #define CONFIG_QCA_GPIO_MASK_OUT GPIO26 | GPIO28 |\ + CONFIG_QCA_GPIO_MASK_LED_ACT_L |\ + CONFIG_QCA_GPIO_MASK_LED_ACT_H + #define CONFIG_QCA_GPIO_MASK_IN GPIO11 | GPIO12 + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_H GPIO26 | GPIO28 |\ + CONFIG_QCA_GPIO_MASK_LED_ACT_L + #define CONFIG_QCA_GPIO_MASK_OUT_INIT_L CONFIG_QCA_GPIO_MASK_LED_ACT_H + #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD) #define CONFIG_QCA_GPIO_MASK_LED_ACT_L GPIO27 @@ -167,6 +179,12 @@ "rootfstype=squashfs init=/sbin/init "\ "mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),16000k(firmware),64k(art)" +#elif defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) + + #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 "\ + "rootfstype=squashfs init=/sbin/init "\ + "mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),6144k(rootfs),1600k(uImage),64k(NVRAM),64k(ART)" + #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD) #define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 "\ @@ -219,7 +237,8 @@ * Load address and boot command * ============================= */ -#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) +#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) #define CFG_LOAD_ADDR 0x9F050000 #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD) #define CFG_LOAD_ADDR 0x9F030000 @@ -232,14 +251,19 @@ #define CFG_LOAD_ADDR 0x9F020000 #endif -#define CONFIG_BOOTCOMMAND "bootm " MK_STR(CFG_LOAD_ADDR) +#if defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) + #define CONFIG_BOOTCOMMAND "bootm 0x9F050000 || bootm 0x9FE50000 || bootm 0x9F650000" +#else + #define CONFIG_BOOTCOMMAND "bootm " MK_STR(CFG_LOAD_ADDR) +#endif /* * ========================= * Environment configuration * ========================= */ -#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) +#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) #define CFG_ENV_ADDR 0x9F040000 #define CFG_ENV_SIZE 0x8000 #define CFG_ENV_SECT_SIZE 0x10000 @@ -278,8 +302,9 @@ * MAC address/es, model and WPS pin offsets in FLASH * ================================================== */ -#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ - defined(CONFIG_FOR_DRAGINO_V2) ||\ +#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) ||\ + defined(CONFIG_FOR_DRAGINO_V2) ||\ defined(CONFIG_FOR_MESH_POTATO_V2) #define OFFSET_MAC_DATA_BLOCK 0xFF0000 #define OFFSET_MAC_DATA_BLOCK_LENGTH 0x010000 @@ -309,12 +334,13 @@ #define OFFSET_MAC_ADDRESS 0x00FC00 #endif -#if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ - !defined(CONFIG_FOR_BLACK_SWIFT_BOARD) &&\ - !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ - !defined(CONFIG_FOR_DRAGINO_V2) &&\ - !defined(CONFIG_FOR_GL_INET) &&\ - !defined(CONFIG_FOR_GS_OOLITE_V1_DEV) &&\ +#if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ + !defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) &&\ + !defined(CONFIG_FOR_BLACK_SWIFT_BOARD) &&\ + !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ + !defined(CONFIG_FOR_DRAGINO_V2) &&\ + !defined(CONFIG_FOR_GL_INET) &&\ + !defined(CONFIG_FOR_GS_OOLITE_V1_DEV) &&\ !defined(CONFIG_FOR_MESH_POTATO_V2) #define OFFSET_ROUTER_MODEL 0xFD00 #endif @@ -371,6 +397,8 @@ /* Firmware size limit */ #if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (384 * 1024) +#elif defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) + #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (448 * 1024) #elif defined(CONFIG_FOR_BLACK_SWIFT_BOARD) #define WEBFAILSAFE_UPLOAD_LIMITED_AREA_IN_BYTES (256 * 1024) #elif defined(CONFIG_FOR_DLINK_DIR505_A1) @@ -391,7 +419,8 @@ */ #define CONFIG_QCA_PLL QCA_PLL_PRESET_400_400_200 -#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) +#if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) ||\ + defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) #define CONFIG_QCA_PLL_IN_FLASH_BLOCK_OFFSET 0x40000 #define CONFIG_QCA_PLL_IN_FLASH_BLOCK_SIZE 0x10000 @@ -420,10 +449,11 @@ * For upgrade scripts in environment * ================================== */ -#if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ - !defined(CONFIG_FOR_BLACK_SWIFT_BOARD) &&\ - !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ - !defined(CONFIG_FOR_DRAGINO_V2) &&\ +#if !defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) &&\ + !defined(CONFIG_FOR_ALFA_NETWORK_HORNET_UB) &&\ + !defined(CONFIG_FOR_BLACK_SWIFT_BOARD) &&\ + !defined(CONFIG_FOR_DLINK_DIR505_A1) &&\ + !defined(CONFIG_FOR_DRAGINO_V2) &&\ !defined(CONFIG_FOR_MESH_POTATO_V2) #define CONFIG_UPG_SCRIPTS_UBOOT_SIZE_BCKP_HEX 0x20000 #endif