aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2016-07-18 19:39:57 +0200
committerStijn Tintel <stijn@linux-ipv6.be>2016-10-27 01:50:42 +0300
commite3875350f3e4185020b64e0588bba521cd1d6e64 (patch)
tree55110b8007ef6e10d14fc858b3f4c32bf08b1ca7 /target/linux/ar71xx/base-files
parent6b0d279ca58bf6173b57c7e9b759be4552eab74a (diff)
downloadupstream-e3875350f3e4185020b64e0588bba521cd1d6e64.tar.gz
upstream-e3875350f3e4185020b64e0588bba521cd1d6e64.tar.bz2
upstream-e3875350f3e4185020b64e0588bba521cd1d6e64.zip
ar71xx: add support for D-Link DAP-2695 rev. A1
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ar71xx/base-files')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/01_leds5
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata4
-rw-r--r--target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum9
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh3
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh13
6 files changed, 37 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 9734189fd5..a32ca9101e 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -174,6 +174,11 @@ rb-2011uias-2hnd)
ucidef_set_led_switch "eth9" "ETH9" "rb:green:eth9" "switch1" "0x04"
ucidef_set_led_switch "eth10" "ETH10" "rb:green:eth10" "switch1" "0x02"
;;
+dap-2695-a1)
+ ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
+ ucidef_set_led_default "diag" "DIAG" "d-link:red:power" "0"
+ ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "d-link:green:wlan2g" "phy1tpt"
+ ;;
dhp-1565-a1)
ucidef_set_led_switch "wan" "WAN" "d-link:green:planet" "switch0" "0x20"
;;
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 35a7407ef7..1cb6b4c292 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -230,6 +230,9 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
+ dap-2695-a1)
+ ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1"
+ ;;
db120|\
rb-2011l|\
rb-2011uas|\
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 322998d2cf..5a48b06a36 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -47,6 +47,10 @@ board=$(ar71xx_board_name)
case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin")
case $board in
+ dap-2695-a1)
+ ath10kcal_extract "radiocfg" 20480 2116
+ ath10kcal_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
+ ;;
dlan-pro-1200-ac)
ath10kcal_extract "art" 20480 2116
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
index 1bfd5253eb..057afe0193 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-checksum
@@ -11,9 +11,18 @@ fixtrx() {
mtd -o 32 fixtrx firmware
}
+fixwrgg() {
+ local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
+
+ [ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
+}
+
case "$board" in
mynet-rext |\
wrt160nl)
fixtrx
;;
+dap-2695-a1)
+ fixwrgg
+ ;;
esac
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index fb375a5e15..f51d7db9c1 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -511,6 +511,9 @@ ar71xx_board_detect() {
*CR5000)
name="cr5000"
;;
+ *"DAP-2695 rev. A1")
+ name="dap-2695-a1"
+ ;;
*"DB120 reference board")
name="db120"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 46f014306f..9c0f3f3bc5 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -105,6 +105,10 @@ seama_get_type_magic() {
get_image "$@" | dd bs=1 count=4 skip=53 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
}
+wrgg_get_image_magic() {
+ get_image "$@" | dd bs=4 count=1 skip=8 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
+}
+
cybertan_get_image_magic() {
get_image "$@" | dd bs=8 count=1 skip=0 2>/dev/null | hexdump -v -n 8 -e '1/1 "%02x"'
}
@@ -531,6 +535,15 @@ platform_check_image() {
return 0
;;
+ dap-2695-a1)
+ local magic=$(wrgg_get_image_magic "$1")
+ [ "$magic" != "21030820" ] && {
+ echo "Invalid image, bad type: $magic"
+ return 1
+ }
+
+ return 0;
+ ;;
esac
echo "Sysupgrade is not yet supported on $board."