Advertisement
OTLabs

AA TP-Link TL-MR10U

Oct 29th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 7.23 KB | None | 0 0
  1. diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
  2. index 416322d..6249bb9 100755
  3. --- a/target/linux/ar71xx/base-files/etc/diag.sh
  4. +++ b/target/linux/ar71xx/base-files/etc/diag.sh
  5. @@ -139,6 +139,7 @@ get_status_led() {
  6.     tl-wr941nd)
  7.         status_led="tp-link:green:system"
  8.         ;;
  9. +   tl-mr10u | \
  10.     tl-wdr4300 | \
  11.     tl-wr703n)
  12.         status_led="tp-link:blue:system"
  13. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
  14. index 7fa219d..370908c 100755
  15. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
  16. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
  17. @@ -153,6 +153,7 @@ cap4200ag |\
  18.  eap7660d |\
  19.  mr600 |\
  20.  rb-411 |\
  21. +tl-mr10u |\
  22.  tl-mr11u |\
  23.  tl-mr3020 |\
  24.  tl-mr3040 |\
  25. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  26. index fe7c910..8283a4f 100755
  27. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  28. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  29. @@ -108,6 +108,9 @@ tplink_board_detect() {
  30.     "254300"*)
  31.         model="TP-Link TL-WR2543N/ND"
  32.         ;;
  33. +   "100101"*)
  34. +       model="TP-Link TL-MR10U"
  35. +       ;;
  36.     "110101"*)
  37.         model="TP-Link TL-MR11U"
  38.         ;;
  39. @@ -381,6 +384,9 @@ ar71xx_board_detect() {
  40.     *"TL-WR703N v1")
  41.         name="tl-wr703n"
  42.         ;;
  43. +   *"TL-MR10U")
  44. +       name="tl-mr10u"
  45. +       ;;
  46.     *"TL-MR11U")
  47.         name="tl-mr11u"
  48.         ;;
  49. diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  50. index 49b1de9..486d36b 100755
  51. --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  52. +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  53. @@ -147,6 +147,7 @@ platform_check_image() {
  54.         platform_check_image_openmesh "$magic_long" "$1" && return 0
  55.         return 1
  56.         ;;
  57. +   tl-mr10u | \
  58.     tl-mr11u | \
  59.     tl-mr3020 | \
  60.     tl-mr3040 | \
  61. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
  62. index 90342e0..6f370db 100644
  63. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
  64. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
  65. @@ -1,5 +1,5 @@
  66.  /*
  67. - *  TP-LINK TL-WR703N board support
  68. + *  TP-LINK TL-WR703N/TL-MR10U board support
  69.   *
  70.   *  Copyright (C) 2011 dongyuqi <729650915@qq.com>
  71.   *  Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
  72. @@ -26,6 +26,8 @@
  73.  
  74.  #define TL_WR703N_GPIO_USB_POWER   8
  75.  
  76. +#define TL_MR10U_GPIO_USB_POWER        18
  77. +
  78.  #define TL_WR703N_KEYS_POLL_INTERVAL   20  /* msecs */
  79.  #define TL_WR703N_KEYS_DEBOUNCE_INTERVAL   (3 * TL_WR703N_KEYS_POLL_INTERVAL)
  80.  
  81. @@ -57,7 +59,7 @@ static struct gpio_keys_button tl_wr703n_gpio_keys[] __initdata = {
  82.     }
  83.  };
  84.  
  85. -static void __init tl_wr703n_setup(void)
  86. +static void __init common_setup(unsigned usb_power_gpio)
  87.  {
  88.     u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
  89.     u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
  90. @@ -72,7 +74,7 @@ static void __init tl_wr703n_setup(void)
  91.                     ARRAY_SIZE(tl_wr703n_gpio_keys),
  92.                     tl_wr703n_gpio_keys);
  93.  
  94. -   gpio_request_one(TL_WR703N_GPIO_USB_POWER,
  95. +   gpio_request_one(usb_power_gpio,
  96.              GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
  97.              "USB power");
  98.     ath79_register_usb();
  99. @@ -85,5 +87,18 @@ static void __init tl_wr703n_setup(void)
  100.     ath79_register_wmac(ee, mac);
  101.  }
  102.  
  103. +static void __init tl_mr10u_setup(void)
  104. +{
  105. +   common_setup(TL_MR10U_GPIO_USB_POWER);
  106. +}
  107. +
  108. +MIPS_MACHINE(ATH79_MACH_TL_MR10U, "TL-MR10U", "TP-LINK TL-MR10U",
  109. +        tl_mr10u_setup);
  110. +
  111. +static void __init tl_wr703n_setup(void)
  112. +{
  113. +   common_setup(TL_WR703N_GPIO_USB_POWER);
  114. +}
  115. +
  116.  MIPS_MACHINE(ATH79_MACH_TL_WR703N, "TL-WR703N", "TP-LINK TL-WR703N v1",
  117.          tl_wr703n_setup);
  118. diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk
  119. index 07d7059..53a5fc8 100644
  120. --- a/target/linux/ar71xx/generic/profiles/tp-link.mk
  121. +++ b/target/linux/ar71xx/generic/profiles/tp-link.mk
  122. @@ -5,6 +5,17 @@
  123.  # See /LICENSE for more information.
  124.  #
  125.  
  126. +define Profile/TLMR10U
  127. +   NAME:=TP-LINK TL-MR10U
  128. +   PACKAGES:=kmod-usb-core kmod-usb2
  129. +endef
  130. +
  131. +define Profile/TLMR10U/Description
  132. +   Package set optimized for the TP-LINK TL-MR10U.
  133. +endef
  134. +$(eval $(call Profile,TLMR10U))
  135. +
  136. +
  137.  define Profile/TLMR11U
  138.     NAME:=TP-LINK TL-MR11U
  139.     PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
  140. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  141. index 9ebe486..fe638c2 100644
  142. --- a/target/linux/ar71xx/image/Makefile
  143. +++ b/target/linux/ar71xx/image/Makefile
  144. @@ -872,6 +872,7 @@ $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV3,tl-wr941nd-v3,TL-WR94
  145.  $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,ttyS0,115200,0x09410004,1,4M))
  146.  $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR1043,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M))
  147.  
  148. +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR10U,tl-mr10u-v1,TL-MR10U,ttyATH0,115200,0x00100101,1,4Mlzma))
  149.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
  150.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
  151.  $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
  152. diff --git a/target/linux/ar71xx/patches-3.3/660-MIPS-add-tl-mr10u-support.patch b/target/linux/ar71xx/patches-3.3/660-MIPS-add-tl-mr10u-support.patch
  153. new file mode 100644
  154. index 0000000..73abc84
  155. --- /dev/null
  156. +++ b/target/linux/ar71xx/patches-3.3/660-MIPS-add-tl-mr10u-support.patch
  157. @@ -0,0 +1,21 @@
  158. +--- a/arch/mips/ath79/Kconfig
  159. ++++ b/arch/mips/ath79/Kconfig
  160. +@@ -491,7 +491,7 @@ config ATH79_MACH_TL_WDR4300
  161. +   select ATH79_DEV_WMAC
  162. +
  163. + config ATH79_MACH_TL_WR703N
  164. +-  bool "TP-LINK TL-WR703N support"
  165. ++  bool "TP-LINK TL-WR703N/TL-MR10U support"
  166. +   select SOC_AR933X
  167. +   select ATH79_DEV_ETH
  168. +   select ATH79_DEV_GPIO_BUTTONS
  169. +--- a/arch/mips/ath79/machtypes.h
  170. ++++ b/arch/mips/ath79/machtypes.h
  171. +@@ -71,6 +71,7 @@ enum ath79_mach_type {
  172. +   ATH79_MACH_TEW_632BRP,      /* TRENDnet TEW-632BRP */
  173. +   ATH79_MACH_TEW_673GRU,      /* TRENDnet TEW-673GRU */
  174. +   ATH79_MACH_TEW_712BR,       /* TRENDnet TEW-712BR */
  175. ++  ATH79_MACH_TL_MR10U,        /* TP-LINK TL-MR10U */
  176. +   ATH79_MACH_TL_MR11U,        /* TP-LINK TL-MR11U */
  177. +   ATH79_MACH_TL_MR3020,       /* TP-LINK TL-MR3020 */
  178. +   ATH79_MACH_TL_MR3040,       /* TP-LINK TL-MR3040 */
  179. diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
  180. index 2be6335..27ed826 100644
  181. --- a/tools/firmware-utils/src/mktplinkfw.c
  182. +++ b/tools/firmware-utils/src/mktplinkfw.c
  183. @@ -30,6 +30,7 @@
  184.  #define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); })
  185.  
  186.  #define HEADER_VERSION_V1  0x01000000
  187. +#define HWID_TL_MR10U_V1   0x00101001
  188.  #define HWID_TL_MR3020_V1  0x30200001
  189.  #define HWID_TL_MR3220_V1  0x32200001
  190.  #define HWID_TL_MR3420_V1  0x34200001
  191. @@ -179,6 +180,11 @@ static struct flash_layout layouts[] = {
  192.  
  193.  static struct board_info boards[] = {
  194.     {
  195. +       .id     = "TL-MR10Uv1",
  196. +       .hw_id      = HWID_TL_MR10U_V1,
  197. +       .hw_rev     = 1,
  198. +       .layout_id  = "4Mlzma",
  199. +   }, {
  200.         .id     = "TL-MR3020v1",
  201.         .hw_id      = HWID_TL_MR3020_V1,
  202.         .hw_rev     = 1,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement