You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.2 KiB
Bash
38 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
. /lib/ar71xx.sh
|
|
|
|
do_load_ath10k_board_bin() {
|
|
local board=$(ar71xx_board_name)
|
|
local mtdblock=$(find_mtd_part art)
|
|
|
|
[ -n "$mtdblock" ] || return
|
|
|
|
local dir="/lib/firmware/ath10k/QCA988X/hw2.0"
|
|
local cal_data_path="/tmp"
|
|
|
|
# load board.bin
|
|
case "$board" in
|
|
ap152)
|
|
mkdir -p ${dir}
|
|
dd if=${mtdblock} of=${dir}/board.bin \
|
|
bs=1 skip=20480 count=2116
|
|
mkdir -p ${cal_data_path}
|
|
dd if=${mtdblock} of=${cal_data_path}/wifi0.caldata bs=32 count=377 skip=128
|
|
dd if=${mtdblock} of=${cal_data_path}/wifi1.caldata bs=32 count=377 skip=640
|
|
;;
|
|
dlan-pro-1200-ac | dlan-pro-1200-n | dvl-1750c | dlan-1000-ac | dlan-550-wifi | \
|
|
ap147 | ap151 | ap135 | ap137 | ap135-020 | ap147-010 | apjet01 )
|
|
mkdir -p ${cal_data_path}
|
|
dd if=${mtdblock} of=${cal_data_path}/wifi0.caldata bs=32 count=377 skip=128
|
|
dd if=${mtdblock} of=${cal_data_path}/wifi1.caldata bs=32 count=377 skip=640
|
|
;;
|
|
*)
|
|
echo "Support to copy caldata is not there for $board"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
boot_hook_add preinit_main do_load_ath10k_board_bin
|
|
boot_hook_add initramfs do_load_ath10k_board_bin
|