summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2014-07-19 13:20:14 +0000
committerImre Kaloz <kaloz@openwrt.org>2014-07-19 13:20:14 +0000
commit7e2c4d573296f57fee914f3904f29a4bdfed92f2 (patch)
treeba20bb8c3a55b318e8399d66cc2041b3d7cc8ea9 /target/linux/ar71xx
parent988e29e5add72049a00bc2dbf4d265f935594231 (diff)
downloadmtk-20170518-7e2c4d573296f57fee914f3904f29a4bdfed92f2.zip
mtk-20170518-7e2c4d573296f57fee914f3904f29a4bdfed92f2.tar.gz
mtk-20170518-7e2c4d573296f57fee914f3904f29a4bdfed92f2.tar.bz2
extract and fixup the board.bin on the archer
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 41757
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
index 1e1466c..14e1913 100644
--- a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
+++ b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
@@ -1,5 +1,6 @@
#!/bin/sh
+. /lib/functions/system.sh
. /lib/ar71xx.sh
do_load_ath10k_board_bin() {
@@ -10,6 +11,18 @@ do_load_ath10k_board_bin() {
bs=1 skip=20480 count=2116 \
of=/tmp/ath10k-board.bin
;;
+ archer-c7)
+ local mac
+ mac=$(macaddr_add $(cat /sys/class/net/eth1/address) -2)
+
+ dd if=/dev/mtdblock4 \
+ bs=1 skip=20480 count=6 \
+ of=/tmp/ath10k-board.bin
+ macaddr_2bin $mac >> /tmp/ath10k-board.bin
+ dd if=/dev/mtdblock4 \
+ bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
+
+ ;;
esac
[ -f /tmp/ath10k-board.bin ] || {
return