aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-09-14 20:12:16 +0000
committerJohn Crispin <john@openwrt.org>2015-09-14 20:12:16 +0000
commit0dbced8a484faeb8bea0c29a35c1b0f6d58dbf4c (patch)
treecfd44c89e6b47f7838bda8025b3b530f08428f1c /target/linux/ar71xx/image
parentbfeae90850fb7461773cc9f76be7e30955a65919 (diff)
downloadupstream-0dbced8a484faeb8bea0c29a35c1b0f6d58dbf4c.tar.gz
upstream-0dbced8a484faeb8bea0c29a35c1b0f6d58dbf4c.tar.bz2
upstream-0dbced8a484faeb8bea0c29a35c1b0f6d58dbf4c.zip
ar71xx: add TP-LINK TL-WDR3320 v2 support
This patch adds support for TP-LINK TL-WDR3320 v2. This router uses a chinese version 2 firmware header,. Signed-off-by: Weijie Gao <hackpascal@gmail.com> SVN-Revision: 46934
Diffstat (limited to 'target/linux/ar71xx/image')
-rw-r--r--target/linux/ar71xx/image/Makefile46
1 files changed, 45 insertions, 1 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 60ede75929..0becd24857 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -53,6 +53,17 @@ define Build/mktplinkfw
$(if $(findstring sysupgrade,$1),-s) && mv $@.new $@ || rm -f $@
endef
+define Build/mktplinkfw-chn-v2
+ -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) -m 2 \
+ -k $(word 1,$^) \
+ -r $@ \
+ -o $@.new \
+ -j -X 0x40000 \
+ -a $(call rootfs_align,$(FILESYSTEM)) \
+ $(if $(findstring sysupgrade,$1),-s) && mv $@.new $@ || rm -f $@
+endef
+
# -c combined image
define Build/mktplinkfw-initramfs
$(STAGING_DIR_HOST)/bin/mktplinkfw \
@@ -64,6 +75,16 @@ define Build/mktplinkfw-initramfs
@mv $@.new $@
endef
+define Build/mktplinkfw-initramfs-chn-v2
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
+ -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) -m 2 \
+ -k $@ \
+ -o $@.new \
+ -s -S \
+ -c
+ @mv $@.new $@
+endef
+
define Build/loader-common
rm -rf $@.src
$(MAKE) -C lzma-loader \
@@ -243,6 +264,15 @@ define Device/tplink
IMAGE/factory.bin := append-rootfs | mktplinkfw factory
endef
+define Device/tplink-chn-v2
+ TPLINK_HWREV := 0x1
+ KERNEL := kernel-bin | patch-cmdline | lzma
+ KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | mktplinkfw-initramfs-chn-v2
+ IMAGES := sysupgrade.bin factory.bin
+ IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw-chn-v2 sysupgrade
+ IMAGE/factory.bin := append-rootfs | mktplinkfw-chn-v2 factory
+endef
+
define Device/tplink-nolzma
$(Device/tplink)
LOADER_FLASH_OFFS := 0x22000
@@ -282,6 +312,12 @@ $(Device/tplink)
IMAGE_SIZE := 15872k
endef
+define Device/tplink-chn-v2-4mlzma
+$(Device/tplink-chn-v2)
+ TPLINK_FLASHLAYOUT := 4Mlzma
+ IMAGE_SIZE := 3904k
+endef
+
define Device/tl-wdr4300-v1
$(Device/tplink-8mlzma)
BOARDNAME = TL-WDR4300
@@ -314,7 +350,15 @@ define Device/mw4530r-v1
$(Device/tl-wdr4300-v1)
TPLINK_HWID := 0x45300001
endef
-TARGET_DEVICES += tl-wdr3500-v1 tl-wdr3600-v1 tl-wdr4300-v1 tl-wdr4300-v1-il tl-wdr4310-v1 mw4530r-v1
+
+define Device/tl-wdr3320-v2
+$(Device/tplink-chn-v2-4mlzma)
+ BOARDNAME = TL-WDR3320-v2
+ DEVICE_PROFILE = TLWDR3320V2
+ TPLINK_HWID := 0x33200002
+endef
+
+TARGET_DEVICES += tl-wdr3500-v1 tl-wdr3600-v1 tl-wdr4300-v1 tl-wdr4300-v1-il tl-wdr4310-v1 mw4530r-v1 tl-wdr3320-v2
define Device/archer-c5
$(Device/tplink-16mlzma)