<html><head></head><body>Tatsächlich glaube ich nicht, dass das allzu viel ist, sind zwei komplett verschiedene Chipsätze. Aber ein zweites Gerät zum Testen ist auf jeden Fall gut :-)<br>
<br>
Fabian<br><br><div class="gmail_quote">On 20 October 2017 19:31:40 GMT+02:00, mail@adrianschmutzler.de wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Gut, dann werde ich mir mal so ein Ding bestellen und am WE eine Patchversion bauen, die auf meinen 1043v5 rebased.<br /><br />Da dürfte sich einiges von LEDE überschneiden.<br /><br />Grüße<br /><br />Adrian<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> -----Original Message-----<br /> From: Fabian Bläse [mailto:fabian@blaese.de]<br /> Sent: Freitag, 20. Oktober 2017 19:27<br /> To: Adrian Schmutzler <mail@adrianschmutzler.de><br /> Cc: franken-dev@freifunk.net<br /> Subject: Re: [PATCH] Add support for TP-Link Archer C50v1<br /> <br /> Die v3 wird getrennt vermarktet (und sieht auch sehr anders aus) und die v2<br /> scheint es nicht für EU zu geben. Aber bin mir nicht sicher.<br /> Ich hab zwei zu verschiedenen Zeitpunkten genau dort bestellt und immer<br /> die v1 bekommen.<br /> <br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> On 20. Oct 2017, at 19:25, <mail@adrianschmutzler.de><br /></blockquote> <mail@adrianschmutzler.de> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><br /> Wenn ich den bestell, wie hoch ist die Chance auf einen v1?<br /><br /> <a href="https://www.amazon.de/TP-Link-Archer-C50-Anschluss">https://www.amazon.de/TP-Link-Archer-C50-Anschluss</a>-<br /></blockquote> GlasfaserModem/dp/B<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> 011NLWSQS/ref=sr_1_2?ie=UTF8&qid=1508520112&sr=8-2&keywords=c50<br /><br /><br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> -----Original Message-----<br /> From: Fabian Bläse [mailto:fabian@blaese.de]<br /> Sent: Freitag, 20. Oktober 2017 19:17<br /> To: mail@adrianschmutzler.de<br /> Cc: franken-dev@freifunk.net<br /> Subject: Re: [PATCH] Add support for TP-Link Archer C50v1<br /><br /> Ah, geht es um flashen auf die Factory Firmware? Das habe ich ehrlich<br /> gesagt bisher noch nicht probiert, ich war leider gezwungen, per SPI<br /> zu flashen, da hab ich gleich LEDE rauf geflasht.<br /> Ich kümmere mich drum, danke für den Hinweis.<br /><br /> Fabian<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"> On 20. Oct 2017, at 19:14, mail@adrianschmutzler.de wrote:<br /><br /> Das geht auch, nur das Gerät nimmt ihn dann nicht an, weil es das<br /> Image<br /></blockquote> mit TPLINK_BOARD_NAME prüft, ob es das richtige Gerät ist. Hatte<br /> genau das beim 1043v5.<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> -----Original Message-----<br /> From: Fabian Bläse [mailto:fabian@blaese.de]<br /> Sent: Freitag, 20. Oktober 2017 19:12<br /> To: Adrian Schmutzler <mail@adrianschmutzler.de><br /> Cc: franken-dev@freifunk.net<br /> Subject: Re: [PATCH] Add support for TP-Link Archer C50v1<br /><br /> Hallo Adrian,<br /><br /> ich schau nochmal drüber, sobald ich mit testen fertig bin.<br /> Wann ist das passiert? Das letzte mal, als ich es probiert habe,<br /> hat sich der Patch noch wunderbar applien und kompilieren lassen.<br /><br /> Fabian<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> On 20. Oct 2017, at 18:03, Adrian Schmutzler<br /> <mail@adrianschmutzler.de><br /></blockquote> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><br /> Hallo nochmal,<br /><br /> es gab im LEDE master mal einen Patch, der hat<br /></blockquote></blockquote></blockquote></blockquote></blockquote> TPLINK_BOARD_NAME<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> to<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> TPLINK_BOARD_ID umbenannt. Da du den nicht drin hast (und auch<br /> nicht reinnehmen solltest), musst du alle Fälle von TPLINK_BOARD_ID<br /> entsprechend nach TPLINK_BOARD_NAME zurück-umbenennen.<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><br /> Geht wahrscheinlich mit Find/Replace.<br /><br /> Grüße<br /><br /> Adrian<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> -----Original Message-----<br /> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On<br /></blockquote></blockquote> Behalf<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> Of Fabian Bläse<br /> Sent: Mittwoch, 18. Oktober 2017 16:41<br /> To: franken-dev@freifunk.net<br /> Subject: [PATCH] Add support for TP-Link Archer C50v1<br /><br /> Signed-off-by: Fabian Bläse <fabian@blaese.de><br /> ---<br /> bsp/board_c50.bsp                                  |   7 +<br /> bsp/c50/.config                                    |  16 ++<br /> ...mktplinkfw2-related-commands-to-image-com.patch | 166<br /> +++++++++++++++++++++  ...e-simplify-TP-Link-Archer-devices-<br /> definit.patch |  73 +++++++++<br /> ...s-Archer-C50v1-support-US-and-EU-<br /> versions.patch |  52 +++++++<br /> ...ils-mktplinkfw2-support-additional-<br /> hardwa.patch | 147 ++++++++++++++++++<br /> ...tils-mktplinkfw2-fix-support- for-w-option.patch |  32 ++++<br /> ...5-firmware-utils-mktplinkfw2-fix-MD5-<br /> salt.patch |  68 +++++++++<br /> src/packages/fff/fff-network/ramips/network.c50    |   8 +<br /> 9 files changed, 569 insertions(+) create mode 100644<br /> bsp/board_c50.bsp create mode 100644 bsp/c50/.config create<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> mode<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 100644<br /> build_patches/openwrt/0009-build-move-<br /></blockquote></blockquote> mktplinkfw2-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> related-commands-to-image-com.patch<br /> create mode 100644<br /> build_patches/openwrt/0010-ramips-image-simplify-<br /> TP-Link-Archer-devices-definit.patch<br /> create mode 100644 build_patches/openwrt/0011-ramips-Archer-<br /></blockquote></blockquote></blockquote></blockquote> C50v1-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> support-US-and-EU-versions.patch<br /> create mode 100644 build_patches/openwrt/0013-firmware-utils-<br /> mktplinkfw2-support-additional-hardwa.patch<br /> create mode 100644 build_patches/openwrt/0014-firmware-utils-<br /> mktplinkfw2-fix-support-for-w-option.patch<br /> create mode 100644 build_patches/openwrt/0015-firmware-utils-<br /> mktplinkfw2-fix-MD5-salt.patch<br /> create mode 100644<br /> src/packages/fff/fff-network/ramips/network.c50<br /><br /> diff --git a/bsp/board_c50.bsp b/bsp/board_c50.bsp new file mode<br /> 100644 index 0000000..74576c7<br /> --- /dev/null<br /> +++ b/bsp/board_c50.bsp<br /> @@ -0,0 +1,7 @@<br /> +machine=c50<br /> +chipset=ramips<br /> +target=$builddir/$machine<br /> +<br /> +images=(<br /> +        "lede-ramips-mt7620-ArcherC50-squashfs-factory-<br /></blockquote></blockquote></blockquote></blockquote> sysupgrade.bin"<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +       )<br /> diff --git a/bsp/c50/.config b/bsp/c50/.config new file mode<br /> 100644 index<br /> 0000000..6e9a624<br /> --- /dev/null<br /> +++ b/bsp/c50/.config<br /> @@ -0,0 +1,16 @@<br /> +# Generated using "./buildscript config openwrt".<br /> +# Do no edit manually<br /> +#<br /> +CONFIG_TARGET_ramips=y<br /> +CONFIG_TARGET_ramips_mt7620=y<br /> +CONFIG_TARGET_ramips_mt7620_DEVICE_ArcherC50=y<br /> +CONFIG_BUSYBOX_CUSTOM=y<br /> +CONFIG_CLEAN_IPKG=y<br /> +CONFIG_PACKAGE_kmod-ifb=y<br /> +CONFIG_PACKAGE_kmod-ledtrig-heartbeat=y<br /> +CONFIG_PACKAGE_kmod-ledtrig-netdev=y<br /> +CONFIG_PACKAGE_kmod-sched-connmark=y<br /> +CONFIG_PACKAGE_qos-scripts=y<br /> +CONFIG_PACKAGE_tc=y<br /> +CONFIG_STRIP_KERNEL_EXPORTS=y<br /> +CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512<br /> diff --git<br /> a/build_patches/openwrt/0009-build-move-mktplinkfw2-related-<br /> commands-to-image-com.patch b/build_patches/openwrt/0009-<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> build-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> move-mktplinkfw2-related-commands-to-image-com.patch<br /> new file mode 100644<br /> index 0000000..1c9999b<br /> --- /dev/null<br /> +++ b/build_patches/openwrt/0009-build-move-mktplinkfw2-<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> related-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> commands<br /> +++ -to-image-com.patch<br /> @@ -0,0 +1,166 @@<br /> +From 82e87bab1f0572e576a89aa85b5ebfe45f257cc9 Mon Sep 17<br /></blockquote></blockquote></blockquote></blockquote> 00:00:00<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 2001<br /> +From: Piotr Dymacz <pepe2k@gmail.com><br /> +Date: Fri, 23 Jun 2017 23:07:10 +0200<br /> +Subject: [PATCH 1/3] build: move mktplinkfw2 related commands<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> to<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +<a href="http://image-commands.mk">image-commands.mk</a><br /> +MIME-Version: 1.0<br /> +Content-Type: text/plain; charset=UTF-8<br /> +Content-Transfer-Encoding: 8bit<br /> +<br /> +There are already two targets (lantiq, ramips) which use<br /> +mktplinkfw2 tool for creating images. This de-duplicates code,<br /> +introduces two new build commands: tplink-v2-header,<br /> +tplink-v2-image and makes use of them in place of old,<br /> +(sub)target<br /></blockquote></blockquote></blockquote></blockquote> specific ones.<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +<br /> +Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> [Rebased on<br /></blockquote></blockquote> 8ad1b09]<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +Signed-off-by: Fabian Bläse <fabian@blaese.de><br /> +---<br /> + include/<a href="http://image-commands.mk">image-commands.mk</a>            | 14 ++++++++++++++<br /> + target/linux/lantiq/image/<a href="http://tp-link.mk">tp-link.mk</a> | 25<br /> +++++++++----------------- target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a>  |<br /> +24 ++++++++++++------------<br /> + 3 files changed, 34 insertions(+), 29 deletions(-)<br /> +<br /> +diff --git a/include/<a href="http://image-commands.mk">image-commands.mk</a> b/include/image-<br /></blockquote></blockquote> <a href="http://commands.mk">commands.mk</a><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +index 04fa853fbb..90fe5fc242 100644<br /> +--- a/include/<a href="http://image-commands.mk">image-commands.mk</a><br /> ++++ b/include/<a href="http://image-commands.mk">image-commands.mk</a><br /> +@@ -173,6 +173,20 @@ define Build/sysupgrade-tar<br /> +   $@<br /> + endef<br /> +<br /> ++define Build/tplink-v2-header<br /> ++ $(STAGING_DIR_HOST)/bin/mktplinkfw2 \<br /> ++  -c -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) -k $@ -o<br /></blockquote></blockquote></blockquote></blockquote> $@.new<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> ++ @mv $@.new $@<br /> ++endef<br /> ++<br /> ++define Build/tplink-v2-image<br /> ++ $(STAGING_DIR_HOST)/bin/mktplinkfw2 \<br /> ++  -a 0x4 -j -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) \<br /> ++  -k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o<br /></blockquote></blockquote></blockquote></blockquote> $@.new<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> ++ cat $@.new >> $@<br /> ++ rm -rf $@.new<br /> ++endef<br /> ++<br /> + json_quote=$(subst ','\'',$(subst ",\",$(1)))<br /> + #")')<br /> + metadata_devices=$(if $(1),$(subst<br /> +"$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call<br /> +json_quote,$(v))")))) diff --git<br /> +a/target/linux/lantiq/image/<a href="http://tp-link.mk">tp-link.mk</a><br /> +b/target/linux/lantiq/image/<a href="http://tp-link.mk">tp-link.mk</a><br /> +index 49c4bc10e1..976184175a 100644<br /> +--- a/target/linux/lantiq/image/<a href="http://tp-link.mk">tp-link.mk</a><br /> ++++ b/target/linux/lantiq/image/<a href="http://tp-link.mk">tp-link.mk</a><br /> +@@ -1,27 +1,18 @@<br /> +-define Build/tplink-fw<br /> +- mktplinkfw2 -c -B $(BOARD_ID) -s \<br /> +-  -k $@ -o $@.new<br /> +- mv $@.new $@<br /> +-endef<br /> +-<br /> +-define Build/mktplinkfw2<br /> +- mktplinkfw2 -B $(BOARD_ID) -s -a 0x4 -j \<br /> +-  -k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) \<br /> +-  -o $@<br /> +-endef<br /> +-DEVICE_VARS += BOARD_ID<br /> ++DEVICE_VARS += TPLINK_BOARD_ID<br /> +<br /> + define Device/lantiqTpLink<br /> +   KERNEL := kernel-bin | append-dtb | lzma<br /> +-  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma |<br /> +tplink-fw<br /> ++  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | \<br /> ++ tplink-v2-header -s -V "ver. 1.0"<br /> +   IMAGES := sysupgrade.bin<br /> +-  IMAGE/sysupgrade.bin := mktplinkfw2 | append-metadata |<br /> +check-size<br /> +$$$$(IMAGE_SIZE)<br /> ++  IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 1.0" | \<br /> ++ append-metadata | check-size $$$$(IMAGE_SIZE)<br /> + endef<br /> +<br /> + define Device/TDW8970<br /> +   $(Device/lantiqTpLink)<br /> +   DEVICE_PROFILE := TDW8970<br /> +-  BOARD_ID := TD-W8970v1<br /> ++  TPLINK_BOARD_ID := TD-W8970v1<br /> +   IMAGE_SIZE := 7680k<br /> +   DEVICE_TITLE := TP-LINK TD-W8970<br /> +   DEVICE_PACKAGES:= kmod-ath9k wpad-mini kmod-usb-dwc2<br /> +kmod-usb-ledtrig-usbport @@ -30,7 +21,7 @@ endef  define<br /> Device/TDW8980<br /> +   $(Device/lantiqTpLink)<br /> +   DEVICE_PROFILE := TDW8980<br /> +-  BOARD_ID := TD-W8980v1<br /> ++  TPLINK_BOARD_ID := TD-W8980v1<br /> +   IMAGE_SIZE := 7680k<br /> +   DEVICE_TITLE := TP-LINK TD-W8980<br /> +   DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-mini<br /></blockquote></blockquote></blockquote></blockquote> kmod-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> usb-dwc2<br /> +kmod-usb-ledtrig-usbport @@ -39,7 +30,7 @@ endef  define<br /> Device/VR200v<br /> +   $(Device/lantiqTpLink)<br /> +   DEVICE_PROFILE := VR200v<br /> +-  BOARD_ID := ArcherVR200V<br /> ++  TPLINK_BOARD_ID := ArcherVR200V<br /> +   IMAGE_SIZE := 15808k<br /> +   DEVICE_TITLE := TP-LINK Archer VR200v<br /> +   DEVICE_PACKAGES:= kmod-usb-dwc2 kmod-usb-ledtrig-usbport<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> diff<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +--git a/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +b/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +index c2c0ae271d..bb79acb894 100644<br /> +--- a/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> ++++ b/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +@@ -2,10 +2,7 @@<br /> + # MT7620A Profiles<br /> + #<br /> +<br /> +-define Build/tplink-header<br /> +- $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -<br /></blockquote></blockquote></blockquote></blockquote> B $(1) \<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +-  -o $@.new -k $@ -r $(IMAGE_ROOTFS) && mv<br /></blockquote></blockquote></blockquote></blockquote> $@.new $@<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +-endef<br /> ++DEVICE_VARS += TPLINK_BOARD_ID<br /> +<br /> + define Build/pad-kernel-ex2700<br /> +  cp $@ $@.tmp && dd if=/dev/zero bs=64 count=1 >> $@.tmp<br /></blockquote></blockquote></blockquote></blockquote> \ @@ -<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 35,10<br /> ++32,11 @@ endef  define Device/ArcherC20i<br /> +   DTS := ArcherC20i<br /> +   SUPPORTED_DEVICES := c20i<br /> ++  TPLINK_BOARD_ID := ArcherC20i<br /> +   KERNEL := $(KERNEL_DTB)<br /> +-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> ArcherC20i<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +-c<br /> +-  IMAGE/factory.bin := append-kernel | tplink-header ArcherC20i<br /> +-j<br /> +-  IMAGE/sysupgrade.bin := append-kernel | tplink-header<br /> +ArcherC20i -j -s | append-metadata<br /> ++  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header<br /> ++ IMAGE/factory.bin := tplink-v2-image  IMAGE/sysupgrade.bin :=<br /> ++ tplink-v2-image -s | append-metadata<br /> +   IMAGES += factory.bin<br /> +   DEVICE_TITLE := TP-Link ArcherC20i  endef @@ -47,10 +45,11 @@<br /> +TARGET_DEVICES += ArcherC20i  define<br /> +Device/ArcherC50<br /> +   DTS := ArcherC50<br /> +   SUPPORTED_DEVICES := c50<br /> ++  TPLINK_BOARD_ID := ArcherC50<br /> +   KERNEL := $(KERNEL_DTB)<br /> +-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50<br /> +-c<br /> +-  IMAGE/factory.bin := append-kernel | tplink-header ArcherC50<br /> +-j<br /> +-  IMAGE/sysupgrade.bin := append-kernel | tplink-header<br /> +ArcherC50 -j -s | append-metadata<br /> ++  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header<br /> ++ IMAGE/factory.bin := tplink-v2-image  IMAGE/sysupgrade.bin :=<br /> ++ tplink-v2-image -s | append-metadata<br /> +   IMAGES += factory.bin<br /> +   DEVICE_TITLE := TP-Link ArcherC50  endef @@ -59,9 +58,10 @@<br /> +TARGET_DEVICES += ArcherC50  define<br /> +Device/ArcherMR200<br /> +   DTS := ArcherMR200<br /> +   SUPPORTED_DEVICES := mr200<br /> ++  TPLINK_BOARD_ID := ArcherMR200<br /> +   KERNEL := $(KERNEL_DTB)<br /> +-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header<br /></blockquote></blockquote></blockquote></blockquote> ArcherMR200<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +-c<br /> +-  IMAGE/sysupgrade.bin := append-kernel | tplink-header<br /></blockquote></blockquote> ArcherMR200<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +-j -s | append-metadata<br /> ++  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header<br /> ++ IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata<br /> +   DEVICE_PACKAGES := kmod-usb2 kmod-usb-net kmod-usb-net-<br /></blockquote></blockquote></blockquote></blockquote> rndis<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> kmod-usb-serial kmod-usb-serial-option adb<br /> +   DEVICE_TITLE := TP-Link ArcherMR200  endef<br /> +--<br /> +2.14.2<br /> +<br /> diff --git<br /> a/build_patches/openwrt/0010-ramips-image-simplify-TP-Link-<br /> Archer-devices-definit.patch<br /> b/build_patches/openwrt/0010-ramips-image-<br /> simplify-TP-Link-Archer-devices-definit.patch<br /> new file mode 100644<br /> index 0000000..f30411f<br /> --- /dev/null<br /> +++ b/build_patches/openwrt/0010-ramips-image-simplify-TP-Link-<br /></blockquote></blockquote> Archer<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +++ -<br /> de<br /> +++ vices-definit.patch<br /> @@ -0,0 +1,73 @@<br /> +From 16cbb38ac1f84d60b9901f9d6827a498a1cbba46 Mon Sep 17<br /></blockquote></blockquote></blockquote></blockquote> 00:00:00<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 2001<br /> +From: Piotr Dymacz <pepe2k@gmail.com><br /> +Date: Fri, 23 Jun 2017 23:20:53 +0200<br /> +Subject: [PATCH 2/3] ramips: image: simplify TP-Link Archer<br /> +devices definitions<br /> +MIME-Version: 1.0<br /> +Content-Type: text/plain; charset=UTF-8<br /> +Content-Transfer-Encoding: 8bit<br /> +<br /> +Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> [Rebased on<br /></blockquote></blockquote> 8ad1b09]<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +Signed-off-by: Fabian Bläse <fabian@blaese.de><br /> +---<br /> + target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a> | 21 ++++++++++-----------<br /> + 1 file changed, 10 insertions(+), 11 deletions(-)<br /> +<br /> +diff --git a/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +b/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +index bb79acb894..dd75f5a504 100644<br /> +--- a/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> ++++ b/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +@@ -29,39 +29,38 @@ define Build/zyimage<br /> +  $(STAGING_DIR_HOST)/bin/zyimage $(1) $@  endef<br /> +<br /> +-define Device/ArcherC20i<br /> +-  DTS := ArcherC20i<br /> +-  SUPPORTED_DEVICES := c20i<br /> +-  TPLINK_BOARD_ID := ArcherC20i<br /> ++define Device/Archer<br /> +   KERNEL := $(KERNEL_DTB)<br /> +   KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header<br /> +   IMAGE/factory.bin := tplink-v2-image<br /> +   IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata<br /> ++endef<br /> ++<br /> ++define Device/ArcherC20i<br /> ++  $(Device/Archer)<br /> ++  DTS := ArcherC20i<br /> ++  SUPPORTED_DEVICES := c20i<br /> ++  TPLINK_BOARD_ID := ArcherC20i<br /> +   IMAGES += factory.bin<br /> +   DEVICE_TITLE := TP-Link ArcherC20i endef TARGET_DEVICES +=<br /> + ArcherC20i<br /> +<br /> + define Device/ArcherC50<br /> ++  $(Device/Archer)<br /> +   DTS := ArcherC50<br /> +   SUPPORTED_DEVICES := c50<br /> +   TPLINK_BOARD_ID := ArcherC50<br /> +-  KERNEL := $(KERNEL_DTB)<br /> +-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header<br /> +-  IMAGE/factory.bin := tplink-v2-image<br /> +-  IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata<br /> +   IMAGES += factory.bin<br /> +   DEVICE_TITLE := TP-Link ArcherC50  endef  TARGET_DEVICES +=<br /> +ArcherC50<br /> +<br /> + define Device/ArcherMR200<br /> ++  $(Device/Archer)<br /> +   DTS := ArcherMR200<br /> +   SUPPORTED_DEVICES := mr200<br /> +   TPLINK_BOARD_ID := ArcherMR200<br /> +-  KERNEL := $(KERNEL_DTB)<br /> +-  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header<br /> +-  IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata<br /> +   DEVICE_PACKAGES := kmod-usb2 kmod-usb-net kmod-usb-net-<br /></blockquote></blockquote></blockquote></blockquote> rndis<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> kmod-usb-serial kmod-usb-serial-option adb<br /> +   DEVICE_TITLE := TP-Link ArcherMR200  endef<br /> +--<br /> +2.14.2<br /> +<br /> diff --git<br /> a/build_patches/openwrt/0011-ramips-Archer-C50v1-support-US-<br /> and-EU-versions.patch b/build_patches/openwrt/0011-ramips-<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> Archer-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> C50v1-support-US-and-EU-versions.patch<br /> new file mode 100644<br /> index 0000000..95d8ce7<br /> --- /dev/null<br /> +++ b/build_patches/openwrt/0011-ramips-Archer-C50v1-support-<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> US-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> and-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> EU-v<br /> +++ ersions.patch<br /> @@ -0,0 +1,52 @@<br /> +From cfa1a9466db691915960be89e40f3c8335b9ea4f Mon Sep 17<br /></blockquote></blockquote></blockquote></blockquote> 00:00:00<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 2001<br /> +From: Thibaut VARENE <hacks@slashdirt.org><br /> +Date: Fri, 28 Jul 2017 13:00:54 +0200<br /> +Subject: [PATCH 3/3] ramips: Archer C50v1: support US and EU<br /> +versions<br /> +<br /> +For the Archer C50v1, the EU and US versions are differentiated<br /> +by their respective HW additional version (0x0 for US, 0x2 for EU).<br /> +<br /> +The stock web interface checks this field before flashing,<br /> +making it impossible to flash the current (US) factory image on EU<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> hardware.<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +<br /> +However the bootloader does not check this field, making it<br /> +possible to use a single sysupgrade image for both hardware.<br /> +<br /> +This patch adds the necessary build bits to generate both EU and<br /> +US factory images, and renames the target as "Archer C50v1"<br /> +since there are as of now<br /> +3 different versions of Archer C50 (all with different CPUs).<br /> +<br /> +Signed-off-by: Thibaut VARENE <hacks@slashdirt.org><br /> +---<br /> + target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a> | 10 ++++++----<br /> + 1 file changed, 6 insertions(+), 4 deletions(-)<br /> +<br /> +diff --git a/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +b/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +index dd75f5a504..64d11a5b0a 100644<br /> +--- a/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> ++++ b/target/linux/ramips/image/<a href="http://mt7620.mk">mt7620.mk</a><br /> +@@ -46,15 +46,17 @@ define Device/ArcherC20i  endef<br /></blockquote></blockquote> TARGET_DEVICES<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> += ArcherC20i<br /> +<br /> +-define Device/ArcherC50<br /> ++define Device/ArcherC50v1<br /> +   $(Device/Archer)<br /> +   DTS := ArcherC50<br /> +   SUPPORTED_DEVICES := c50<br /> +   TPLINK_BOARD_ID := ArcherC50<br /> +-  IMAGES += factory.bin<br /> +-  DEVICE_TITLE := TP-Link ArcherC50<br /> ++  IMAGES += factory-us.bin factory-eu.bin  IMAGE/factory-us.bin<br /> ++ := tplink-v2-image -w 0  IMAGE/factory-eu.bin :=<br /> ++ tplink-v2-image -w 2 DEVICE_TITLE := TP-Link ArcherC50v1<br /> + endef<br /> +-TARGET_DEVICES += ArcherC50<br /> ++TARGET_DEVICES += ArcherC50v1<br /> +<br /> + define Device/ArcherMR200<br /> +   $(Device/Archer)<br /> +--<br /> +2.14.2<br /> +<br /> diff --git<br /> a/build_patches/openwrt/0013-firmware-utils-mktplinkfw2-<br /> support-additional-hardwa.patch<br /> b/build_patches/openwrt/0013-firmware-<br /> utils-mktplinkfw2-support-additional-hardwa.patch<br /> new file mode 100644<br /> index 0000000..e679fd0<br /> --- /dev/null<br /> +++ b/build_patches/openwrt/0013-firmware-utils-mktplinkfw2-<br /></blockquote></blockquote></blockquote></blockquote> support<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +++ -<br /> addi<br /> +++ tional-hardwa.patch<br /> @@ -0,0 +1,147 @@<br /> +From fc3aa153d006a0eb7e43f3f06af309ec60996755 Mon Sep 17<br /></blockquote></blockquote></blockquote></blockquote> 00:00:00<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 2001<br /> +From: Piotr Dymacz <pepe2k@gmail.com><br /> +Date: Wed, 21 Jun 2017 14:15:55 +0200<br /> +Subject: [PATCH 1/3] firmware-utils: mktplinkfw2: support<br /> +additional hardware  version<br /> +<br /> +As it turned out, some of new MediaTek based TP-Link devices use<br /> +value from field at 0x3c offset in version 3 of TP-Link header<br /> +to specify "Additional Hardware Version".<br /> +<br /> +Value from this field is validated during regular (GUI) firmware<br /> +upgrade on devices like TL-WR840N v4 or TL-WR841N v13. If it's<br /> +zero (based on some tests, it seems that firmware will accept<br /> +anything != 0), errors like below are printed on console and<br /> +upgrade<br /></blockquote></blockquote></blockquote></blockquote> fails:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +<br /> +[ rsl_sys_updateFirmware ] 2137:  Firmware Additional<br /> +HardwareVersion check failed<br /> +<br /> +[ rdp_updateFirmware ] 345:  perror:4506<br /> +<br /> +Signed-off-by: Piotr Dymacz <pepe2k@gmail.com><br /> +---<br /> + tools/firmware-utils/src/mktplinkfw2.c | 26<br /> +++++++++++++++++++++------<br /> + 1 file changed, 20 insertions(+), 6 deletions(-)<br /> +<br /> +diff --git a/tools/firmware-utils/src/mktplinkfw2.c<br /> +b/tools/firmware-utils/src/mktplinkfw2.c<br /> +index 3ab5c52ec2..b6dd670b90 100644<br /> +--- a/tools/firmware-utils/src/mktplinkfw2.c<br /> ++++ b/tools/firmware-utils/src/mktplinkfw2.c<br /> +@@ -43,7 +43,7 @@ struct fw_header {<br /> +  char  fw_version[48]; /* 0x04: fw version string */<br /> +  uint32_t hw_id;  /* 0x34: hardware id */<br /> +  uint32_t hw_rev;  /* 0x38: FIXME:<br /></blockquote></blockquote></blockquote></blockquote> hardware<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> revision? */<br /> +- uint32_t unk1;         /* 0x3c: 0x00000000 */<br /> ++ uint32_t hw_ver_add; /* 0x3c: additional hardware<br /></blockquote></blockquote></blockquote></blockquote> version<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> */<br /> +  uint8_t  md5sum1[MD5SUM_LEN]; /* 0x40 */<br /> +  uint32_t unk2;  /* 0x50: 0x00000000 */<br /> +  uint8_t  md5sum2[MD5SUM_LEN]; /* 0x54 */<br /> +@@ -80,6 +80,7 @@ struct board_info {<br /> +  char  *id;<br /> +  uint32_t hw_id;<br /> +  uint32_t hw_rev;<br /> ++ uint32_t hw_ver_add;<br /> +  char  *layout_id;<br /> +  uint32_t hdr_ver;<br /> +  bool  endian_swap;<br /> +@@ -104,6 +105,8 @@ static char *opt_hw_id;  static uint32_t<br /> +hw_id; static char *opt_hw_rev;  static uint32_t hw_rev;<br /> ++static char *opt_hw_ver_add;<br /> ++static uint32_t hw_ver_add;<br /> + static int fw_ver_lo;<br /> + static int fw_ver_mid;<br /> + static int fw_ver_hi;<br /> +@@ -288,6 +291,7 @@ static void usage(int status)<br /> + "  -L <la>         overwrite kernel load address with <la> (hexval<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> prefixed<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> with<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 0x)\n"<br /> + "  -H <hwid>       use hardware id specified with <hwid>\n"<br /> + "  -W <hwrev>      use hardware revision specified with <hwrev>\n"<br /> ++"  -w <hwveradd>   use additional hardware version specified with<br /> <hwveradd>\n"<br /> + "  -F <id>         use flash layout specified with <id>\n"<br /> + "  -k <file>       read kernel image from the file <file>\n"<br /> + "  -r <file>       read rootfs image from the file <file>\n"<br /> +@@ -391,6 +395,7 @@ static int check_options(void)<br /> +<br /> +   hw_id = board->hw_id;<br /> +   hw_rev = board->hw_rev;<br /> ++  hw_ver_add = board->hw_ver_add;<br /> +   if (board->hdr_ver)<br /> +    hdr_ver = board->hdr_ver;<br /> +   endian_swap = board->endian_swap; @@ -405,6<br /></blockquote></blockquote></blockquote></blockquote> +410,11<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> @@ static int<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +check_options(void)<br /> +    hw_rev = strtoul(opt_hw_rev, NULL, 0);<br /> +   else<br /> +    hw_rev = 1;<br /> ++<br /> ++  if (opt_hw_ver_add)<br /> ++   hw_ver_add = strtoul(opt_hw_rev, NULL, 0);<br /> ++  else<br /> ++   hw_ver_add = 0;<br /> +  }<br /> +<br /> +  layout = find_layout(layout_id); @@ -511,6 +521,7 @@ static<br /></blockquote></blockquote></blockquote></blockquote> void<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +fill_header(char *buf, int len)<br /> +<br /> +  hdr->hw_id = htonl(hw_id);<br /> +  hdr->hw_rev = htonl(hw_rev);<br /> ++ hdr->hw_ver_add = htonl(hw_ver_add);<br /> +<br /> +  if (boot_info.file_size == 0) {<br /> +   memcpy(hdr->md5sum1, md5salt_normal,<br /></blockquote></blockquote></blockquote></blockquote> sizeof(hdr-<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> md5sum1)); @@<br /></blockquote> +-535,7 +546,6 @@ static void fill_header(char *buf, int len)<br /> +  hdr->boot_ofs = htonl(0);<br /> +  hdr->boot_len = htonl(boot_info.file_size);<br /> +<br /> +- hdr->unk1 = htonl(0);<br /> +  hdr->unk2 = htonl(0);<br /> +  hdr->unk3 = htonl(0xffffffff);<br /> +  hdr->unk4 = htons(0x55aa);<br /> +@@ -779,9 +789,6 @@ static int inspect_fw(void)<br /> +<br /> +  inspect_fw_phexdec("Version 2 Header size", sizeof(struct<br /> + fw_header));<br /> +<br /> +- if (ntohl(hdr->unk1) != 0)<br /> +-  inspect_fw_phexdec("Unknown value 1", hdr-<br /></blockquote></blockquote></blockquote> unk1);<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +-<br /> +  memcpy(md5sum, hdr->md5sum1, sizeof(md5sum));<br /> +  if (ntohl(hdr->boot_len) == 0)<br /> +   memcpy(hdr->md5sum1, md5salt_normal,<br /></blockquote></blockquote></blockquote></blockquote> sizeof(md5sum));<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> @@ -820,11<br /> ++827,15 @@ static int inspect_fw(void)<br /> +                       ntohl(hdr->hw_id), board->id);<br /> +   inspect_fw_phexexp("Hardware Revision",<br /> +                      ntohl(hdr->hw_rev), board->hw_rev);<br /> ++  inspect_fw_phexexp("Additional HW Version",<br /> ++                     ntohl(hdr->hw_ver_add), board-<br /></blockquote></blockquote></blockquote> hw_ver_add);<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +  } else {<br /> +   inspect_fw_phexpost("Hardware ID",<br /> +                       ntohl(hdr->hw_id), "unknown");<br /> +   inspect_fw_phex("Hardware Revision",<br /> +                   ntohl(hdr->hw_rev));<br /> ++  inspect_fw_phex("Additional HW Version",<br /> ++                  ntohl(hdr->hw_ver_add));<br /> +  }<br /> +<br /> +  printf("%-23s: %d.%d.%d-%d.%d\n", "Software version", @@<br /></blockquote></blockquote></blockquote></blockquote> -919,7<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> ++930,7 @@ int main(int argc, char *argv[])<br /> +  while ( 1 ) {<br /> +   int c;<br /> +<br /> +-  c = getopt(argc, argv,<br /> "a:B:H:E:F:L:V:N:W:ci:k:r:R:o:xhsjv:y:T:e");<br /> ++  c = getopt(argc, argv,<br /> ++"a:B:H:E:F:L:V:N:W:w:ci:k:r:R:o:xhsjv:y:T:e");<br /> +   if (c == -1)<br /> +    break;<br /> +<br /> +@@ -942,6 +953,9 @@ int main(int argc, char *argv[])<br /> +   case 'W':<br /> +    opt_hw_rev = optarg;<br /> +    break;<br /> ++  case 'w':<br /> ++   opt_hw_ver_add = optarg;<br /> ++   break;<br /> +   case 'L':<br /> +    sscanf(optarg, "0x%x", &kernel_la);<br /> +    break;<br /> +--<br /> +2.11.0 (Apple Git-81)<br /> +<br /> diff --git<br /> a/build_patches/openwrt/0014-firmware-utils-mktplinkfw2-fix-<br /> support-for-w-option.patch<br /> b/build_patches/openwrt/0014-firmware-utils-<br /> mktplinkfw2-fix-support-for-w-option.patch<br /> new file mode 100644<br /> index 0000000..4ce76b6<br /> --- /dev/null<br /> +++ b/build_patches/openwrt/0014-firmware-utils-mktplinkfw2-fix-<br /></blockquote></blockquote> suppo<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +++ rt-<br /> +++ for-w-option.patch<br /> @@ -0,0 +1,32 @@<br /> +From f116ed7573cc77e4db1ef8c183932da6a56a195f Mon Sep 17<br /></blockquote></blockquote></blockquote></blockquote> 00:00:00<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 2001<br /> +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> <rafal@milecki.pl><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +Date: Sun, 2 Jul 2017 22:28:24 +0200<br /> +Subject: [PATCH 2/3] firmware-utils: mktplinkfw2: fix support<br /> +for -w option<br /> +MIME-Version: 1.0<br /> +Content-Type: text/plain; charset=UTF-8<br /> +Content-Transfer-Encoding: 8bit<br /> +<br /> +This fixes copy & paste typo when reading -w argument.<br /> +<br /> +Fixes: 4b35e174caa5b ("firmware-utils: mktplinkfw2: support<br /> +additional hardware version")<br /> +Signed-off-by: Rafał Miłecki <rafal@milecki.pl><br /> +---<br /> + tools/firmware-utils/src/mktplinkfw2.c | 2 +-<br /> + 1 file changed, 1 insertion(+), 1 deletion(-)<br /> +<br /> +diff --git a/tools/firmware-utils/src/mktplinkfw2.c<br /> +b/tools/firmware-utils/src/mktplinkfw2.c<br /> +index b6dd670b90..4efe06acf3 100644<br /> +--- a/tools/firmware-utils/src/mktplinkfw2.c<br /> ++++ b/tools/firmware-utils/src/mktplinkfw2.c<br /> +@@ -412,7 +412,7 @@ static int check_options(void)<br /> +    hw_rev = 1;<br /> +<br /> +   if (opt_hw_ver_add)<br /> +-   hw_ver_add = strtoul(opt_hw_rev, NULL, 0);<br /> ++   hw_ver_add = strtoul(opt_hw_ver_add,<br /></blockquote></blockquote></blockquote></blockquote> NULL, 0);<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +   else<br /> +    hw_ver_add = 0;<br /> +  }<br /> +--<br /> +2.11.0 (Apple Git-81)<br /> +<br /> diff --git<br /> a/build_patches/openwrt/0015-firmware-utils-mktplinkfw2-fix-<br /> MD5-salt.patch<br /> b/build_patches/openwrt/0015-firmware-utils-mktplinkfw2-<br /> fix-MD5-salt.patch<br /> new file mode 100644<br /> index 0000000..a0e14df<br /> --- /dev/null<br /> +++ b/build_patches/openwrt/0015-firmware-utils-mktplinkfw2-fix-<br /></blockquote></blockquote></blockquote></blockquote> MD5<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +++ -<br /> salt<br /> +++ .patch<br /> @@ -0,0 +1,68 @@<br /> +From 2f7382a3b9ae90e67980f0baedeb7f3109cfc0a6 Mon Sep 17<br /></blockquote></blockquote></blockquote></blockquote> 00:00:00<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> 2001<br /> +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> <rafal@milecki.pl><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +Date: Sun, 2 Jul 2017 17:06:58 +0200<br /> +Subject: [PATCH 3/3] firmware-utils: mktplinkfw2: fix MD5 salt<br /> +MIME-Version: 1.0<br /> +Content-Type: text/plain; charset=UTF-8<br /> +Content-Transfer-Encoding: 8bit<br /> +<br /> +LEDE supports few devices using TP-Link firmware format (V2 or<br /></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote> V3):<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +ArcherC20i, ArcherC50, ArcherMR200, TDW8970, TDW8980, TL-<br /></blockquote></blockquote></blockquote></blockquote> WR840N<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> v4,<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> +TL-WR841N v13 and VR200v<br /> +<br /> +Testing mktplinkfw2 tool with official (vendor generated)<br /> +firmware files for above devices has shown an error when<br /> +comparing calculated and included MD5 sum, e.g.:<br /> +> mktplinkfw2 -i<br /> +> Arche</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></pre></blockquote></div></body></html>