diff options
author | John Crispin <blogic@openwrt.org> | 2014-12-13 08:06:01 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-12-13 08:06:01 +0000 |
commit | f92575ace53069edc1ae116c78353d2b64aa9791 (patch) | |
tree | cbad467e4ed5ff1476d8587c77efbec793b18f46 /target/linux/ar71xx/base-files | |
parent | 28619490eee769a392c0ea11188b99dc5aa10a53 (diff) | |
download | master-187ad058-f92575ace53069edc1ae116c78353d2b64aa9791.tar.gz master-187ad058-f92575ace53069edc1ae116c78353d2b64aa9791.tar.bz2 master-187ad058-f92575ace53069edc1ae116c78353d2b64aa9791.zip |
ar71xx: add an extra check on board_name for ath10k firmware patchs
It moves firmware patch code behind an extra check on board_name.
Otherwise it will calculate firmware checksum for unaffected boards.
It also reduce boottime by a md5 calculation and removes error message
on boot if firmware not found.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43679 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/base-files')
-rw-r--r-- | target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k b/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k index c5c60efd57..0455ecbcd9 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k +++ b/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k @@ -3,13 +3,13 @@ . /lib/functions/system.sh . /lib/ar71xx.sh -firmware_file="/lib/firmware/ath10k/QCA988X/hw2.0/firmware-3.bin" -firmware_md5_orig="5163aa8de591f80b06c77f22e9777473" -firmware_md5_current="$(md5sum $firmware_file)" -firmware_md5_current="${firmware_md5_current%% *}" - do_patch_ath10k_firmware() { + local firmware_file="/lib/firmware/ath10k/QCA988X/hw2.0/firmware-3.bin" + local firmware_md5_orig="5163aa8de591f80b06c77f22e9777473" + local firmware_md5_current="$(md5sum $firmware_file)" + local firmware_md5_current="${firmware_md5_current%% *}" + # verify md5sum before patching [ "firmware_md5_orig" != "firmware_md5_current" ] || { return @@ -34,4 +34,12 @@ do_patch_ath10k_firmware() { rm /tmp/ath10k-firmware.bin } -boot_hook_add preinit_main do_patch_ath10k_firmware +check_patch_ath10k_firmware() { + case $(ar71xx_board_name) in + dgl-5500-a1) + do_patch_ath10k_firmware + ;; + esac +} + +boot_hook_add preinit_main check_patch_ath10k_firmware |