aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/common-tp-link.mk
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/image/common-tp-link.mk')
-rw-r--r--target/linux/ath79/image/common-tp-link.mk20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk
index 7490aeb1f3..1dd36ef525 100644
--- a/target/linux/ath79/image/common-tp-link.mk
+++ b/target/linux/ath79/image/common-tp-link.mk
@@ -39,6 +39,14 @@ define Build/mktplinkfw-combined
@mv $@.new $@
endef
+define Build/uImageArcher
+ mkimage -A $(LINUX_KARCH) \
+ -O linux -T kernel \
+ -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
+ -n '$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $@ $@.new
+ @mv $@.new $@
+endef
+
define Device/tplink
TPLINK_HWREV := 0x1
TPLINK_HEADER_VERSION := 1
@@ -88,3 +96,15 @@ define Device/tplink-16mlzma
TPLINK_FLASHLAYOUT := 16Mlzma
IMAGE_SIZE := 15872k
endef
+
+define Device/tplink-safeloader
+ $(Device/tplink)
+ KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header
+ IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
+ IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
+endef
+
+define Device/tplink-safeloader-uimage
+ $(Device/tplink-safeloader)
+ KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma
+endef