|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. /lib/functions/system.sh
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
|
|
|
|
ath79_setup_interfaces()
|
|
|
|
{
|
|
|
|
local board="$1"
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
buffalo,whr-g301n)
|
|
|
|
ucidef_set_interface_wan "eth0"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
|
|
|
;;
|
ath79: add D-Link DIR-615 E4
Specifications:
- FCC ID: KA2IR615E3
- SoC: MIPS32 24K 400 MHz Atheros AR7240
- RAM: 32 MiB DDR SDRAM ESMT M13S2561616A-5T
- Flash: 4 MiB NOR SPI Macronix MX25L3208E
- Wireless: AR9287 2.4 GHz 802.11n 2T2R, 2x RP-SMA connectors
- Ethernet: 5x 100BASE-TX Fast Ethernet
- LEDs: 9x GPIO, 1x ath9k
- Buttons: 2x tactile switches
- UART: 3.3 V, 115200 8n1
- USB: simple hardware modification required, 1x USB 1.1 Full Speed
Partitioning notes:
Vendor firmware (based on CameoAP99) defines two additional partitions:
"mac" @0x3b0000, size 0x10000 and "lp" @0x3c0000, size 0x30000.
The "mac" partition stores LAN MAC address and hardware board name.
However, the vendor firmware uses addresses from "nvram" partition, and
the board name is used only for informational purposes in the Web
interface (included in the pages' header), not affecting the firmware
image check.
The "lp" partition is supposed to contain a "language pack" (which can
be used to add an additional language support to the Web interface) and
is flashed separately, using the vendor firmware upgrade page.
Since these partitions are absolutely useless for OpenWrt and
overwriting them doesn't prevent downgrading to obsolete vendor
firmware, this patch appends the valueable space to "firmware".
Installation instructions:
- Upgrade from OpenWrt ar71xx with "sysupgrade -f -n"
or
- Upload as a firmware update via the vendor Web-interface
or
- Connect UART and use "loady" to upload and run OpenWrt initramfs
image, then sysupgrade from it (TFTP client doesn't work)
or
- Before powering up hold "reset" button and keep it pressed for about
15 seconds after, then access fail safe Web server on 192.168.0.1 (the
old uIP TCP/IP protocol stack is not compatible with modern Linux, the
kernel, so you'll need to use some other OS to do this). Can be
performed without a Web-browser too:
curl http://192.168.0.1/cgi/index \
-F Send=@openwrt-ath79-tiny-dlink_dir-615-e4-squashfs-factory.bin
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
|
|
|
dlink,dir-615-e4|\
|
|
|
|
netgear,wnr1000-v2|\
|
|
|
|
netgear,wnr2000-v3|\
|
|
|
|
netgear,wnr612-v2|\
|
|
|
|
on,n150r|\
|
|
|
|
tplink,tl-wr740n-v1|\
|
|
|
|
tplink,tl-wr740n-v3|\
|
|
|
|
tplink,tl-wr741-v1|\
|
|
|
|
tplink,tl-wr743nd-v1|\
|
|
|
|
tplink,tl-wr841-v5|\
|
|
|
|
tplink,tl-wr941-v4)
|
|
|
|
ucidef_set_interface_wan "eth0"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
|
|
|
;;
|
|
|
|
pqi,air-pen|\
|
|
|
|
tplink,tl-mr10u|\
|
|
|
|
tplink,tl-mr3020-v1|\
|
|
|
|
tplink,tl-mr3040-v2|\
|
|
|
|
tplink,tl-wa701nd-v1|\
|
|
|
|
tplink,tl-wa730re-v1|\
|
|
|
|
tplink,tl-wa801nd-v1|\
|
|
|
|
tplink,tl-wa801nd-v3|\
|
|
|
|
tplink,tl-wa801nd-v4|\
|
|
|
|
tplink,tl-wa830re-v1|\
|
|
|
|
tplink,tl-wa850re-v1|\
|
|
|
|
tplink,tl-wa850re-v2|\
|
|
|
|
tplink,tl-wa860re-v1|\
|
|
|
|
tplink,tl-wa901nd-v1|\
|
|
|
|
tplink,tl-wa901nd-v2|\
|
|
|
|
tplink,tl-wa901nd-v3|\
|
|
|
|
tplink,tl-wa901nd-v4|\
|
|
|
|
tplink,tl-wa901nd-v5|\
|
ath79: add support for TP-Link TL-WR802N V1 and V2
Specification:
- SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc)
- RAM: 32 MiB
- Storage: 4 MiB of Flash on board
- Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n
- Ethernet: 1x100M (port0)
Installation through OEM Web Interface:
- Connect to TL-WR802N by Ethernet or Wi-Fi
- Go to web interface:
[V1] http://192.168.0.1
[V2] http://192.168.0.254
Default user is "admin" & password is "admin".
On V2, there is no DHCP server running by default, so remember to set
IP manually.
- Go to "System Tools -> Firmware Upgrade"
- Browse for firmware:
[V1] "*.factory.bin"
[V2] "*.factory-us.bin" or "*.factory-eu.bin" for eu model
Web interface may complain if filename is too long. In such case,
rename .bin to something shorter.
- Click upgrade
Installation through tftp:
Note: T_OUT, T_IN and GND on the board must be connected to USB TTL
Serial Configuration 115200 8n1
- Boot the TL-WR802N
- When "Autobooting in 1 seconds" appears type "tpl" followed by enter
- Connect to the board Ethernet port
(IPADDR: 192.168.1.1, ServerIP: 192.168.1.10)
- tftpboot 0x80000000 <Firmware Image Name>
- Record the result of "printenv bootcmd"
- Enter "erase <Result of 'printenv bootcmd'> +0x3c0000"
(e.g erase 0x9f020000 +0x3c0000)
- Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000"
(e.g cp.b 0x80000000 0x9f020000 0x3c0000)
- Enter "bootm <Result of 'printenv bootcmd'>"
(e.g bootm 0x9f020000)
Notes:
When porting from ar71xx target to ath79, I found out that on V2,
reset button is on GPIO12 and active low, instead of GPIO11 and
active high. By cross-flashing V1 firmware to V2, I confirmed
the same is true for V1.
Also according to manual of V1, this one also has green
LED instead of blue - both of those issues were fixed accordingly.
The MAC address assignment has been checked with OEM firmware.
Installation manual based on ar71xx support by Thomas Roberts
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[slightly adjust commit message, add MAC address comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
|
|
|
tplink,tl-wr703n|\
|
|
|
|
tplink,tl-wr802n-v1|\
|
|
|
|
tplink,tl-wr802n-v2)
|
|
|
|
ucidef_set_interface_lan "eth0"
|
|
|
|
;;
|
|
|
|
tplink,tl-mr3220-v1|\
|
|
|
|
tplink,tl-mr3420-v1|\
|
|
|
|
tplink,tl-mr3420-v3|\
|
|
|
|
tplink,tl-wr841-v7|\
|
|
|
|
tplink,tl-wr841-v9|\
|
|
|
|
tplink,tl-wr841-v10|\
|
|
|
|
tplink,tl-wr841-v11|\
|
|
|
|
tplink,tl-wr841-v12|\
|
|
|
|
tplink,tl-wr940n-v3|\
|
|
|
|
tplink,tl-wr940n-v4|\
|
|
|
|
tplink,tl-wr940n-v6|\
|
|
|
|
tplink,tl-wr941nd-v6)
|
|
|
|
ucidef_set_interface_wan "eth1"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
|
|
|
;;
|
|
|
|
tplink,tl-mr3420-v2|\
|
|
|
|
tplink,tl-wr740n-v4|\
|
|
|
|
tplink,tl-wr740n-v5|\
|
|
|
|
tplink,tl-wr741nd-v4|\
|
|
|
|
tplink,tl-wr841-v8)
|
|
|
|
ucidef_set_interface_wan "eth1"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0@eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
|
|
|
|
;;
|
|
|
|
tplink,tl-wr941-v2)
|
|
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
|
|
|
;;
|
|
|
|
tplink,tl-wr941n-v7-cn)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
ath79_setup_macs()
|
|
|
|
{
|
|
|
|
local board="$1"
|
|
|
|
|
|
|
|
case "$board" in
|
ath79: add D-Link DIR-615 E4
Specifications:
- FCC ID: KA2IR615E3
- SoC: MIPS32 24K 400 MHz Atheros AR7240
- RAM: 32 MiB DDR SDRAM ESMT M13S2561616A-5T
- Flash: 4 MiB NOR SPI Macronix MX25L3208E
- Wireless: AR9287 2.4 GHz 802.11n 2T2R, 2x RP-SMA connectors
- Ethernet: 5x 100BASE-TX Fast Ethernet
- LEDs: 9x GPIO, 1x ath9k
- Buttons: 2x tactile switches
- UART: 3.3 V, 115200 8n1
- USB: simple hardware modification required, 1x USB 1.1 Full Speed
Partitioning notes:
Vendor firmware (based on CameoAP99) defines two additional partitions:
"mac" @0x3b0000, size 0x10000 and "lp" @0x3c0000, size 0x30000.
The "mac" partition stores LAN MAC address and hardware board name.
However, the vendor firmware uses addresses from "nvram" partition, and
the board name is used only for informational purposes in the Web
interface (included in the pages' header), not affecting the firmware
image check.
The "lp" partition is supposed to contain a "language pack" (which can
be used to add an additional language support to the Web interface) and
is flashed separately, using the vendor firmware upgrade page.
Since these partitions are absolutely useless for OpenWrt and
overwriting them doesn't prevent downgrading to obsolete vendor
firmware, this patch appends the valueable space to "firmware".
Installation instructions:
- Upgrade from OpenWrt ar71xx with "sysupgrade -f -n"
or
- Upload as a firmware update via the vendor Web-interface
or
- Connect UART and use "loady" to upload and run OpenWrt initramfs
image, then sysupgrade from it (TFTP client doesn't work)
or
- Before powering up hold "reset" button and keep it pressed for about
15 seconds after, then access fail safe Web server on 192.168.0.1 (the
old uIP TCP/IP protocol stack is not compatible with modern Linux, the
kernel, so you'll need to use some other OS to do this). Can be
performed without a Web-browser too:
curl http://192.168.0.1/cgi/index \
-F Send=@openwrt-ath79-tiny-dlink_dir-615-e4-squashfs-factory.bin
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
|
|
|
dlink,dir-615-e4)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii "nvram" "lan_mac")
|
|
|
|
wan_mac=$(mtd_get_mac_ascii "nvram" "wan_mac")
|
|
|
|
label_mac=$wan_mac
|
|
|
|
;;
|
|
|
|
tplink,tl-wr941-v2|\
|
|
|
|
tplink,tl-wr941n-v7-cn)
|
|
|
|
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
|
|
|
wan_mac=$(macaddr_add "$base_mac" 1)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
|
|
|
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
|
|
|
}
|
|
|
|
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
ath79_setup_interfaces $board
|
|
|
|
ath79_setup_macs $board
|
|
|
|
board_config_flush
|
|
|
|
|
|
|
|
exit 0
|