diff options
Diffstat (limited to 'target/linux/lantiq/base-files')
4 files changed, 40 insertions, 5 deletions
diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 0426fb18e6..4476a7eb43 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -53,6 +53,10 @@ bt,homehub-v5a) netgear,dm200) ucidef_set_led_netdev "lan" "lan" "dm200:green:lan" "eth0" ;; +avm,fritz3370-rev2-hynix|\ +avm,fritz3370-rev2-micron) + ucidef_set_led_switch "lan" "LAN" "fritz3370:green:lan" "switch0" "0x17" + ;; avm,fritz7320) ucidef_set_led_netdev "wifi" "wifi" "fritz7320:green:wlan" "wlan0" ;; diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network index ca974b071e..9da01d14cc 100755 --- a/target/linux/lantiq/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/base-files/etc/board.d/02_network @@ -135,10 +135,13 @@ lantiq,easy80920-nand|lantiq,easy80920-nor) "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" ;; -avm,fritz3370) +avm,fritz3370-rev2-hynix|\ +avm,fritz3370-rev2-micron) annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2439)" 1) - ucidef_set_interface_lan 'eth0' + lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) + wan_mac=$(macaddr_add "$lan_mac" 3) + ucidef_add_switch "switch0" \ + "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" ;; avm,fritz7320) diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 498a509012..75b763076e 100644 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -47,6 +47,24 @@ ath9k_eeprom_extract_raw() { ath9k_eeprom_die "failed to extract from $mtd" } +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_eeprom_extract() { local part=$1 local offset=$2 @@ -138,7 +156,11 @@ case "$FIRMWARE" in ath9k_eeprom_extract "calibration" 61440 0 ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot-env ethaddr) +2) 524 ;; - avm,fritz3370|avm,fritz7320|avm,fritz7360sl) + avm,fritz3370-rev2-hynix|\ + avm,fritz3370-rev2-micron) + ath9k_eeprom_extract_reverse "urlader" 5441 1088 + ;; + avm,fritz7320|avm,fritz7360sl) ath9k_eeprom_extract "urlader" 2437 0 ;; tplink,tdw8970|tplink,tdw8980) diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh index 2e58cb799a..ecbb939e36 100755 --- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh @@ -9,7 +9,13 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in - bt,homehub-v2b|bt,homehub-v3a|bt,homehub-v5a|zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3) + avm,fritz3370-rev2-hynix|\ + avm,fritz3370-rev2-micron|\ + bt,homehub-v2b|\ + bt,homehub-v3a|\ + bt,homehub-v5a|\ + zyxel,p-2812hnu-f1|\ + zyxel,p-2812hnu-f3) nand_do_upgrade $1 ;; *) |