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>
SVN-Revision: 41562
--- /dev/null
+#!/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