aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath79/image/common-yuncore.mk12
-rw-r--r--target/linux/ath79/image/generic.mk3
2 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ath79/image/common-yuncore.mk b/target/linux/ath79/image/common-yuncore.mk
new file mode 100644
index 0000000000..a71d930d80
--- /dev/null
+++ b/target/linux/ath79/image/common-yuncore.mk
@@ -0,0 +1,12 @@
+define Build/yuncore-tftp-header-16m
+ ( \
+ echo -n -e \
+ "YUNCOREsetenv bootcmd \"bootm 0x9f050000 || bootm 0x9fe80000\"" \
+ "&& saveenv" \
+ "&& erase 0x9f050000 +0xfa0000" \
+ "&& cp.b 0x800600c0 0x9f050000 0xfa0000" |\
+ dd bs=192 count=1 conv=sync; \
+ dd if=$@; \
+ ) > $@.new
+ mv $@.new $@
+endef
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 2396219b00..0c674cfe9a 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1,6 +1,7 @@
include ./common-buffalo.mk
include ./common-netgear.mk
include ./common-tp-link.mk
+include ./common-yuncore.mk
DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION
DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
@@ -1034,6 +1035,8 @@ define Device/yuncore_a770
DEVICE_MODEL := A770
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
IMAGE_SIZE := 16000k
+ IMAGES += tftp.bin
+ IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m
endef
TARGET_DEVICES += yuncore_a770