aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-07-10 19:16:23 +0000
committerJohn Crispin <blogic@openwrt.org>2014-07-10 19:16:23 +0000
commit8b5f2129984c6c31d2a9fe74733cdc553dba68fc (patch)
tree68aa2512d93d516023a10be66c9722041a49090c
parent9de9667c6ec9cd6168a82e62e190b7dc5a1fa10e (diff)
downloadupstream-8b5f2129984c6c31d2a9fe74733cdc553dba68fc.tar.gz
upstream-8b5f2129984c6c31d2a9fe74733cdc553dba68fc.tar.bz2
upstream-8b5f2129984c6c31d2a9fe74733cdc553dba68fc.zip
ar71xx: nbg6716: extract ath10k wifi board.bin
With help of this script the ath10k board.bin settings are loaded from flash and saved to the ath10k firmware directory. The driver reads it later in the boot process. Signed-off-by: André Valentin <avalentin@marcant.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41562 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin23
1 files changed, 23 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
new file mode 100644
index 0000000000..1e1466cac3
--- /dev/null
+++ b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+. /lib/ar71xx.sh
+
+do_load_ath10k_board_bin() {
+ # load board.bin
+ case $(ar71xx_board_name) in
+ nbg6716)
+ dd if=/dev/mtdblock2 \
+ bs=1 skip=20480 count=2116 \
+ of=/tmp/ath10k-board.bin
+ ;;
+ esac
+ [ -f /tmp/ath10k-board.bin ] || {
+ return
+ }
+ cmp -s /tmp/ath10k-board.bin /lib/firmware/ath10k/QCA988X/hw2.0/board.bin || {
+ cp /tmp/ath10k-board.bin /lib/firmware/ath10k/QCA988X/hw2.0/board.bin
+ rm /tmp/ath10k-board.bin
+ }
+}
+
+boot_hook_add preinit_main do_load_ath10k_board_bin