From f8f66785748ea3f3ae049a836b14c5c24880b67c Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 10 Jul 2014 19:16:23 +0000 Subject: [PATCH] ar71xx: nbg6716: extract ath10k wifi board.bin MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 SVN-Revision: 41562 --- .../lib/preinit/81_load_ath10k_board_bin | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin 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 -- 2.30.2