|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2011-2015 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
. /lib/functions/system.sh
|
|
|
|
. /lib/functions/lantiq.sh
|
|
|
|
|
|
|
|
board_config_update
|
|
|
|
|
|
|
|
annex="a"
|
|
|
|
|
|
|
|
lan_mac=""
|
|
|
|
wan_mac=""
|
|
|
|
|
|
|
|
board=$(board_name)
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
alphanetworks,asl56026)
|
lantiq: add support for the Alpha ASL56026
The ASL56026 is a VDSL2 router with dual 100mbit ethernet,
also known as the ECI B-FOCuS V-2FUb/I.
CPU: Lantiq XRX268 v1.1 at 333MHz
Modem: Lantiq VRX208
RAM: 32MiB DDR2 at 167MHz
Flash: 8MiB NOR, Spansion S29GL064N90TF04
UART is at JP1:
Pin 1 TX
Pin 2 GND
Pin 3 +3.3V
Pin 4 NC
Pin 5 RX
Boot selection pins are exposed via several resistor jumpers:
boot_sel0 is at J15, on the rear of the board. Default is high.
boot_sel1 is at J3, next to the flash - it is also the flash CE# pin. Default is low.
boot_sel2 is at J12, directly below the SoC. Default is low.
boot_sel3 is at J16, on the rear of the board. Default is low.
The boot_sel pins should never be shorted, the jumper must be moved or
a lower value resistor used to change the pull (existing resistors are 4k7, 1k should work)
To install with the stock bootloader you must break the built in image selection process
which uses at least the following vars: f_upgrade_addr, f_upgrade2_addr, loadaddr, kernel_addr, activeregion, committedregion
This is done by setting loadaddr and both f_upgrade_addr vars to the same address:
VR9 # setenv loadaddr 0xB0040000
VR9 # setenv f_upgrade_addr 0xB0040000
VR9 # setenv f_upgrade2_addr 0xB0040000
VR9 # saveenv
Then flash the firmware image:
VR9 # tftpboot 0x81000000 lede-lantiq-xrx200-ASL56026-squashfs-sysupgrade.bin
VR9 # erase B0040000 +${filesize}
VR9 # cp.b 0x81000000 0xB0040000 ${filesize}
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago
|
|
|
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii uboot_env wanmac)
|
|
|
|
ucidef_add_switch "switch0"\
|
|
|
|
"2:lan" "3:lan" "6t@eth0"
|
|
|
|
;;
|
|
|
|
arcadyan,arv7519rw22)
|
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0x16)" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:5" "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0"
|
|
|
|
;;
|
|
|
|
arcadyan,vg3503j)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
|
|
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan:2" "4:lan:1" "6t@eth0"
|
|
|
|
;;
|
|
|
|
arcadyan,vgv7510kw22-brn|\
|
|
|
|
arcadyan,vgv7510kw22-nor)
|
|
|
|
annex="b"
|
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 2)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0"
|
lantiq: add Netgear DM200 support
Netgear DM200 is an inexpensive VDSL modem:
CPU: VRX220 MIPS 34Kc 5.6 @ 500Mhz
RAM: 64MiB
Flash: 8MiB
Ethernet: 1x100M
DSL: VDSL2+, ADSL2+
reset button, 3x bi-color LEDs
Serial port is 115200 baud, on the 4 pin header; pins from the bottom to
top are GND, RX, TX.
To upgrade from the vendor firmware, upload factory.img
The DM200 bootloader supports flashing over TFTP; hold the reset button
while powering on the device, and wait for the power light to start
flashing green before releasing. The device is now listening on
192.168.0.1/24, and can be sent a factory.img or a netgear image with a
TFTP put.
Once the image is loaded, it will be written to the flash, and the
device will reboot; this will take a few minutes.
Thanks to Edward O'Callaghan and Baptiste Jonglez, who implemented their
own ports for this device and provided valuable feedback.
Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
7 years ago
|
|
|
;;
|
|
|
|
arcadyan,vgv7519-brn|\
|
|
|
|
arcadyan,vgv7519-nor)
|
|
|
|
wan_mac=$(mtd_get_mac_binary board_config 0x16)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
|
|
|
|
;;
|
|
|
|
avm,fritz3370-rev2-hynix|\
|
|
|
|
avm,fritz3370-rev2-micron)
|
|
|
|
annex="b"
|
|
|
|
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,fritz7360sl)
|
|
|
|
annex="b"
|
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 0xa91)" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
|
|
|
|
;;
|
|
|
|
avm,fritz7362sl)
|
|
|
|
annex="b"
|
|
|
|
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
|
|
|
|
wan_mac=$(fritz_tffs -n macdsl -i $(find_mtd_part "tffs (1)"))
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
|
|
|
|
;;
|
|
|
|
avm,fritz7412)
|
|
|
|
tffsdev=$(find_mtd_chardev "nand-tffs")
|
|
|
|
annex="b"
|
|
|
|
lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca -o)
|
|
|
|
wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl -o)
|
|
|
|
ucidef_set_interface_lan 'eth0'
|
|
|
|
;;
|
|
|
|
bt,homehub-v5a)
|
|
|
|
lan_mac=$(mtd_get_mac_binary_ubi caldata 0x110c)
|
|
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
|
|
|
|
;;
|
|
|
|
buffalo,wbmr-300hpd)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii ubootconfig ethaddr)
|
|
|
|
wan_mac="$lan_mac"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"5:lan:2" "2:lan:3" "3:lan:4" "4:wan:1" "6t@eth0"
|
|
|
|
;;
|
|
|
|
lantiq,easy80920-nand|\
|
|
|
|
lantiq,easy80920-nor)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
|
|
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
|
|
|
|
;;
|
|
|
|
netgear,dm200)
|
|
|
|
lan_mac=$(mtd_get_mac_binary ART 0x0)
|
|
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
|
|
ucidef_set_interface_lan 'eth0'
|
|
|
|
;;
|
|
|
|
tplink,tdw8970|\
|
|
|
|
tplink,tdw8980)
|
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:2" "2:lan:3" "4:lan:4" "5:lan:1" "6t@eth0"
|
|
|
|
;;
|
|
|
|
tplink,vr200|\
|
|
|
|
tplink,vr200v)
|
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 0xf100)" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0"
|
|
|
|
;;
|
|
|
|
zyxel,p-2812hnu-f1|\
|
|
|
|
zyxel,p-2812hnu-f3)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
|
|
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "1:lan" "2:lan" "4:lan" "5:wan" "6t@eth0"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ucidef_set_interface_lan 'eth0'
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
lantiq_setup_dsl_helper "$annex"
|
|
|
|
|
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
|
|
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
|
|
|
|
|
|
|
|
board_config_flush
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|