0070-ar71xx-backport-support-for-new-TP-Link-region-codes.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sun, 28 Aug 2016 20:38:58 +0200
  3. Subject: ar71xx: backport support for new TP-Link region codes
  4. Generate flashable images for the Archer C7 v2 with current stock firmware
  5. again.
  6. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  7. index 868a5021acb49878359497c90509de07faa3ca49..95f6d46d15b43faabb0bbf9301476d3ea5bee470 100644
  8. --- a/target/linux/ar71xx/image/Makefile
  9. +++ b/target/linux/ar71xx/image/Makefile
  10. @@ -58,13 +58,14 @@ define Build/mktplinkfw
  11. -o $@.new \
  12. -j -X 0x40000 \
  13. -a $(call rootfs_align,$(FILESYSTEM)) \
  14. - $(if $(findstring sysupgrade,$1),-s) && mv $@.new $@ || rm -f $@
  15. + $(wordlist 2,$(words $(1)),$(1)) \
  16. + $(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
  17. endef
  18. # -c combined image
  19. define Build/mktplinkfw-initramfs
  20. $(STAGING_DIR_HOST)/bin/mktplinkfw \
  21. - -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \
  22. + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \
  23. -k $@ \
  24. -o $@.new \
  25. -s -S \
  26. @@ -300,6 +301,9 @@ define Device/archer-c7-v2
  27. BOARDNAME := ARCHER-C7
  28. DEVICE_PROFILE := ARCHERC7
  29. TPLINK_HWID := 0xc7000002
  30. + IMAGES := sysupgrade.bin factory.bin factory-us.bin factory-eu.bin
  31. + IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
  32. + IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
  33. endef
  34. TARGET_DEVICES += archer-c5 archer-c7-v1 archer-c7-v2