aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/etc
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2016-12-30 11:53:21 +0100
committerMathias Kresin <dev@kresin.me>2017-06-24 22:36:38 +0200
commite7cd6f5d66b827e31cfa7e7bc019ac1b86aac770 (patch)
tree2266d211229d5045d0ea8d4e998164641272a5b7 /target/linux/ar71xx/base-files/etc
parent0605b15be405ddaf9499e02f4b5a59ba406d2ccd (diff)
downloadupstream-e7cd6f5d66b827e31cfa7e7bc019ac1b86aac770.tar.gz
upstream-e7cd6f5d66b827e31cfa7e7bc019ac1b86aac770.tar.bz2
upstream-e7cd6f5d66b827e31cfa7e7bc019ac1b86aac770.zip
ar71xx: add AVM FRITZ!WLAN Repeater 300E support
Specifications: * SoC: AR7242 (Virian 400MHz) * RAM: 64 MB DDR (W9751G6JB-25) * Flash: 16MB SPI flash (S25FL129PIF) * WiFi: AR9382 (2.4/5GHz) + 2x SE2595L * LAN: 1x1000M (PEF7071V) To install LEDE via EVA bootloader, a FTP connection need to be established to 192.168.178.1 within the first seconds after power on: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put lede-ar71xx-generic-fritz300e-squashfs-sysupgrade.bin mtd1 Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ar71xx/base-files/etc')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/01_leds10
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/ar71xx/base-files/etc/diag.sh1
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom21
4 files changed, 36 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 87f99ea9d8..d80efefc34 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -242,6 +242,16 @@ ens202ext)
f9k1115v2)
ucidef_set_led_usbdev "usb2" "USB2" "belkin:green:usb2" "1-1"
;;
+fritz300e)
+ ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
+ ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+ ucidef_set_rssimon "wlan0" "200000" "1"
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:green:rssi0" "wlan0" "1" "100"
+ ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$board:green:rssi1" "wlan0" "20" "100"
+ ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$board:green:rssi2" "wlan0" "40" "100"
+ ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$board:green:rssi3" "wlan0" "60" "100"
+ ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:green:rssi4" "wlan0" "80" "100"
+ ;;
rb-750)
ucidef_set_led_default "act" "act" "rb750:green:act" "1"
ucidef_set_led_netdev "port1" "port1" "rb750:green:port1" "eth1"
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 80355d6160..9ff6dddd32 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -75,6 +75,7 @@ ar71xx_setup_interfaces()
eap300v2|\
eap7660d|\
el-mini|\
+ fritz300e|\
hiveap-121|\
loco-m-xw|\
mr12|\
@@ -518,6 +519,9 @@ ar71xx_setup_macs()
lan_mac=$(mtd_get_mac_binary caldata 0)
wan_mac=$(mtd_get_mac_binary caldata 6)
;;
+ fritz300e)
+ lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
+ ;;
tl-wr1043nd-v4)
wan_mac=$(mtd_get_mac_binary config 0x1017c)
;;
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index dce5d8e3cf..936a1148d0 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -54,6 +54,7 @@ get_status_led() {
archer-c25-v1|\
archer-c59-v1|\
archer-c60-v1|\
+ fritz300e|\
mr12|\
mr16|\
nbg6616|\
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 4db1b148a2..b4d7817569 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -40,6 +40,24 @@ ath9k_ubi_eeprom_extract() {
ath9k_eeprom_die "failed to extract from $ubi"
}
+ath9k_eeprom_extract_reverse() {
+ local part=$1
+ local offset=$2
+ local count=$3
+ local mtd
+ local reversed
+ local caldata
+
+ mtd=$(find_mtd_chardev "$part")
+ reversed=$(hexdump -v -s $offset -n $count -e '/1 "%02x "' $mtd)
+
+ for byte in $reversed; do
+ caldata="\x${byte}${caldata}"
+ done
+
+ printf "%b" "$caldata" > /lib/firmware/$FIRMWARE
+}
+
ath9k_patch_firmware_mac() {
local mac=$1
@@ -99,6 +117,9 @@ case "$FIRMWARE" in
ath9k_eeprom_extract "art" 20480 2048
ath9k_patch_firmware_mac $(macaddr_add $(mtd_get_mac_binary art 0) +2)
;;
+ fritz300e)
+ ath9k_eeprom_extract_reverse "urloader" 5441 1088
+ ;;
mr18)
. /lib/upgrade/nand.sh