Patchwork [OpenWrt-Devel] Fwd: [PATCH] [ar71xx] extended support for TP-Link TL-MR10U

login
register
Submitter Oleg Titov
Date 2013-07-10 15:19:23
Message ID <CACfd+CYZbE-nQrkh6pCtKTHf1Xk9KqKchrdFv9oY_e0pYiyRVA@mail.gmail.com>
Download mbox | patch
Permalink /patch/3803/
State Superseded
Headers show

Comments

Oleg Titov - 2013-07-10 15:19:23
Extended support for TP-Link TL-MR10U in Buildroot added.
Based on andelf's patch http://andelf.diandian.com/post/2013-05-22/40050677370


Signed-off-by: Oleg Titov <oleg.titov@gmail.com>

Patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
b/target/linux/ar71xx/base-files/etc/diag.sh
index 72390c0..56e87b1 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -133,6 +133,7 @@  get_status_led() {
  status_led="tp-link:green:system"
  ;;
  archer-c7 | \
+ tl-mr10u | \
  tl-wdr4300 | \
  tl-wr703n | \
  tl-wr720n-v3)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 86dceab..4f0d127 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -203,6 +203,7 @@  eap7660d |\
 mr600 |\
 mr600v2 |\
 rb-411 |\
+tl-mr10u |\
 tl-mr11u |\
 tl-mr3020 |\
 tl-mr3040 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 05e1093..588a50e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -450,6 +450,9 @@  ar71xx_board_detect() {
  *"TL-WR720N v3")
  name="tl-wr720n-v3"
  ;;
+ *"TL-MR10U")
+ name="tl-mr10u"
+ ;;
  *"TL-MR11U")
  name="tl-mr11u"
  ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 26b855f..a506664 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -156,6 +156,7 @@  platform_check_image() {
  ;;

  archer-c7 | \
+ tl-mr10u | \
  tl-mr11u | \
  tl-mr3020 | \
  tl-mr3040 | \
diff --git a/target/linux/ar71xx/config-3.8 b/target/linux/ar71xx/config-3.8
index 8a8d6a6..bdb0d1c 100644
--- a/target/linux/ar71xx/config-3.8
+++ b/target/linux/ar71xx/config-3.8
@@ -62,6 +62,7 @@  CONFIG_ATH79_MACH_RW2458N=y
 CONFIG_ATH79_MACH_TEW_632BRP=y
 CONFIG_ATH79_MACH_TEW_673GRU=y
 CONFIG_ATH79_MACH_TEW_712BR=y
+CONFIG_ATH79_MACH_TL_MR10U=y
 CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk
b/target/linux/ar71xx/generic/profiles/tp-link.mk
index 8c16df6..30e2b9c 100644
--- a/target/linux/ar71xx/generic/profiles/tp-link.mk
+++ b/target/linux/ar71xx/generic/profiles/tp-link.mk
@@ -16,6 +16,17 @@  endef
 $(eval $(call Profile,ARCHERC7))


+define Profile/TLMR10U
+ NAME:=TP-LINK TL-MR10U
+ PACKAGES:=kmod-usb-core kmod-usb2
+endef
+
+define Profile/TLMR10U/Description
+ Package set optimized for the TP-LINK TL-MR10U.
+endef
+$(eval $(call Profile,TLMR10U))
+
+
 define Profile/TLMR11U
  NAME:=TP-LINK TL-MR11U
  PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
diff --git a/target/linux/ar71xx/image/Makefile
b/target/linux/ar71xx/image/Makefile
index bcd16ab..29a8a1b 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -945,7 +945,7 @@  $(eval $(call
SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV4,tl-wr941nd-v4,TL-WR74
 $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR1043,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M))

 $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),ARCHERC7,archer-c7-v1,ARCHER-C7,ttyS0,115200,0x75000001,1,8Mlzma))
-$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR10UV1,tl-mr10u-v1,TL-MR3040,ttyATH0,115200,0x00100101,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR10U,tl-mr10u-v1,TL-MR10U,ttyATH0,115200,0x00100101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11UV1,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11UV2,tl-mr11u-v2,TL-MR11U,ttyATH0,115200,0x00110102,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
diff --git a/tools/firmware-utils/src/mktplinkfw.c
b/tools/firmware-utils/src/mktplinkfw.c
index 74a55fd..1f423c8 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -30,6 +30,7 @@ 
 #define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); })

 #define HEADER_VERSION_V1 0x01000000
+#define HWID_TL_MR10U_V1 0x00001001
 #define HWID_TL_MR3020_V1 0x30200001
 #define HWID_TL_MR3220_V1 0x32200001
 #define HWID_TL_MR3220_V2 0x32200002
@@ -193,6 +194,11 @@  static struct flash_layout layouts[] = {

 static struct board_info boards[] = {
  {
+ .id = "TL-MR10Uv1",
+ .hw_id = HWID_TL_MR10U_V1,
+ .hw_rev = 1,
+ .layout_id = "4Mlzma",
+ }, {
  .id = "TL-MR3020v1",
  .hw_id = HWID_TL_MR3020_V1,
  .hw_rev = 1,