diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2014-11-27 14:27:34 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2014-11-27 14:27:34 +0000 |
commit | 974f286261065f972e4af9065e84e5a8c94942cc (patch) | |
tree | a5359120715ed556e5a9f3fe8dd5caf940b5aa25 /target/linux/ar71xx/base-files | |
parent | 200c30b42602a4e1e9444942ea0dc5006f272b8c (diff) | |
download | upstream-974f286261065f972e4af9065e84e5a8c94942cc.tar.gz upstream-974f286261065f972e4af9065e84e5a8c94942cc.tar.bz2 upstream-974f286261065f972e4af9065e84e5a8c94942cc.zip |
add D-link DGL-5500 A1 support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 43401
Diffstat (limited to 'target/linux/ar71xx/base-files')
5 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index e39a2b9312..c022013f8f 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -49,6 +49,7 @@ get_status_led() { db120) status_led="db120:green:status" ;; + dgl-5500-a1 |\ dhp-1565-a1|\ dir-505-a1 |\ dir-600-a1 |\ diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 3287e6ce12..e205fd514c 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -248,6 +248,7 @@ wzr-hp-g300nh) ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t" ;; +dgl-5500-a1 |\ dir-825-c1) local mac ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index a802258817..483a8ded87 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -342,6 +342,9 @@ ar71xx_board_detect() { *"DB120 reference board") name="db120" ;; + *"DGL-5500 rev. A1") + name="dgl-5500-a1" + ;; *"DHP-1565 rev. A1") name="dhp-1565-a1" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k b/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k new file mode 100644 index 0000000000..c5c60efd57 --- /dev/null +++ b/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k @@ -0,0 +1,37 @@ +#!/bin/sh + +. /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() { + # verify md5sum before patching + [ "firmware_md5_orig" != "firmware_md5_current" ] || { + return + } + + # some boards have bogus mac in otp, patch the default mac in the firmware + case $(ar71xx_board_name) in + dgl-5500-a1) + local mac + mac=$(mtd_get_mac_ascii nvram wlan1_mac) + + cp $firmware_file /tmp/ath10k-firmware.bin + macaddr_2bin $mac | dd of=/tmp/ath10k-firmware.bin \ + conv=notrunc bs=1 seek=280 count=6 + + ;; + esac + [ -f /tmp/ath10k-firmware.bin ] || { + return + } + cp /tmp/ath10k-firmware.bin $firmware_file + rm /tmp/ath10k-firmware.bin +} + +boot_hook_add preinit_main do_patch_ath10k_firmware diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 6a85d01df3..2e5b0dd90a 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -194,6 +194,7 @@ platform_check_image() { ap81 | \ ap83 | \ ap132 | \ + dgl-5500-a1 |\ dhp-1565-a1 |\ dir-505-a1 | \ dir-600-a1 | \ |