aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/tp-link.mk
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2017-05-31 16:31:44 +0200
committerPiotr Dymacz <pepe2k@gmail.com>2017-06-11 21:22:46 +0200
commitc00fb14329aebfcd927c22f1858a88ae49a58a16 (patch)
treedeb44aaf4a7e7993e6ddf7245e72496414521bb0 /target/linux/ar71xx/image/tp-link.mk
parent3a3cd0ac4376657eccfe30fc2fdcc91acddb8f1d (diff)
downloadupstream-c00fb14329aebfcd927c22f1858a88ae49a58a16.tar.gz
upstream-c00fb14329aebfcd927c22f1858a88ae49a58a16.tar.bz2
upstream-c00fb14329aebfcd927c22f1858a88ae49a58a16.zip
ar71xx: image: keep custom Build/* functions in separate files
Most of the custom Build/* functions in ar71xx target are rarely used by image building code for devices from more than one subtarget. As they don't need to be always included, move them to corresponding *.mk files. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target/linux/ar71xx/image/tp-link.mk')
-rw-r--r--target/linux/ar71xx/image/tp-link.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
index 2d64846cc8..26ac6dad0b 100644
--- a/target/linux/ar71xx/image/tp-link.mk
+++ b/target/linux/ar71xx/image/tp-link.mk
@@ -1,4 +1,18 @@
-DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION TPLINK_BOARD_NAME
+DEVICE_VARS += LOADER_FLASH_OFFS TPLINK_BOARD_NAME TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION TPLINK_HWID TPLINK_HWREV
+
+define Build/copy-file
+ cat "$(1)" > "$@"
+endef
+
+define Build/loader-okli
+ dd if=$(KDIR)/loader-$(1).gz bs=7680 conv=sync of="$@.new"
+ cat "$@" >> "$@.new"
+ mv "$@.new" "$@"
+endef
+
+define Build/loader-okli-compile
+ $(call Build/loader-common,FLASH_OFFS=$(LOADER_FLASH_OFFS) FLASH_MAX=0 KERNEL_CMDLINE="$(CMDLINE)")
+endef
# combine kernel and rootfs into one image
# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>