2009-10-23 16:51:51 +00:00
|
|
|
#!/bin/sh
|
2011-12-01 22:48:35 +00:00
|
|
|
|
2012-12-19 16:07:50 +00:00
|
|
|
. /lib/functions.sh
|
2015-12-11 15:26:06 +00:00
|
|
|
. /lib/functions/uci-defaults.sh
|
2014-07-23 07:49:50 +00:00
|
|
|
. /lib/functions/system.sh
|
2011-12-01 22:48:35 +00:00
|
|
|
|
2012-08-29 10:37:38 +00:00
|
|
|
ramips_setup_rt3x5x_vlans()
|
|
|
|
{
|
|
|
|
if [ ! -x /sbin/swconfig ]; then
|
|
|
|
# legacy default
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
local wanports=""
|
|
|
|
local lanports=""
|
|
|
|
for port in 5 4 3 2 1 0; do
|
2019-09-20 12:07:56 +00:00
|
|
|
if [ "$(swconfig dev rt305x port $port get disable)" = "1" ]; then
|
2012-08-29 10:37:38 +00:00
|
|
|
continue
|
|
|
|
fi
|
2019-09-20 12:07:56 +00:00
|
|
|
if [ "$(swconfig dev rt305x port $port get lan)" = "0" ]; then
|
2015-12-03 15:46:29 +00:00
|
|
|
wanports="$port:wan $wanports"
|
2012-08-29 10:37:38 +00:00
|
|
|
else
|
2015-12-03 15:46:29 +00:00
|
|
|
lanports="$port:lan $lanports"
|
2012-08-29 10:37:38 +00:00
|
|
|
fi
|
|
|
|
done
|
2016-10-12 17:04:08 +00:00
|
|
|
ucidef_add_switch "rt305x" $lanports $wanports "6t@eth0"
|
2012-08-29 10:37:38 +00:00
|
|
|
}
|
|
|
|
|
2011-12-01 22:48:43 +00:00
|
|
|
ramips_setup_interfaces()
|
|
|
|
{
|
|
|
|
local board="$1"
|
2011-12-01 22:48:35 +00:00
|
|
|
|
2011-12-01 22:48:43 +00:00
|
|
|
case $board in
|
2019-07-03 21:22:47 +00:00
|
|
|
accton,wr6202|\
|
|
|
|
alfa-network,w502u|\
|
|
|
|
netcore,nw718|\
|
|
|
|
petatel,psr-680w|\
|
|
|
|
skyline,sl-r7205|\
|
|
|
|
upvel,ur-336un)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
|
2015-01-08 20:25:55 +00:00
|
|
|
;;
|
2019-08-13 06:30:29 +00:00
|
|
|
adslr,g7|\
|
2019-07-03 21:22:47 +00:00
|
|
|
afoundry,ew1200|\
|
2019-07-03 21:22:02 +00:00
|
|
|
aigale,ai-br100|\
|
2017-10-14 08:44:39 +00:00
|
|
|
alfa-network,ac1200rm|\
|
2019-07-03 21:22:47 +00:00
|
|
|
asus,rt-n12p|\
|
|
|
|
buffalo,whr-g300n|\
|
|
|
|
d-team,pbr-m1|\
|
2019-07-03 21:22:19 +00:00
|
|
|
dlink,dir-300-b7|\
|
|
|
|
dlink,dir-320-b1|\
|
|
|
|
dlink,dir-610-a1|\
|
2019-07-03 21:22:02 +00:00
|
|
|
dlink,dir-810l|\
|
2018-01-20 08:27:03 +00:00
|
|
|
dlink,dwr-116-a1|\
|
2018-03-10 09:34:38 +00:00
|
|
|
dlink,dwr-921-c1|\
|
ramips: add support for DLINK DWR-922-E2
Very similar to the DWR-921-C1, except has a telephony/RJ11 port (not
sure if supported, I didn't try), wireless router with QMI LTE embedded
modem is based on the MT7620N SoC.
Specification:
* MediaTek MT7620N (580 Mhz)
* 64 MB of RAM
* 16 MB of FLASH
* 802.11bgn radio
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* 2x external, detachable (LTE) antennas
* UART header on PCB (57600 8n1)
* 6x LED (GPIO-controlled)
* 1x bi-color Signal Strength LED (GPIO-controlled)
* 2x button
* JBOOT bootloader
The status led has been assigned to the dwr-922-e2:green:signalstrength
(lte signal strength) led. At the end of the boot it is switched off and
is available for lte operation. Works correctly also during sysupgrade
operation.
Installation:
Apply factory image via d-link http web-gui, or via recovery interface:
How to recover/revert to OEM firmware:
1.) Push and hold the reset button and turn on the power. Wait until all
LEDs start rapidly blinking (~10sec.)
2.) DHCP should give you an IP in the 192.168.123.0/24 subnet, or set
one manually
3.) Upload original factory image via JBOOT http interface at IP
192.168.123.254
4.) If http doesn't work, it can be done with curl command:
curl -F FN=@XXXXX.bin http://192.168.123.254/upg
where XXXXX.bin is name of firmware file.
5.) You can optionally telnet to 192.168.123.254 before or during the
upload and it will report the flashing status, memory address etc.
6.) Once web UI and/or telnet says "Success", power cycle the router, or
type "reboot" into the telnet session.
Signed-off-by: Simon Quigley <squigley@squigley.net>
[squashed commits, word wrap commit message, rename signal strenght led
name to match what is used for the DWR-921-C1 since they share the led
configuration, add label referenced in the aliases node]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-12-20 16:47:52 +00:00
|
|
|
dlink,dwr-922-e2|\
|
2019-07-03 21:22:47 +00:00
|
|
|
edimax,3g-6200n|\
|
2019-07-03 21:22:08 +00:00
|
|
|
firefly,firewrt|\
|
2019-07-03 21:22:47 +00:00
|
|
|
hilink,hlk-rm04|\
|
2019-07-03 21:22:13 +00:00
|
|
|
hiwifi,hc5661a|\
|
2019-07-23 12:12:48 +00:00
|
|
|
hiwifi,hc5761a|\
|
2019-07-03 21:22:08 +00:00
|
|
|
hiwifi,hc5962|\
|
2019-07-03 21:22:47 +00:00
|
|
|
mediatek,ap-mt7621a-v60|\
|
2019-07-03 21:22:08 +00:00
|
|
|
mediatek,mt7621-eval-board|\
|
2019-07-03 21:22:13 +00:00
|
|
|
mediatek,mt7628an-eval-board|\
|
2019-07-03 21:22:47 +00:00
|
|
|
mercury,mac1200r-v2|\
|
2019-07-10 15:57:36 +00:00
|
|
|
mqmaker,witi|\
|
2018-11-29 23:13:53 +00:00
|
|
|
mtc,wr1201|\
|
2019-07-03 21:22:47 +00:00
|
|
|
netis,wf-2881|\
|
2019-07-03 21:22:19 +00:00
|
|
|
nixcore,x1-16m|\
|
2019-07-03 21:22:47 +00:00
|
|
|
nixcore,x1-8m|\
|
2019-07-03 21:22:02 +00:00
|
|
|
ohyeah,oy-0001|\
|
2019-07-03 21:22:47 +00:00
|
|
|
phicomm,k2p|\
|
2019-07-03 21:22:02 +00:00
|
|
|
phicomm,psg1208|\
|
|
|
|
phicomm,psg1218a|\
|
2019-07-03 21:22:47 +00:00
|
|
|
planex,db-wrt01|\
|
|
|
|
planex,mzk-750dhp|\
|
|
|
|
planex,mzk-w300nh2|\
|
|
|
|
planex,vr500|\
|
2019-07-03 21:22:08 +00:00
|
|
|
samknows,whitebox-v8|\
|
2019-07-03 21:22:47 +00:00
|
|
|
sanlinking,d240|\
|
|
|
|
storylink,sap-g3200u3|\
|
2019-04-19 04:12:11 +00:00
|
|
|
telco-electronics,x1|\
|
2019-06-25 15:32:20 +00:00
|
|
|
totolink,a7000r|\
|
2019-05-16 07:09:07 +00:00
|
|
|
totolink,lr1200|\
|
2018-11-27 23:31:10 +00:00
|
|
|
unielec,u7621-06-256m-16m|\
|
2018-10-24 14:23:20 +00:00
|
|
|
unielec,u7621-06-512m-64m|\
|
2018-10-22 15:21:16 +00:00
|
|
|
wavlink,wl-wn570ha1|\
|
2019-02-17 12:21:42 +00:00
|
|
|
wavlink,wl-wn575a3|\
|
2019-07-03 21:22:47 +00:00
|
|
|
xiaomi,miwifi-mini|\
|
|
|
|
xiaomi,miwifi-nano|\
|
2019-09-08 01:52:07 +00:00
|
|
|
xiaoyu,xy-c5|\
|
2019-07-03 21:22:47 +00:00
|
|
|
xzwifi,creativebox-v1|\
|
2019-03-11 16:21:58 +00:00
|
|
|
youku,yk-l2|\
|
2019-07-03 21:22:47 +00:00
|
|
|
youku,yk1|\
|
2019-07-03 21:22:02 +00:00
|
|
|
zbtlink,zbt-ape522ii|\
|
2019-07-03 21:22:08 +00:00
|
|
|
zbtlink,zbt-we1326|\
|
2017-12-01 07:10:24 +00:00
|
|
|
zbtlink,zbt-we3526|\
|
2019-07-03 21:22:02 +00:00
|
|
|
zbtlink,zbt-we826-16m|\
|
|
|
|
zbtlink,zbt-we826-32m|\
|
2019-07-03 21:22:47 +00:00
|
|
|
zbtlink,zbt-we826-e|\
|
2019-07-03 21:22:08 +00:00
|
|
|
zbtlink,zbt-wg2626|\
|
|
|
|
zbtlink,zbt-wg3526-16m|\
|
|
|
|
zbtlink,zbt-wg3526-32m|\
|
2019-07-03 21:22:47 +00:00
|
|
|
zbtlink,zbt-wr8305rt|\
|
|
|
|
zyxel,keenetic|\
|
|
|
|
zyxel,keenetic-omni)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-12-03 15:46:29 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
|
2015-08-17 06:02:59 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
airlink101,ar670w|\
|
|
|
|
airlink101,ar725w|\
|
|
|
|
asus,rt-ac51u|\
|
|
|
|
rakwireless,rak633)
|
2018-12-27 05:39:16 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
|
2018-12-27 05:39:16 +00:00
|
|
|
;;
|
2018-01-26 15:21:34 +00:00
|
|
|
alfa-network,awusfree1|\
|
ramips: add support for ALFA Network Tube-E4G
ALFA Network Tube-E4G is an outdoor, dual-SIM LTE Cat. 4 CPE, based on
MediaTek MT7620A, equipped with Quectel EC25 miniPCIe modem.
Specification:
- MT7620A (580 MHz)
- 64/128/256 MB of RAM (DDR2)
- 16/32 MB of flash (SPI NOR)
- 1x 10/100 Mbps Ethernet, with passive PoE support (24 V)
- 1x miniPCIe slot (with PCIe and USB 2.0 buses)
- 2x SIM slot (mini, micro) with detect and switch driven by GPIO
- 1x detachable antenna (modem main)
- 1x internal antenna (modem div)
- 1x GPS passive antenna (optional)
- 5x LED (all driven by GPIO)
- 1x button (reset)
- UART (4-pin, 2.54 mm pitch) header on PCB
Other:
Default SIM slot is selected at an early stage by U-Boot, based on
'default_sim' environment value: 1 or unset = SIM1 (mini), 2 = SIM2
(micro). U-Boot also resets the modem, using #PERST signal, before
starting kernel.
Flash instruction:
You can use the 'sysupgrade' image directly in vendor firmware which is
based on OpenWrt (make sure to not preserve settings - use 'sysupgrade
-n -F ...' command). Alternatively, use web recovery mode in U-Boot:
1. Power the device with reset button pressed, the LAN LED will start
blinking slowly and after ~3 seconds, when it starts blinking faster,
you can release the button.
2. Setup static IP 192.168.1.2/24 on your PC.
3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2019-03-10 00:28:28 +00:00
|
|
|
alfa-network,tube-e4g|\
|
2019-07-03 21:22:47 +00:00
|
|
|
buffalo,wli-tx4-ag300n|\
|
|
|
|
buffalo,wmr-300|\
|
2018-01-26 15:21:34 +00:00
|
|
|
dlink,dap-1522-a1|\
|
2019-07-03 21:22:02 +00:00
|
|
|
dlink,dch-m225|\
|
2019-07-03 21:22:47 +00:00
|
|
|
d-team,pbr-d1|\
|
|
|
|
elecom,wrh-300cr|\
|
|
|
|
huawei,d105|\
|
|
|
|
kimax,u25awf-h1|\
|
|
|
|
loewe,wmdr-143n|\
|
2019-07-03 21:22:02 +00:00
|
|
|
netgear,ex2700|\
|
|
|
|
netgear,ex3700|\
|
2019-07-03 21:22:47 +00:00
|
|
|
netgear,wn3000rp-v3|\
|
2019-07-03 21:22:16 +00:00
|
|
|
omnima,hpm|\
|
2019-07-03 21:22:47 +00:00
|
|
|
planex,cs-qr10|\
|
2019-07-03 21:22:02 +00:00
|
|
|
planex,mzk-ex300np|\
|
|
|
|
planex,mzk-ex750np|\
|
2018-05-23 21:19:47 +00:00
|
|
|
ravpower,wd03|\
|
2019-07-03 21:22:47 +00:00
|
|
|
sercomm,na930|\
|
2018-01-26 15:21:34 +00:00
|
|
|
tama,w06|\
|
2018-08-26 19:11:59 +00:00
|
|
|
tplink,tl-mr3020-v3|\
|
2019-07-03 21:22:47 +00:00
|
|
|
tplink,tl-wr802n-v4)
|
2018-01-26 15:21:34 +00:00
|
|
|
ucidef_set_interface_lan "eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
allnet,all0256n-4m|\
|
|
|
|
allnet,all0256n-8m|\
|
|
|
|
allnet,all5002|\
|
|
|
|
allnet,all5003|\
|
|
|
|
dlink,dcs-930l-b1|\
|
|
|
|
dlink,dcs-930|\
|
|
|
|
edimax,ew-7476rpc|\
|
|
|
|
edimax,ew-7478ac|\
|
|
|
|
hame,mpr-a2|\
|
|
|
|
hauppauge,broadway|\
|
|
|
|
hootoo,ht-tm02|\
|
|
|
|
intenso,memory2move|\
|
|
|
|
kimax,u35wf|\
|
|
|
|
mediatek,linkit-smart-7688|\
|
|
|
|
microduino,microwrt|\
|
|
|
|
mikrotik,rbm11g|\
|
|
|
|
netgear,wnce2001|\
|
|
|
|
onion,omega2p|\
|
|
|
|
onion,omega2|\
|
|
|
|
tenda,3g150b|\
|
|
|
|
tenda,3g300m|\
|
|
|
|
tenda,w150m|\
|
|
|
|
thunder,timecloud|\
|
|
|
|
tplink,tl-wa801nd-v5|\
|
|
|
|
unbranded,a5-v11|\
|
|
|
|
wansview,ncs601w|\
|
|
|
|
widora,neo-16m|\
|
|
|
|
widora,neo-32m|\
|
|
|
|
yukai,bocco|\
|
|
|
|
zbtlink,zbt-cpe102|\
|
|
|
|
zorlik,zl5900v2|\
|
|
|
|
zte,q7)
|
|
|
|
ucidef_add_switch "switch0"
|
|
|
|
ucidef_add_switch_attr "switch0" "enable" "false"
|
|
|
|
ucidef_set_interface_lan "eth0"
|
2015-01-17 14:06:13 +00:00
|
|
|
;;
|
2019-07-03 21:22:19 +00:00
|
|
|
alphanetworks,asl26555-8m|\
|
|
|
|
alphanetworks,asl26555-16m|\
|
2019-07-03 21:22:02 +00:00
|
|
|
asus,rp-n53)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-12-03 15:46:29 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
|
2012-01-24 11:48:47 +00:00
|
|
|
;;
|
2019-07-03 21:22:19 +00:00
|
|
|
argus,atp-52b|\
|
|
|
|
asiarf,awm002-evb-4m|\
|
|
|
|
asiarf,awm002-evb-8m|\
|
2019-07-11 15:15:48 +00:00
|
|
|
asus,rt-ac57u|\
|
2019-07-03 21:22:47 +00:00
|
|
|
asus,rt-n14u|\
|
2018-11-26 12:26:06 +00:00
|
|
|
bdcom,wap2100-sk|\
|
2019-07-03 21:22:16 +00:00
|
|
|
dlink,dir-645|\
|
2019-07-03 21:22:02 +00:00
|
|
|
glinet,gl-mt300a|\
|
|
|
|
glinet,gl-mt300n|\
|
|
|
|
glinet,gl-mt750|\
|
2019-05-05 02:54:52 +00:00
|
|
|
hilink,hlk-7628n|\
|
2019-08-07 00:58:48 +00:00
|
|
|
hiwifi,hc5661|\
|
2018-08-09 17:22:46 +00:00
|
|
|
hiwifi,hc5861b|\
|
2019-07-03 21:22:19 +00:00
|
|
|
jcg,jhr-n805r|\
|
|
|
|
jcg,jhr-n825r|\
|
|
|
|
jcg,jhr-n926r|\
|
2018-12-29 00:28:27 +00:00
|
|
|
mikrotik,rb750gr3|\
|
ramips: Add support for Mikrotik RouterBOARD RBM33g
This commit adds support for the Mikrotik RouterBOARD RBM33g.
=Hardware=
The RBM33g is a mt7621 based device featuring three gigabit ports, 2
miniPCIe slots with sim card sockets, 1 M.2 slot, 1 USB 3.0 port and a male
onboard RS-232 serial port. Additionally there are a lot of accessible
GPIO ports and additional buses like i2c, mdio, spi and uart.
==Switch==
The three Ethernet ports are all connected to the internal switch of the
mt7621 SoC:
port 0: Ethernet Port next to barrel jack with PoE printed on it
port 1: Innermost Ethernet Port on opposite side of RS-232 port
port 2: Outermost Ethernet Port on opposite side of RS-232 port
port 6: CPU
==Flash==
The device has two spi flash chips. The first flash chips is rather small
(512 kB), connected to CS0 by default and contains only the RouterBOOT
bootloader and some factory information (e.g. mac address).
The second chip has a size of 16 MB, is by default connected to CS1 and
contains the firmware image.
==PCIe==
The board features three PCIe-enabled slots. Two of them are miniPCIe
slots (PCIe0, PCIe1) and one is a M.2 (Key M) slot (PCIe2).
Each of the miniPCIe slots is connected to a dedicated mini SIM socket
on the back of the board.
Power to all three PCIe-enabled slots is controlled via GPIOs on the
mt7621 SoC:
PCIe0: GPIO9
PCIe1: GPIO10
PCIe2: GPIO11
==USB==
The board has one external USB 3.0 port at the rear. Additionally PCIe
port 0 has a permanently enabled USB interface. PCIe slot 1 shares its
USB interface with the rear USB port. Thus only either the rear USB port
or the USB interface of PCIe slot 1 can be active at the same time. The
jumper next to the rear USB port controls which one is active:
open: USB on PCIe 1 is active
closed: USB on rear USB port is active
==Power==
The board can accept both, passive PoE and external power via a 2.1 mm
barrel jack. The input voltage range is 11-32 V.
=Installation=
==Prerequisites==
A USB -> RS-232 Adapter and a null modem cable are required for
installation.
To install an OpenWRT image to the device two components must be built:
1. A openwrt initramfs image
2. A openwrt sysupgrade image
===initramfs & sysupgrade image===
Select target devices "Mikrotik RBM33G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" in the output
directory.
==Installing==
**Make sure to back up your RouterOS license in case you do ever want to
go back to RouterOS using "/system license output" and back up the created
license file.**
Serial settings: 115200 8N1
The installation is a two-step process. First the
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" must be booted
via tftp:
1. Set up a dhcp server that points the bootfile to tftp server serving
the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin"
initramfs image
2. Connect to WAN port (left side, next to sys-LED and power indicator)
3. Connect to serial port of board
4. Power on board and enter RouterBOOT setup menu
5. Set boot device to "boot over ethernet"
6. Set boot protocol to "dhcp protocol" (can be omitted if DHCP server
allows dynamic bootp)
6. Save config
7. Wait for board to boot via Ethernet
On the serial port you should now be presented with the OpenWRT boot log.
The next steps will install OpenWRT persistently.
1. Copy "openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" to the device
using scp.
2. Write openwrt to flash using "sysupgrade
openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin"
Once the flashing completes reboot the router and let it boot from flash.
It should boot straight to OpenWRT.
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
2018-05-04 01:47:23 +00:00
|
|
|
mikrotik,rbm33g|\
|
2019-07-03 21:22:19 +00:00
|
|
|
planex,mzk-wdpr|\
|
2018-11-26 21:03:05 +00:00
|
|
|
skylab,skw92a|\
|
2019-07-03 21:21:54 +00:00
|
|
|
tplink,archer-c20-v4|\
|
2019-07-03 21:22:47 +00:00
|
|
|
tplink,archer-c20i|\
|
2019-07-03 21:21:54 +00:00
|
|
|
tplink,archer-c50-v3|\
|
|
|
|
tplink,archer-c50-v4|\
|
2017-12-15 14:57:49 +00:00
|
|
|
tplink,tl-mr3420-v5|\
|
2019-07-03 21:22:13 +00:00
|
|
|
tplink,tl-wr840n-v4|\
|
|
|
|
tplink,tl-wr840n-v5|\
|
|
|
|
tplink,tl-wr841n-v13|\
|
2018-11-27 14:32:18 +00:00
|
|
|
tplink,tl-wr841n-v14|\
|
2019-07-03 21:22:47 +00:00
|
|
|
tplink,tl-wr842n-v5|\
|
2019-07-03 21:22:13 +00:00
|
|
|
unielec,u7628-01-128m-16m|\
|
2019-07-03 21:22:08 +00:00
|
|
|
ubiquiti,edgerouterx|\
|
|
|
|
ubiquiti,edgerouterx-sfp|\
|
2019-07-03 21:22:19 +00:00
|
|
|
upvel,ur-326n4g|\
|
2019-07-03 21:22:02 +00:00
|
|
|
wrtnode,wrtnode|\
|
2019-07-03 21:22:13 +00:00
|
|
|
wrtnode,wrtnode2p|\
|
|
|
|
wrtnode,wrtnode2r|\
|
2018-03-29 10:33:02 +00:00
|
|
|
youhua,wr1200js|\
|
2019-07-03 21:22:02 +00:00
|
|
|
zbtlink,zbt-wa05|\
|
2018-04-08 14:04:11 +00:00
|
|
|
zyxel,keenetic-extra-ii)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-12-03 15:46:29 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
|
2011-12-01 22:48:35 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
asiarf,ap7621-001)
|
|
|
|
ucidef_add_switch "switch0" "0:lan" "4:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-22 10:54:06 +00:00
|
|
|
asiarf,ap7621-nv1)
|
|
|
|
ucidef_add_switch "switch0" "0:wan" "2:lan" "3:lan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
asiarf,awapn2403)
|
2017-07-28 20:36:52 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "1:wan" "6@eth0"
|
2017-07-28 20:36:52 +00:00
|
|
|
;;
|
2019-09-15 14:20:11 +00:00
|
|
|
asus,rt-ac85p|\
|
|
|
|
dlink,dir-860l-b1|\
|
|
|
|
elecom,wrc-1167ghbk2-s|\
|
|
|
|
elecom,wrc-1900gst|\
|
|
|
|
elecom,wrc-2533gst|\
|
|
|
|
huawei,hg255d|\
|
|
|
|
iodata,wn-ax1167gr|\
|
|
|
|
iodata,wn-gx300gr|\
|
2019-07-11 05:41:08 +00:00
|
|
|
iodata,wnpr2600g|\
|
2019-09-15 14:20:11 +00:00
|
|
|
iptime,a604m)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
asus,rt-n15|\
|
|
|
|
belkin,f9k1109v1|\
|
|
|
|
sitecom,wl-351)
|
2017-07-25 10:29:14 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0"
|
2017-07-25 10:29:14 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
asus,rt-n56u)
|
2017-07-22 01:15:56 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0"
|
2017-07-22 01:15:56 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
asus,wl-330n|\
|
|
|
|
easyacc,wizard-8800|\
|
|
|
|
kingston,mlwg2)
|
|
|
|
ucidef_set_interface_lan "eth0.1"
|
|
|
|
;;
|
|
|
|
aximcom,mr-102n|\
|
|
|
|
kingston,mlw221)
|
|
|
|
ucidef_set_interface_lan "eth0.2"
|
|
|
|
;;
|
|
|
|
belkin,f5d8235-v1|\
|
|
|
|
belkin,f5d8235-v2|\
|
|
|
|
buffalo,wzr-agl300nh|\
|
|
|
|
ralink,v11st-fe|\
|
|
|
|
trendnet,tew-714tru)
|
2017-05-17 10:18:45 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
|
2017-05-17 10:18:45 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
buffalo,wcr-1166ds)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"3:lan" "4:wan" "6@eth0"
|
2014-06-13 09:16:15 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
buffalo,whr-300hp2|\
|
|
|
|
buffalo,whr-600d|\
|
|
|
|
buffalo,wsr-1166dhp|\
|
|
|
|
buffalo,wsr-600dhp)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:wan:5" "6@eth0"
|
2015-08-17 06:02:59 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
buffalo,whr-1166d)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6@eth0"
|
2014-01-15 18:29:44 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
comfast,cf-wr800n|\
|
2019-08-31 14:41:27 +00:00
|
|
|
hnet,c108|\
|
|
|
|
tplink,tl-wr902ac-v3|\
|
|
|
|
trendnet,tew-638apb-v2)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-08-31 14:41:27 +00:00
|
|
|
"4:lan" "6@eth0"
|
2015-05-23 15:26:39 +00:00
|
|
|
;;
|
ramips: add CUDY WR1000 support
Cudy WR1200 is an AC1200 AP with 3-port FE and 2 non-detachable antennas
Specifications:
MT7628 (580 MHz)
64 MB of RAM (DDR2)
8 MB of FLASH
2T2R 2.4 GHz (MT7628)
2T2R 5 GHz (MT7612E)
3x 10/100 Mbps Ethernet (2 LAN + 1 WAN)
2x external, non-detachable antennas (5dbi)
UART header on PCB (57600 8n1)
7x LED, 2x button
Known issues:
The Power LED is always ON, probably because it is connected
directly to power.
Flash instructions
------------------
Load the ...-factory.bin image via the stock web interface.
Openwrt upgrade instructions
----------------------------
Use the ...-sysupgrade.bin image for future upgrades.
Revert to stock FW
------------------
Warning! This tutorial will work only with the following OEM FW:
WR1000_EU_92.122.2.4987.201806261618.bin
WR1000_US_92.122.2.4987.201806261609.bin
If in the future these firmwares will not be available anymore,
you have to find the new XOR key.
1) Download the original FW from the Cudy website.
(For example WR1000_EU_92.122.2.4987.201806261618.bin)
2) Remove the header.
dd if="WR1000_EU_92.122.2.4987.201806261618.bin" of="WR1000_EU_92.122.2.4987.201806261618.bin.mod" skip=8 bs=64
3) XOR the new file with the region key.
FOR EU: 7B76741E67594351555042461D625F4545514B1B03050208000603020803000D
FOR US: 7B76741E675943555D5442461D625F454555431F03050208000603060007010C
You can use OpenWrt's tools/firmware-utils/src/xorimage.c tool for this:
xorimage -i WR1000..bin.mod -o stock-firmware.bin -x -p 7B767..
Or, you can use this tool (CHANGE THE XOR KEY ACCORDINGLY!):
https://gchq.github.io/CyberChef/#recipe=XOR(%7B'option':'Hex','string':''%7D,'',false)
4) Check the resulting decrypted image.
Check if bytes from 0x20 to 0x3f are:
4C 69 6E 75 78 20 4B 65 72 6E 65 6C 20 49 6D 61 67 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Alternatively, you can use u-boot's tool dumpimage tool to check
if the decryption was successful. It should look like:
# dumpimage -l stock-firmware.bin
Image Name: Linux Kernel Image
Created: Tue Jun 26 10:24:54 2018
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 4406635 Bytes = 4303.35 KiB = 4.20 MiB
Load Address: 80000000
Entry Point: 8000c150
5) Flash it via forced firmware upgrade and don't "Keep Settings"
CLI: sysupgrade -F -n stock-firmware.bin
LuCI: make sure to click on the "Keep settings" checkbox
to disable it. You'll need to do this !TWICE! because
on the first try, LuCI will refuse the image and reset
the "Keep settings" to enable. However a new
"Force upgrade" checkbox will appear as well.
Make sure to do this very carefully!
Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[added wifi compatible, spiffed-up the returned to stock instructions]
2019-05-20 03:20:37 +00:00
|
|
|
cudy,wr1000)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
dlink,dir-510l|\
|
|
|
|
glinet,vixmini|\
|
|
|
|
netgear,ex6150|\
|
ramips: add support for TP-Link RE650 v1
TP-Link RE650 v1 is a dual-band AC2600 range extender,
based on MediaTek MT7621A and MT7615E. According to the
wikidevi entry for RE650 this device is identical with
TP-Link RE500 as hardware. This patch supports only RE650.
Hardware specification:
- SoC 880 MHz - MediaTek MT7621AT
- 128 MB of DDR3 RAM
- 16 MB - Winbond 25Q128FVSG
- 4T4R 2.4 GHz - MediaTek MT7615E
- 4T4R 5 GHz - MediaTek MT7615E
- 1x 1 Gbps Ethernet - MT7621AT integrated
- 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2))
- 4x buttons (Reset, Power, WPS, LED)
- UART header (J1) - 2:GND, 3:RX, 4:TX
Serial console @ 57600,8n1
Flash instructions:
Upload
openwrt-ramips-mt7621-tplink_re650-v1-squashfs-factory.bin
from the RE650 web interface.
TFTP recovery to stock firmware:
Unfortunately, I can't find an easy way to recover the RE
without opening the device and using modified binaries. The
TFTP upload will only work if selected from u-boot, which
means you have to open the device and attach to the serial
console. The TFTP update procedure does *not* accept the
published vendor firmware binaries. However, it allows to
flash kernel + rootfs binaries, and this works if you have
a backup of the original contents of the flash. It's probably
possible to create special image out of the vendor binaries
and use that as recovery image.
Signed-off-by: Georgi Vlaev <georgi.vlaev@gmail.com>
[re-added variables for kernel header]
Signed-off-by: David Bauer <mail@david-bauer.net>
2019-04-17 18:17:45 +00:00
|
|
|
tplink,re350-v1|\
|
|
|
|
tplink,re650-v1)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "6@eth0"
|
|
|
|
;;
|
|
|
|
dlink,dir-615-h1|\
|
|
|
|
d-team,newifi-d2|\
|
|
|
|
wevo,11acnas|\
|
|
|
|
wevo,w2914ns-v2|\
|
|
|
|
zbtlink,zbt-we2026)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
|
|
|
|
;;
|
|
|
|
dlink,dwr-118-a1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:2" "2:lan:3" "3:lan:1" "4:lan:0" "5:wan" "6@eth0"
|
|
|
|
;;
|
|
|
|
dlink,dwr-118-a2)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:2" "2:lan:1" "3:lan:3" "4:lan" "0:wan" "6@eth0"
|
2014-06-02 12:42:52 +00:00
|
|
|
;;
|
2019-07-03 21:22:13 +00:00
|
|
|
duzun,dm06)
|
2016-05-28 14:22:10 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
edimax,br-6475nd)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
|
2013-03-11 21:02:43 +00:00
|
|
|
;;
|
2018-08-06 17:52:28 +00:00
|
|
|
edimax,br-6478ac-v2|\
|
2019-07-03 21:21:54 +00:00
|
|
|
tplink,archer-c2-v1)
|
2018-08-06 17:52:28 +00:00
|
|
|
ucidef_add_switch "switch1" \
|
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
|
|
|
|
;;
|
ramips: add support for EnGenius ESR600
The EnGenius ESR600 is a dual band wireless router with a 4-port gigabit
Ethernet switch, a gigabit Ethernet WAN port and a USB port.
Specification:
- Bootloader: U-Boot
- SoC: MediaTek MT7620A (600 MHz)
- Flash: 16MB, Macronix MX25L12845E
- RAM: 64MB, Nanya NT5TU32M16DG-AC
- Serial: 115200 baud, no header, 3.3V
J2: Vcc (arrow), Gnd, Tx, Rx
- USB: USB 2, 5V
- Ethernet: 5 x 1 Gb/s 4 LAN 1 WAN, Atheros AR8327
- WiFi0: 5 GHz 802.11 b/g/n Ralink RT5592N
300 Mb/s, 2T2R
- WiFi1: 2.4 GHz 802.11 b/g/n integrated
300 Mb/s, 2T2R
- Antennas: 2 per radio, internal
- LEDs: 1 programmable power (amber)
2 programable radio (blue)
1 programable WPS-5G (blue)
1 non-programable WAN activity (blue)
1 unconfigured WPS-2.4G (amber)
- Buttons: GPIO: Reset, WPS
Installation:
Use the OEM web interface to install the ...-factory.dlf image.
Use the OpenWRT ...-sysupgrade.bin image for future upgrades.
The J2 serial port can be accessed either by soldering in a header,
standard 0.1" spacing, or by using pogo-pins against the back side.
As configured by the OEM, the U-Boot boot delay is short, however quickly
typing "1" leads to the U-Boot "System load Linux to SDRAM via TFTP"
prompt. The TFTP client is configured by default with
client: 192.168.99.9
server: 192.168.99.8
filename: uImageESR600
It will load an OpenWRT initramfs kernel with this method.
Known issues:
1) Only the ports externally labeled WAN, LAN3 and LAN4 are operational.
LAN1 and LAN2 do not appear to power up. This issue is also present
in the Lava LR25G001.
2) The amber WPS-2.4G LED, in the same lightguide as the blue WPS-5G LED,
is not configured in the Device Tree specification.
3) The blue WAN activity LED is not configured in the Device Tree
specification as this causes the AR8327 switch to fail to initialize.
Signed-off-by: Nick Briggs <nicholas.h.briggs@gmail.com>
[merge conflict in 02_network]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-07-20 03:01:29 +00:00
|
|
|
engenius,esr600)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "0@eth0"
|
|
|
|
;;
|
2019-07-25 23:11:48 +00:00
|
|
|
fon,fon2601)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "4:wan" "6@eth0"
|
|
|
|
;;
|
2019-09-19 19:33:59 +00:00
|
|
|
edimax,rg21s)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
gehua,ghl-r-001)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
|
|
|
|
;;
|
|
|
|
glinet,gl-mt300n-v2)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan" "0:wan" "6@eth0"
|
|
|
|
;;
|
|
|
|
gnubee,gb-pc1|\
|
|
|
|
gnubee,gb-pc2)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "4:lan" "6@eth0"
|
|
|
|
;;
|
2019-08-07 00:58:48 +00:00
|
|
|
head-weblink,hdrm200)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-12-03 15:46:29 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0"
|
2015-10-05 10:25:47 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
hiwifi,hc5761)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan" "4:lan" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:02 +00:00
|
|
|
hiwifi,hc5861)
|
2019-02-22 14:38:59 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "1:lan" "5:wan" "6@eth0"
|
|
|
|
;;
|
2019-03-14 14:46:43 +00:00
|
|
|
iodata,wn-ac1167gr|\
|
|
|
|
iodata,wn-ac733gr3)
|
2019-01-08 15:20:18 +00:00
|
|
|
ucidef_add_switch "switch1" \
|
|
|
|
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-08-18 05:50:20 +00:00
|
|
|
iptime,a3)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan:2" "3:lan:1" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
lava,lr-25g001|\
|
|
|
|
sitecom,wlr-6000|\
|
|
|
|
trendnet,tew-691gr|\
|
|
|
|
trendnet,tew-692gr)
|
2017-01-01 21:46:33 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
|
2016-11-28 18:41:51 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
lenovo,newifi-d1)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:2" "2:lan:1" "4:wan" "6@eth0"
|
2016-10-29 12:26:58 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
lenovo,newifi-y1|\
|
|
|
|
zbtlink,zbt-we1226)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:2" "1:lan:1" "4:wan" "6@eth0"
|
2011-12-23 14:27:16 +00:00
|
|
|
;;
|
2019-08-07 00:58:48 +00:00
|
|
|
lenovo,newifi-y1s)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:4" "2:lan:3" "4:lan:2" "5:lan:1" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
linksys,e1700|\
|
|
|
|
ralink,mt7620a-mt7530-evb)
|
|
|
|
ucidef_add_switch "switch1" \
|
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
|
|
|
|
;;
|
|
|
|
linksys,re6500)
|
2016-09-24 19:41:43 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "6@eth0"
|
2016-09-24 19:41:43 +00:00
|
|
|
;;
|
2019-08-30 20:41:18 +00:00
|
|
|
netgear,r6120|\
|
|
|
|
netgear,r6220|\
|
2019-08-29 08:08:38 +00:00
|
|
|
netgear,r6260|\
|
2019-08-30 20:41:18 +00:00
|
|
|
netgear,r6350|\
|
2019-08-29 08:08:38 +00:00
|
|
|
netgear,r6850|\
|
2019-08-30 20:41:18 +00:00
|
|
|
netgear,wndr3700-v5)
|
2019-02-01 23:34:43 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
2019-07-03 21:22:47 +00:00
|
|
|
;;
|
|
|
|
nexx,wt1520-4m|\
|
|
|
|
nexx,wt1520-8m|\
|
|
|
|
vonets,var11n-300)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "4:wan" "6@eth0"
|
2012-02-22 19:46:15 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
nexx,wt3020-4m|\
|
|
|
|
nexx,wt3020-8m)
|
2016-09-27 06:25:04 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"4:lan" "0:wan" "6@eth0"
|
2016-09-27 06:25:04 +00:00
|
|
|
;;
|
2018-06-20 16:56:38 +00:00
|
|
|
phicomm,k2g)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
phicomm,psg1218b)
|
2017-07-23 19:06:44 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "6@eth0"
|
2017-07-23 19:06:44 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
planex,mzk-dp150n|\
|
|
|
|
vocore,vocore-8m|\
|
|
|
|
vocore,vocore-16m)
|
2017-03-07 16:38:30 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "4:lan" "6t@eth0"
|
2017-03-07 16:38:30 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
samsung,cy-swr1100)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0"
|
2012-02-13 15:18:04 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
sparklan,wcr-150gn|\
|
2019-09-26 12:44:23 +00:00
|
|
|
zbtlink,zbt-we1026-5g-16m)
|
2017-06-09 11:02:56 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:lan" "6t@eth0"
|
2017-06-09 11:02:56 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
tplink,archer-c20-v1|\
|
|
|
|
tplink,archer-c50-v1)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6@eth0"
|
|
|
|
;;
|
|
|
|
tplink,archer-mr200)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0"
|
|
|
|
ucidef_set_interface_wan "usb0"
|
2012-10-18 07:23:07 +00:00
|
|
|
;;
|
2019-07-03 21:22:13 +00:00
|
|
|
vocore,vocore2|\
|
|
|
|
vocore,vocore2-lite)
|
2017-01-08 06:30:10 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "2:lan" "6t@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:19 +00:00
|
|
|
wiznet,wizfi630a)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2018-06-26 22:50:11 +00:00
|
|
|
"0:lan" "1:lan" "2:wan" "6@eth0"
|
2015-09-14 20:09:31 +00:00
|
|
|
;;
|
2019-01-11 23:37:43 +00:00
|
|
|
wiznet,wizfi630s)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:wan" "3:lan" "4:lan" "6@eth0"
|
|
|
|
;;
|
2019-03-19 07:04:27 +00:00
|
|
|
xiaomi,mir3g)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan:2" "3:lan:1" "1:wan" "6t@eth0"
|
|
|
|
;;
|
ramips: add support for Xiaomi Mi Router 3 Pro
Hardware:
CPU: MediaTek MT7621AT (2x880MHz)
RAM: 512MB DDR3
FLASH: 256MB NAND
WiFi: 2.4GHz 4x4 MT7615 b/g/n (Needs driver, See Issues!)
WiFI: 5GHz 4x4 MT7615 a/n/ac (Needs driver, See Issues!)
USB: 1x 3.0
ETH: 1x WAN 10/100/1000 3x LAN 10/100/1000
LED: Power/Status
BTN: RESET
UART: 115200 8n1
Partition layout and boot:
Stock Xiaomi firmware has the MTD split into (among others)
- kernel0 (@0x200000)
- kernel1 (@0x600000)
- rootfs0
- rootfs1
- overlay (ubi)
Xiaomi uboot expects to find kernels at 0x200000 & 0x600000
referred to as system 1 & system 2 respectively.
a kernel is considered suitable for handing control over
if its linux magic number exists & uImage CRC are correct.
If either of those conditions fail, a matching sys'n'_fail flag
is set in uboot env & a restart performed in the hope that the
alternate kernel is okay.
If neither kernel checksums ok and both are marked failed, system 2
is booted anyway.
Note uboot's tftp flash install writes the transferred
image to both kernel partitions.
Installation:
Similar to the Xiaomi MIR3G, we keep stock Xiaomi firmware in
kernel0 for ease of recovery, and install OpenWRT into kernel1 and
after.
The installation file for OpenWRT is a *squashfs-factory.bin file that
contains the kernel and a ubi partition. This is flashed as follows:
nvram set flag_try_sys1_failed=1
nvram set flag_try_sys2_failed=0
nvram commit
dd if=factory.bin bs=1M count=4 | mtd write - kernel1
dd if=factory.bin bs=1M skip=4 | mtd write - rootfs0
reboot
Reverting to stock:
The part of stock firmware we've kept in kernel0 allows us to run stock
recovery, which will re-flash stock firmware from a *.bin file on a USB.
For this we do the following:
fw_setenv flag_try_sys1_failed 0
fw_setenv flag_try_sys2_failed 1
reboot
After reboot the LED status light will blink red, at which point pressing
the 'reset' button will cause stock firmware to be installed from USB.
Issues:
OpenWRT currently does not have support for the MT7615 wifi chips. There is
ongoing work to add mt7615 support to the open source mt76 driver. Until that
support is in place, there are closed-source kernel modules that can be used.
See: https://forum.openwrt.org/t/support-for-xiaomi-wifi-r3p-pro/20290/170
Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[02_network remaps, Added link to notes]
2019-03-05 08:41:37 +00:00
|
|
|
xiaomi,mir3p)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
|
|
|
;;
|
2019-05-27 17:25:22 +00:00
|
|
|
xiaomi,mir4a-100m)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"4:lan:1" "2:lan:2" "0:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
zyxel,keenetic-omni-ii)
|
2017-12-29 04:35:32 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2019-07-03 21:22:47 +00:00
|
|
|
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0"
|
2017-12-29 04:35:32 +00:00
|
|
|
;;
|
2019-01-12 09:43:28 +00:00
|
|
|
zyxel,keenetic-start)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan:3" "1:lan:2" "2:lan:1" "3:lan:0" "4:wan" "6@eth0"
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
zyxel,keenetic-viva)
|
|
|
|
ucidef_add_switch "switch1" \
|
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "7t@eth0"
|
|
|
|
;;
|
2011-12-01 22:48:35 +00:00
|
|
|
*)
|
2019-09-20 12:07:56 +00:00
|
|
|
RT3X5X=$(grep -E "(RT3.5|RT5350)" /proc/cpuinfo)
|
2011-12-01 22:48:51 +00:00
|
|
|
if [ -n "${RT3X5X}" ]; then
|
2012-08-29 10:37:38 +00:00
|
|
|
ramips_setup_rt3x5x_vlans
|
2011-12-01 22:48:51 +00:00
|
|
|
else
|
2013-11-18 09:35:14 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
|
2011-12-01 22:48:51 +00:00
|
|
|
fi
|
2011-12-01 22:48:35 +00:00
|
|
|
;;
|
2011-12-01 22:48:43 +00:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
ramips_setup_macs()
|
|
|
|
{
|
|
|
|
local board="$1"
|
2011-12-01 22:48:45 +00:00
|
|
|
local lan_mac=""
|
|
|
|
local wan_mac=""
|
2011-12-01 22:48:43 +00:00
|
|
|
|
|
|
|
case $board in
|
2019-07-03 21:22:19 +00:00
|
|
|
8devices,carambola|\
|
|
|
|
alfa-network,w502u|\
|
2019-07-03 21:22:47 +00:00
|
|
|
arcwireless,freestation5|\
|
2019-08-16 13:39:43 +00:00
|
|
|
lenovo,newifi-y1|\
|
|
|
|
lenovo,newifi-y1s|\
|
ramips: clean and improve MAC address setup in 02_network
This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:
1. For the following devices, lan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The lan_mac statement is removed in 02_network, but
wan_mac is kept:
- mercury,mac1200r-v2
- phicomm,k2g
- skylab,skw92a
- wiznet,wizfi630a
2. For the following devices, wan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The wan_mac statement is removed in 02_network, no
lan_mac is present:
- buffalo,whr-g300n
- glinet,gl-mt300n-v2
- zyxel,keenetic-start
3. For the following device, lan_mac and wan_mac were set up
with mtd_get_mac_binary to the same address as set in DTS.
Both statements are removed in 02_network:
- buffalo,whr-600d
4. For some devices, it was possible to move setup from 02_network
to DTS by introducing previously missing mtd_mac_address:
- buffalo,whr-1166d
- buffalo,whr-300hp2
- buffalo,wsr-600dhp
- ohyeah,oy-0001
- planex,vr500
5. For one device, mtd_mac_address was just wrong and overwritten
by 02_network. Put the correct value in DTS and remove redundant
statement in 02_network:
- asus,rt-ac57u
6. For one device, MAC address defined in DTS is exchanged together
with lan_mac/wan_mac setup in 02_network, so that cases in
02_network can be merged:
- phicomm,k2p
For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-12 11:21:05 +00:00
|
|
|
netgear,wnce2001|\
|
|
|
|
ohyeah,oy-0001|\
|
|
|
|
phicomm,k2g|\
|
2019-08-16 10:59:09 +00:00
|
|
|
skylab,skw92a|\
|
|
|
|
totolink,lr1200)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(mtd_get_mac_binary factory 0x2e)
|
2016-05-04 20:04:24 +00:00
|
|
|
;;
|
2019-07-03 21:22:19 +00:00
|
|
|
dlink,dir-300-b7|\
|
|
|
|
dlink,dir-320-b1|\
|
|
|
|
dlink,dir-620-a1|\
|
|
|
|
engenius,esr-9753|\
|
2019-07-03 21:22:47 +00:00
|
|
|
hame,mpr-a1|\
|
|
|
|
hauppauge,broadway|\
|
|
|
|
huawei,d105|\
|
2019-05-05 02:54:52 +00:00
|
|
|
hilink,hlk-7628n|\
|
2019-07-03 21:22:19 +00:00
|
|
|
hilink,hlk-rm04|\
|
2019-07-03 21:22:47 +00:00
|
|
|
nexaira,bc2|\
|
|
|
|
petatel,psr-680w|\
|
|
|
|
skyline,sl-r7205)
|
2019-07-11 21:01:05 +00:00
|
|
|
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
|
2015-08-17 06:02:59 +00:00
|
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
2014-01-15 18:29:44 +00:00
|
|
|
;;
|
2019-07-11 15:15:48 +00:00
|
|
|
asus,rt-ac57u|\
|
2019-08-16 10:59:09 +00:00
|
|
|
d-team,newifi-d2|\
|
|
|
|
d-team,pbr-m1|\
|
ramips: clean and improve MAC address setup in 02_network
This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:
1. For the following devices, lan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The lan_mac statement is removed in 02_network, but
wan_mac is kept:
- mercury,mac1200r-v2
- phicomm,k2g
- skylab,skw92a
- wiznet,wizfi630a
2. For the following devices, wan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The wan_mac statement is removed in 02_network, no
lan_mac is present:
- buffalo,whr-g300n
- glinet,gl-mt300n-v2
- zyxel,keenetic-start
3. For the following device, lan_mac and wan_mac were set up
with mtd_get_mac_binary to the same address as set in DTS.
Both statements are removed in 02_network:
- buffalo,whr-600d
4. For some devices, it was possible to move setup from 02_network
to DTS by introducing previously missing mtd_mac_address:
- buffalo,whr-1166d
- buffalo,whr-300hp2
- buffalo,wsr-600dhp
- ohyeah,oy-0001
- planex,vr500
5. For one device, mtd_mac_address was just wrong and overwritten
by 02_network. Put the correct value in DTS and remove redundant
statement in 02_network:
- asus,rt-ac57u
6. For one device, MAC address defined in DTS is exchanged together
with lan_mac/wan_mac setup in 02_network, so that cases in
02_network can be merged:
- phicomm,k2p
For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-12 11:21:05 +00:00
|
|
|
elecom,wrc-1167ghbk2-s|\
|
|
|
|
elecom,wrc-1900gst|\
|
|
|
|
elecom,wrc-2533gst|\
|
2019-08-16 10:59:09 +00:00
|
|
|
lenovo,newifi-d1|\
|
2019-07-11 21:01:05 +00:00
|
|
|
phicomm,k2p|\
|
ramips: clean and improve MAC address setup in 02_network
This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:
1. For the following devices, lan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The lan_mac statement is removed in 02_network, but
wan_mac is kept:
- mercury,mac1200r-v2
- phicomm,k2g
- skylab,skw92a
- wiznet,wizfi630a
2. For the following devices, wan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The wan_mac statement is removed in 02_network, no
lan_mac is present:
- buffalo,whr-g300n
- glinet,gl-mt300n-v2
- zyxel,keenetic-start
3. For the following device, lan_mac and wan_mac were set up
with mtd_get_mac_binary to the same address as set in DTS.
Both statements are removed in 02_network:
- buffalo,whr-600d
4. For some devices, it was possible to move setup from 02_network
to DTS by introducing previously missing mtd_mac_address:
- buffalo,whr-1166d
- buffalo,whr-300hp2
- buffalo,wsr-600dhp
- ohyeah,oy-0001
- planex,vr500
5. For one device, mtd_mac_address was just wrong and overwritten
by 02_network. Put the correct value in DTS and remove redundant
statement in 02_network:
- asus,rt-ac57u
6. For one device, MAC address defined in DTS is exchanged together
with lan_mac/wan_mac setup in 02_network, so that cases in
02_network can be merged:
- phicomm,k2p
For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-12 11:21:05 +00:00
|
|
|
planex,vr500|\
|
2019-08-16 10:59:09 +00:00
|
|
|
samknows,whitebox-v8|\
|
2019-09-22 10:01:35 +00:00
|
|
|
youhua,wr1200js|\
|
2019-08-16 10:59:09 +00:00
|
|
|
youku,yk-l2|\
|
|
|
|
zbtlink,zbt-we3526)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(mtd_get_mac_binary factory 0xe006)
|
2019-07-11 15:15:48 +00:00
|
|
|
;;
|
2019-09-15 14:20:11 +00:00
|
|
|
asus,rt-ac85p)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env et1macaddr)
|
2019-09-27 11:23:30 +00:00
|
|
|
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
2019-09-15 14:20:11 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
asus,rt-n56u)
|
2019-07-11 21:01:05 +00:00
|
|
|
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(mtd_get_mac_binary factory 0x8004)
|
2019-07-03 21:22:47 +00:00
|
|
|
;;
|
ramips: add support for Belkin F9K1109v1
Device specification:
- SoC: Ralink RT3883 (MIPS 74Kc) 500Mhz
- RAM: 64Mb
- Flash: 8MB (SPI-NOR)
- Ethernet: 10/100/1000 Mbps
- WLAN
Wireless 1: SoC-integrated : 2.4/5 GHz
Wireless 2: 2.4 GHz RT3092L
- LED: 2x USB, WAN, LAN
- Key: WPS, reset
- Serial: 4-pin header, (57600,8,N,1), 3.3V TTL,
GND, RX, TX, V - J12 marking on board
- USB ports: 2 x USB 2.0
Flashing instructions:
Option 1 (from bootloader web)
- Hold reset button on the back of router when plugging
in power (for at-least 10 seconds after plugged in)
- Connect to a Lan port
- Set computer IP to 10.10.10.3
- Go to http://10.10.10.123 in a web browser
- Click the Browse... Button and select the
*squashfs.sysupgrade.bin file then click APPLY
Option 2 (from the stock admin web)
- Go to firmware upgrade
- Upload the **factory** image *initramfs.bin first
- Boot into openwrt
- From Luci web in openwrt upload the *squashfs.sysupgrade.bin
Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[added v1 to the compatible identifier, added pciid for
the RT3092L, fixed pci unit-address, split out the F9K110X.dtsi
to prepare for a possible F9K1103 patch]
2019-02-03 18:54:18 +00:00
|
|
|
belkin,f9k1109v1)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
label_mac=$wan_mac
|
ramips: add support for Belkin F9K1109v1
Device specification:
- SoC: Ralink RT3883 (MIPS 74Kc) 500Mhz
- RAM: 64Mb
- Flash: 8MB (SPI-NOR)
- Ethernet: 10/100/1000 Mbps
- WLAN
Wireless 1: SoC-integrated : 2.4/5 GHz
Wireless 2: 2.4 GHz RT3092L
- LED: 2x USB, WAN, LAN
- Key: WPS, reset
- Serial: 4-pin header, (57600,8,N,1), 3.3V TTL,
GND, RX, TX, V - J12 marking on board
- USB ports: 2 x USB 2.0
Flashing instructions:
Option 1 (from bootloader web)
- Hold reset button on the back of router when plugging
in power (for at-least 10 seconds after plugged in)
- Connect to a Lan port
- Set computer IP to 10.10.10.3
- Go to http://10.10.10.123 in a web browser
- Click the Browse... Button and select the
*squashfs.sysupgrade.bin file then click APPLY
Option 2 (from the stock admin web)
- Go to firmware upgrade
- Upload the **factory** image *initramfs.bin first
- Boot into openwrt
- From Luci web in openwrt upload the *squashfs.sysupgrade.bin
Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[added v1 to the compatible identifier, added pciid for
the RT3092L, fixed pci unit-address, split out the F9K110X.dtsi
to prepare for a possible F9K1103 patch]
2019-02-03 18:54:18 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
buffalo,wcr-1166ds|\
|
|
|
|
buffalo,wsr-1166dhp)
|
|
|
|
local index="$(find_mtd_index "board_data")"
|
|
|
|
wan_mac="$(grep -m1 mac= "/dev/mtd${index}" | cut -d= -f2)"
|
|
|
|
lan_mac=$wan_mac
|
2012-04-21 12:30:40 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
buffalo,whr-1166d|\
|
|
|
|
buffalo,whr-300hp2|\
|
|
|
|
buffalo,whr-600d|\
|
|
|
|
buffalo,whr-g300n|\
|
ramips: clean and improve MAC address setup in 02_network
This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:
1. For the following devices, lan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The lan_mac statement is removed in 02_network, but
wan_mac is kept:
- mercury,mac1200r-v2
- phicomm,k2g
- skylab,skw92a
- wiznet,wizfi630a
2. For the following devices, wan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The wan_mac statement is removed in 02_network, no
lan_mac is present:
- buffalo,whr-g300n
- glinet,gl-mt300n-v2
- zyxel,keenetic-start
3. For the following device, lan_mac and wan_mac were set up
with mtd_get_mac_binary to the same address as set in DTS.
Both statements are removed in 02_network:
- buffalo,whr-600d
4. For some devices, it was possible to move setup from 02_network
to DTS by introducing previously missing mtd_mac_address:
- buffalo,whr-1166d
- buffalo,whr-300hp2
- buffalo,wsr-600dhp
- ohyeah,oy-0001
- planex,vr500
5. For one device, mtd_mac_address was just wrong and overwritten
by 02_network. Put the correct value in DTS and remove redundant
statement in 02_network:
- asus,rt-ac57u
6. For one device, MAC address defined in DTS is exchanged together
with lan_mac/wan_mac setup in 02_network, so that cases in
02_network can be merged:
- phicomm,k2p
For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-12 11:21:05 +00:00
|
|
|
buffalo,wsr-600dhp|\
|
|
|
|
glinet,gl-mt300n-v2|\
|
|
|
|
zyxel,keenetic-start)
|
|
|
|
# This empty case has to be kept for devices without any MAC address adjustments
|
2012-06-23 13:58:29 +00:00
|
|
|
;;
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
cudy,wr1000)
|
|
|
|
wan_mac=$(mtd_get_mac_binary factory 0x2e)
|
|
|
|
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
dlink,dch-m225|\
|
|
|
|
samsung,cy-swr1100)
|
2016-06-30 14:16:30 +00:00
|
|
|
lan_mac=$(mtd_get_mac_ascii factory lanmac)
|
|
|
|
;;
|
2018-03-19 18:15:29 +00:00
|
|
|
dlink,dir-510l|\
|
2018-03-10 09:34:38 +00:00
|
|
|
dlink,dwr-116-a1|\
|
2018-10-24 12:06:35 +00:00
|
|
|
dlink,dwr-118-a1|\
|
2018-04-19 17:34:22 +00:00
|
|
|
dlink,dwr-118-a2|\
|
2018-11-17 08:47:40 +00:00
|
|
|
dlink,dwr-921-c1|\
|
ramips: add support for DLINK DWR-922-E2
Very similar to the DWR-921-C1, except has a telephony/RJ11 port (not
sure if supported, I didn't try), wireless router with QMI LTE embedded
modem is based on the MT7620N SoC.
Specification:
* MediaTek MT7620N (580 Mhz)
* 64 MB of RAM
* 16 MB of FLASH
* 802.11bgn radio
* 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
* 2x external, detachable (LTE) antennas
* UART header on PCB (57600 8n1)
* 6x LED (GPIO-controlled)
* 1x bi-color Signal Strength LED (GPIO-controlled)
* 2x button
* JBOOT bootloader
The status led has been assigned to the dwr-922-e2:green:signalstrength
(lte signal strength) led. At the end of the boot it is switched off and
is available for lte operation. Works correctly also during sysupgrade
operation.
Installation:
Apply factory image via d-link http web-gui, or via recovery interface:
How to recover/revert to OEM firmware:
1.) Push and hold the reset button and turn on the power. Wait until all
LEDs start rapidly blinking (~10sec.)
2.) DHCP should give you an IP in the 192.168.123.0/24 subnet, or set
one manually
3.) Upload original factory image via JBOOT http interface at IP
192.168.123.254
4.) If http doesn't work, it can be done with curl command:
curl -F FN=@XXXXX.bin http://192.168.123.254/upg
where XXXXX.bin is name of firmware file.
5.) You can optionally telnet to 192.168.123.254 before or during the
upload and it will report the flashing status, memory address etc.
6.) Once web UI and/or telnet says "Success", power cycle the router, or
type "reboot" into the telnet session.
Signed-off-by: Simon Quigley <squigley@squigley.net>
[squashed commits, word wrap commit message, rename signal strenght led
name to match what is used for the DWR-921-C1 since they share the led
configuration, add label referenced in the aliases node]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-12-20 16:47:52 +00:00
|
|
|
dlink,dwr-922-e2|\
|
2018-11-17 08:47:40 +00:00
|
|
|
lava,lr-25g001)
|
2018-01-20 08:27:03 +00:00
|
|
|
wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
|
|
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
label_mac=$wan_mac
|
|
|
|
;;
|
|
|
|
dlink,dir-615-d|\
|
|
|
|
dlink,dir-615-h1|\
|
|
|
|
glinet,gl-mt300a|\
|
|
|
|
glinet,gl-mt300n|\
|
|
|
|
glinet,gl-mt750|\
|
|
|
|
zbtlink,zbt-wg3526-16m|\
|
|
|
|
zbtlink,zbt-wg3526-32m)
|
|
|
|
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
|
|
|
|
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
2018-01-20 08:27:03 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
dlink,dir-645)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii nvram lanmac)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii nvram wanmac)
|
|
|
|
;;
|
|
|
|
dlink,dir-860l-b1)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii factory lanmac)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii factory wanmac)
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
label_mac=$(cat /sys/class/ieee80211/phy1/macaddress)
|
2019-07-03 21:22:47 +00:00
|
|
|
;;
|
|
|
|
dovado,tiny-ac)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR)
|
|
|
|
;;
|
|
|
|
edimax,br-6475nd)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(mtd_get_mac_binary devdata 0x7)
|
2015-08-17 06:02:59 +00:00
|
|
|
;;
|
2019-08-30 20:41:18 +00:00
|
|
|
edimax,br-6478ac-v2|\
|
2019-08-29 08:08:38 +00:00
|
|
|
netgear,r6260|\
|
|
|
|
netgear,r6350|\
|
|
|
|
netgear,r6850)
|
2019-07-21 00:05:53 +00:00
|
|
|
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
|
2018-08-06 17:52:28 +00:00
|
|
|
;;
|
ramips: add support for EnGenius ESR600
The EnGenius ESR600 is a dual band wireless router with a 4-port gigabit
Ethernet switch, a gigabit Ethernet WAN port and a USB port.
Specification:
- Bootloader: U-Boot
- SoC: MediaTek MT7620A (600 MHz)
- Flash: 16MB, Macronix MX25L12845E
- RAM: 64MB, Nanya NT5TU32M16DG-AC
- Serial: 115200 baud, no header, 3.3V
J2: Vcc (arrow), Gnd, Tx, Rx
- USB: USB 2, 5V
- Ethernet: 5 x 1 Gb/s 4 LAN 1 WAN, Atheros AR8327
- WiFi0: 5 GHz 802.11 b/g/n Ralink RT5592N
300 Mb/s, 2T2R
- WiFi1: 2.4 GHz 802.11 b/g/n integrated
300 Mb/s, 2T2R
- Antennas: 2 per radio, internal
- LEDs: 1 programmable power (amber)
2 programable radio (blue)
1 programable WPS-5G (blue)
1 non-programable WAN activity (blue)
1 unconfigured WPS-2.4G (amber)
- Buttons: GPIO: Reset, WPS
Installation:
Use the OEM web interface to install the ...-factory.dlf image.
Use the OpenWRT ...-sysupgrade.bin image for future upgrades.
The J2 serial port can be accessed either by soldering in a header,
standard 0.1" spacing, or by using pogo-pins against the back side.
As configured by the OEM, the U-Boot boot delay is short, however quickly
typing "1" leads to the U-Boot "System load Linux to SDRAM via TFTP"
prompt. The TFTP client is configured by default with
client: 192.168.99.9
server: 192.168.99.8
filename: uImageESR600
It will load an OpenWRT initramfs kernel with this method.
Known issues:
1) Only the ports externally labeled WAN, LAN3 and LAN4 are operational.
LAN1 and LAN2 do not appear to power up. This issue is also present
in the Lava LR25G001.
2) The amber WPS-2.4G LED, in the same lightguide as the blue WPS-5G LED,
is not configured in the Device Tree specification.
3) The blue WAN activity LED is not configured in the Device Tree
specification as this causes the AR8327 switch to fail to initialize.
Signed-off-by: Nick Briggs <nicholas.h.briggs@gmail.com>
[merge conflict in 02_network]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-07-20 03:01:29 +00:00
|
|
|
edimax,rg21s|\
|
|
|
|
engenius,esr600)
|
2019-09-19 19:33:59 +00:00
|
|
|
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
|
|
|
;;
|
2019-07-03 21:22:02 +00:00
|
|
|
hiwifi,hc5661|\
|
2019-07-03 21:22:47 +00:00
|
|
|
hiwifi,hc5661a|\
|
2019-07-03 21:22:02 +00:00
|
|
|
hiwifi,hc5761|\
|
2019-07-23 12:12:48 +00:00
|
|
|
hiwifi,hc5761a|\
|
2019-07-03 21:22:02 +00:00
|
|
|
hiwifi,hc5861|\
|
2019-07-03 21:22:47 +00:00
|
|
|
hiwifi,hc5861b|\
|
|
|
|
hiwifi,hc5962)
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
|
|
|
|
label_mac=$lan_mac
|
2015-10-05 10:25:47 +00:00
|
|
|
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
|
|
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
|
|
;;
|
2019-03-14 14:46:43 +00:00
|
|
|
iodata,wn-ac1167gr|\
|
|
|
|
iodata,wn-ac733gr3)
|
2019-08-19 04:45:25 +00:00
|
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
2019-01-08 15:20:18 +00:00
|
|
|
;;
|
ramips: add support for I-O DATA WN-AX1167GR
I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on
MediaTek MT7621A.
Specification:
- MT7621A (2-Cores, 4-Threads)
- 64 MB of RAM (DDR2)
- 16 MB of Flash (SPI)
- 2T2R 2.4/5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 2x LEDs, 4x keys (2x buttons, 1x slide switch)
- UART header on PCB
- Vcc, GND, TX, RX from ethernet port side
- baudrate: 115200 bps (U-Boot, OpenWrt)
Stock firmware:
In the stock firmware, WN-AX1167GR has two os images each composed of
Linux kernel and rootfs.
These images are stored in "Kernel" and "app" partition of the
following partitions, respectively.
(excerpt from dmesg):
MX25L12805D(c2 2018c220) (16384 Kbytes)
mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
Creating 10 MTD partitions on "raspi":
0x000000000000-0x000001000000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config "
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000060000 : "iNIC_rf"
0x000000060000-0x0000007e0000 : "Kernel"
0x000000800000-0x000000f80000 : "app"
0x000000f90000-0x000000fa0000 : "Key"
0x000000fa0000-0x000000fb0000 : "backup"
0x000000fb0000-0x000001000000 : "storage"
The flag for boot partition is stored in "Key" partition, and U-Boot
reads this and determines the partition to boot.
If the image that U-Boot first reads according to the flag is
"Bad Magic Number", U-Boot then tries to boot from the other image.
If the second image is correct, change the flag to the number
corresponding to that image and boot from that image.
(example):
## Booting image at bc800000 ...
Bad Magic Number,FFFFFFFF
Boot from KERNEL 1 !!
## Booting image at bc060000 ...
Image Name: MIPS OpenWrt Linux-4.14.50
Image Type: MIPS Linux kernel Image (lzma compressed)
Data Size: 1865917 Bytes = 1.8 MB
Load Address: 80001000
Entry Point: 80001000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
raspi_erase_write: offs:f90000, count:34
.
.
Done!
Starting kernel ...
Flash instruction using factory image:
1. Connect the computer to the LAN port of WN-AX1167GR
2. Connect power cable to WN-AX1167GR and turn on it
3. Access to "192.168.0.1" on the web browser and open firmware
update page ("ファームウェア")
4. Select the OpenWrt factory image and perform firmware update
5. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR
6. Wait ~180 seconds to complete flasing
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-27 13:47:13 +00:00
|
|
|
iodata,wn-ax1167gr|\
|
2019-07-11 21:39:10 +00:00
|
|
|
iodata,wn-gx300gr|\
|
|
|
|
trendnet,tew-692gr)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
|
ramips: add support for I-O DATA WN-GX300GR
I-O DATA WN-GX300GR is a 2.4 GHz band 11n router, based on MediaTek
MT7621S.
Specification:
- MT7621S (1-Core, 2-Threads)
- 64 MB of RAM
- 8 MB of Flash (SPI)
- 2T2R 2.4 GHz
- 5x 10/100/1000 Mbps Ethernet
- 2x LEDs, 4x keys (2x buttons, 1x slide switch)
- UART header on PCB
- Vcc, GND, TX, RX from ethernet port side
- baudrate: 115200 bps (U-Boot, OpenWrt)
Flash instruction using initramfs image:
1. Connect serial cable to UART header
2. Rename OpenWrt initramfs image for WN-GX300GR to "uImageWN-GX300GR"
and place it in the TFTP directory
3. Set the IP address of the computer to 192.168.99.8, connect to the
LAN port of WN-GX300GR, and start the TFTP server on the computer
4. Connect power cable to WN-GX300GR and turn on the router
5. Press "1" key on the serial console to interrupt boot process on
U-Boot, press Enter key 3 times and start firmware download via TFTP
6. WN-GX300GR downloads initramfs image and boot with it
7. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with sysupgrade image for WN-GX300GR
8. Wait ~150 seconds to complete flasing
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-16 12:42:48 +00:00
|
|
|
;;
|
2019-07-11 05:41:08 +00:00
|
|
|
iodata,wnpr2600g)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
|
|
|
label_mac=$wan_mac
|
|
|
|
;;
|
2019-08-18 05:50:20 +00:00
|
|
|
iptime,a3|\
|
2019-07-20 18:34:59 +00:00
|
|
|
iptime,a604m)
|
|
|
|
wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40)
|
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
linksys,e1700)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
|
2016-10-29 12:26:58 +00:00
|
|
|
;;
|
2019-07-11 21:01:05 +00:00
|
|
|
mediatek,linkit-smart-7688|\
|
|
|
|
onion,omega2|\
|
|
|
|
onion,omega2p)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(mtd_get_mac_binary factory 0x4)
|
|
|
|
lan_mac=$(mtd_get_mac_binary factory 0x2e)
|
2015-10-19 10:07:38 +00:00
|
|
|
;;
|
2019-07-03 21:22:13 +00:00
|
|
|
mercury,mac1200r-v2)
|
ramips: clean and improve MAC address setup in 02_network
This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:
1. For the following devices, lan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The lan_mac statement is removed in 02_network, but
wan_mac is kept:
- mercury,mac1200r-v2
- phicomm,k2g
- skylab,skw92a
- wiznet,wizfi630a
2. For the following devices, wan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The wan_mac statement is removed in 02_network, no
lan_mac is present:
- buffalo,whr-g300n
- glinet,gl-mt300n-v2
- zyxel,keenetic-start
3. For the following device, lan_mac and wan_mac were set up
with mtd_get_mac_binary to the same address as set in DTS.
Both statements are removed in 02_network:
- buffalo,whr-600d
4. For some devices, it was possible to move setup from 02_network
to DTS by introducing previously missing mtd_mac_address:
- buffalo,whr-1166d
- buffalo,whr-300hp2
- buffalo,wsr-600dhp
- ohyeah,oy-0001
- planex,vr500
5. For one device, mtd_mac_address was just wrong and overwritten
by 02_network. Put the correct value in DTS and remove redundant
statement in 02_network:
- asus,rt-ac57u
6. For one device, MAC address defined in DTS is exchanged together
with lan_mac/wan_mac setup in 02_network, so that cases in
02_network can be merged:
- phicomm,k2p
For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-12 11:21:05 +00:00
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory_info 0xd)" 1)
|
2015-08-17 06:02:59 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
poray,m3|\
|
|
|
|
poray,m4-4m|\
|
|
|
|
poray,m4-8m|\
|
|
|
|
poray,x5|\
|
|
|
|
poray,x8)
|
2019-07-11 21:01:05 +00:00
|
|
|
lan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" -2)
|
2019-07-03 21:22:47 +00:00
|
|
|
;;
|
|
|
|
sitecom,wlr-6000)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x8004)" 2)
|
2012-08-12 12:48:24 +00:00
|
|
|
;;
|
2019-07-11 21:01:05 +00:00
|
|
|
sparklan,wcr-150gn|\
|
ramips: clean and improve MAC address setup in 02_network
This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:
1. For the following devices, lan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The lan_mac statement is removed in 02_network, but
wan_mac is kept:
- mercury,mac1200r-v2
- phicomm,k2g
- skylab,skw92a
- wiznet,wizfi630a
2. For the following devices, wan_mac was set up with
mtd_get_mac_binary although the same address was set in DTS.
The wan_mac statement is removed in 02_network, no
lan_mac is present:
- buffalo,whr-g300n
- glinet,gl-mt300n-v2
- zyxel,keenetic-start
3. For the following device, lan_mac and wan_mac were set up
with mtd_get_mac_binary to the same address as set in DTS.
Both statements are removed in 02_network:
- buffalo,whr-600d
4. For some devices, it was possible to move setup from 02_network
to DTS by introducing previously missing mtd_mac_address:
- buffalo,whr-1166d
- buffalo,whr-300hp2
- buffalo,wsr-600dhp
- ohyeah,oy-0001
- planex,vr500
5. For one device, mtd_mac_address was just wrong and overwritten
by 02_network. Put the correct value in DTS and remove redundant
statement in 02_network:
- asus,rt-ac57u
6. For one device, MAC address defined in DTS is exchanged together
with lan_mac/wan_mac setup in 02_network, so that cases in
02_network can be merged:
- phicomm,k2p
For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-08-12 11:21:05 +00:00
|
|
|
wiznet,wizfi630a|\
|
2019-07-11 21:01:05 +00:00
|
|
|
zyxel,keenetic-omni|\
|
|
|
|
zyxel,keenetic-omni-ii|\
|
|
|
|
zyxel,keenetic-viva)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(mtd_get_mac_binary factory 0x28)
|
2016-10-10 01:24:42 +00:00
|
|
|
;;
|
2019-07-03 21:22:19 +00:00
|
|
|
tenda,w306r-v2)
|
2019-07-21 00:05:53 +00:00
|
|
|
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 5)
|
2014-11-05 14:37:13 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
trendnet,tew-691gr)
|
2019-08-09 15:45:12 +00:00
|
|
|
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 3)
|
2011-12-05 17:27:07 +00:00
|
|
|
;;
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
vocore,vocore2|\
|
|
|
|
vocore,vocore2-lite)
|
|
|
|
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
|
|
|
;;
|
|
|
|
xiaomi,mir3g)
|
|
|
|
lan_mac=$(mtd_get_mac_binary factory 0xe006)
|
|
|
|
;;
|
2019-03-19 07:04:27 +00:00
|
|
|
xiaomi,mir3p)
|
2019-07-11 21:39:10 +00:00
|
|
|
lan_mac=$(mtd_get_mac_binary factory 0xe006)
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
label_mac=$lan_mac
|
2019-03-19 07:04:27 +00:00
|
|
|
;;
|
2019-07-03 21:22:47 +00:00
|
|
|
xiaomi,miwifi-mini)
|
2019-07-21 00:05:53 +00:00
|
|
|
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
|
2019-07-03 21:22:47 +00:00
|
|
|
;;
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
zbtlink,zbt-we1326)
|
|
|
|
wan_mac=$(mtd_get_mac_binary factory 0xe006)
|
|
|
|
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
|
|
|
;;
|
2014-06-02 12:43:04 +00:00
|
|
|
*)
|
2019-07-21 00:05:53 +00:00
|
|
|
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
|
2014-06-02 12:43:04 +00:00
|
|
|
;;
|
2011-12-01 22:48:43 +00:00
|
|
|
esac
|
2011-12-01 22:48:45 +00:00
|
|
|
|
2016-09-10 07:46:14 +00:00
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
ramips: provide label MAC address
This patch adds the label MAC address for several devices in
ramips.
Some devices require setting the MAC address in 02_network:
For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526
For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-06-24 15:57:15 +00:00
|
|
|
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
2011-12-01 22:48:43 +00:00
|
|
|
}
|
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
board_config_update
|
2017-05-12 20:36:07 +00:00
|
|
|
board=$(board_name)
|
2011-12-01 22:48:43 +00:00
|
|
|
ramips_setup_interfaces $board
|
|
|
|
ramips_setup_macs $board
|
2014-08-18 13:09:20 +00:00
|
|
|
board_config_flush
|
2011-12-01 22:48:48 +00:00
|
|
|
|
|
|
|
exit 0
|