@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size
-
+tplink_mr13u: export UBOOT_FILE_NAME=uboot_for_tp-link_tl-mr13u
+tplink_mr13u: export MAX_UBOOT_SIZE=64
+tplink_mr13u: export COMPRESSED_UBOOT=1
+tplink_mr13u:
+ @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) mr13u_config
+ @cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
+ @cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
+ @make show_size
tplink_wr740n_v4: export UBOOT_FILE_NAME=uboot_for_tp-link_tl-wr740n_v4
tplink_wr740n_v4: export MAX_UBOOT_SIZE=64
tplink_wr740n_v4: export COMPRESSED_UBOOT=1
@./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
+mr13u_config : unconfig hornet_common_config
+ @echo '======= Configuring for TP-Link TL-MR13U at:' `date` '======='
+ @echo "#define CONFIG_FOR_TPLINK_MR13U_V1 1" >> include/config.h
+ @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
+ @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
+ @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
+ @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
+ @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR13U\"" >> include/config.h
+
+ @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
+
+
wr740n_v4_config : unconfig hornet_common_config
@echo '======= Configuring for TP-Link TL-WR740N v4 at:' `date` '======='
@echo "#define CONFIG_FOR_TPLINK_WR740N_V4 1" >> include/config.h
gpio ^= 1 << GPIO_SYS_LED_BIT;
#elif defined(CONFIG_FOR_TPLINK_MR3040_V1V2)
gpio ^= 1 << GPIO_INTERNET_LED_BIT;
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
gpio ^= 1 << GPIO_SYS_LED_BIT;
#elif defined(CONFIG_FOR_TPLINK_WR740N_V4) || defined(CONFIG_FOR_TPLINK_MR3220_V2)
gpio ^= 1 << GPIO_SYS_LED_BIT;
SETBITVAL(gpio, GPIO_INTERNET_LED_BIT, GPIO_INTERNET_LED_ON);
SETBITVAL(gpio, GPIO_WLAN_LED_BIT, GPIO_WLAN_LED_ON);
SETBITVAL(gpio, GPIO_ETH_LED_BIT, GPIO_ETH_LED_ON);
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
SETBITVAL(gpio, GPIO_SYS_LED_BIT, GPIO_SYS_LED_ON);
#elif defined(CONFIG_FOR_TPLINK_WR740N_V4) || defined(CONFIG_FOR_TPLINK_MR3220_V2)
SETBITVAL(gpio, GPIO_SYS_LED_BIT, GPIO_SYS_LED_ON);
SETBITVAL(gpio, GPIO_INTERNET_LED_BIT, !GPIO_INTERNET_LED_ON);
SETBITVAL(gpio, GPIO_WLAN_LED_BIT, !GPIO_WLAN_LED_ON);
SETBITVAL(gpio, GPIO_ETH_LED_BIT, !GPIO_ETH_LED_ON);
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
SETBITVAL(gpio, GPIO_SYS_LED_BIT, !GPIO_SYS_LED_ON);
#elif defined(CONFIG_FOR_TPLINK_WR740N_V4) || defined(CONFIG_FOR_TPLINK_MR3220_V2)
SETBITVAL(gpio, GPIO_SYS_LED_BIT, !GPIO_SYS_LED_ON);
/* Disable clock obs, added by zcf, 20110509 */
//ar7240_reg_wr (AR7240_GPIO_FUNC, (ar7240_reg_rd(AR7240_GPIO_FUNC) & 0xffe7e07f));
-#elif defined(CONFIG_FOR_TPLINK_MR10U_V1)
+#elif defined(CONFIG_FOR_TPLINK_MR10U_V1) || defined(CONFIG_FOR_TPLINK_MR13U_V1)
/* LED's GPIOs on MR10U:
*
defined(CONFIG_FOR_TPLINK_MR3040_V1V2) || \
defined(CONFIG_FOR_TPLINK_MR10U_V1) || \
defined(CONFIG_FOR_TPLINK_WR740N_V4) || \
- defined(CONFIG_FOR_TPLINK_MR3220_V2)
+ defined(CONFIG_FOR_TPLINK_MR3220_V2) || \
+ defined(CONFIG_FOR_TPLINK_MR13U_V1)
#define CONFIG_BOOTARGS "console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(ART)"