Commit 8016f648 authored by Vincent Wiemann's avatar Vincent Wiemann Committed by Piotr Dymacz

ath79: add support for YunCore TFTP image generation

YunCore QCA9k based devices released in 2019 require a custom TFTP image
for U-Boot built-in recovery mode (triggered with reset button). Image
has to be prepended with 'YUNCORE' keyword followed by U-Boot CLI
commands which will be executed later. Images without the custom header
will be ignored by U-Boot.

To be able to support both the vendor firmware (QSDK) and OpenWrt flash
layouts, used here commands change the 'bootcmd' before flashing image.

This commit adds generic helper script for YunCore devices with 16 MB of
flash and enables TFTP image generation for A770 model.
Signed-off-by: default avatarVincent Wiemann <>
[ commit description reworded, recipe renamed]
Signed-off-by: default avatarPiotr Dymacz <>
parent c543dfe4
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=$@; \
) > $
mv $ $@
include ./
include ./
include ./
include ./
......@@ -1034,6 +1035,8 @@ define Device/yuncore_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
TARGET_DEVICES += yuncore_a770
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment