diff options
author | Vincent Wiemann <vincent.wiemann@ironai.com> | 2019-08-13 01:26:45 +0200 |
---|---|---|
committer | Piotr Dymacz <pepe2k@gmail.com> | 2019-11-26 17:28:37 +0100 |
commit | 83a18aefbdead8088f693917174ff01b8ae33650 (patch) | |
tree | da9666ba52208a34fb03e60aad8013aa2f0b2fef /target/linux/ath79 | |
parent | 449433d13104e7f09b9e4f75197469ec90647da3 (diff) | |
download | upstream-83a18aefbdead8088f693917174ff01b8ae33650.tar.gz upstream-83a18aefbdead8088f693917174ff01b8ae33650.tar.bz2 upstream-83a18aefbdead8088f693917174ff01b8ae33650.zip |
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: Vincent Wiemann <vincent.wiemann@ironai.com>
[pepe2k@gmail.com: commit description reworded, recipe renamed]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
(cherry picked from commit 8016f648640e8f73f0dc4fc307fb6bebd12afb88)
Diffstat (limited to 'target/linux/ath79')
-rw-r--r-- | target/linux/ath79/image/common-yuncore.mk | 12 | ||||
-rw-r--r-- | target/linux/ath79/image/generic.mk | 3 |
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 5a56a4760e..fd931a64c7 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1,5 +1,6 @@ include ./common-buffalo.mk include ./common-netgear.mk +include ./common-yuncore.mk DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK @@ -717,6 +718,8 @@ define Device/yuncore_a770 DEVICE_TITLE := 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 endef TARGET_DEVICES += yuncore_a770 |