2015-12-03 21:13:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
|
|
|
# Copyright (c) 2011-2015 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
2015-12-11 15:26:06 +00:00
|
|
|
. /lib/functions/uci-defaults.sh
|
2016-05-13 06:13:15 +00:00
|
|
|
. /lib/functions/system.sh
|
2015-12-03 21:13:12 +00:00
|
|
|
|
|
|
|
board_config_update
|
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
board=$(board_name)
|
2015-12-03 21:13:12 +00:00
|
|
|
|
|
|
|
case "$board" in
|
ipq806x: add support for ASRock G10
The ASRock G10 is a 2.4/5 GHz band 11ac "Gaming" router,
based on Qualcomm IPQ8064.
Specifications:
SoC: Qualcomm IPQ8064
CPU: Dual-Core A15 @ (384 - 1,400 MHz, 2C2T)
DRAM: 512 MiB (~467 MiB available)
NAND: 128 MB (Micron MT29F1G08ABBEAH4)
WLAN0: 4T4R 5 GHz Wlan (QCA9980)
WLAN1: 4T4R 2.4 GHz Wlan (QCA9980)
ETH: 5x 10/100/1000 Mbps Ethernet (QCA8337)
INPUT: Reset Button, WPS 2.4G and WPS 5G Button
LEDS: 1 multicolor status LED
USB: 2x USB 3.0 Type-A
POWER: 12VDC/3A AC Adapter + dedicated Power Switch
UART: Setting is 115200-8-N-1. 1x4 .1" unpopulated header
on the PCB (J6 - very tiny silkscreen next to TX).
Pinout: 1. 3v3 (Square - best skipped!), 2. RX, 3. GND, 4. TX
WARNING: The serial port needs a TTL/RS-232 3.3v level converter!
(Depending on the serial adapter RX and TX might need to
be swapped).
Note about the IR-Remote:
There's a 8-Bit MCU (SONIX SN8F25E21SG) which is controlling the
IR-Remote and is fed by the IR-Photodiode. The SoC can talk to
the device via I2C. The vendor's GPL archive comes with the source
of the interface driver for this as a (character driver), the main
control software is however a blob.
Installation Instructions:
1. Download factory image to disk
2. Apply factory image via stock web-gui
Back to stock:
1. Login to router via ssh
2. run "asrock_g10_back_to_factory" script from /sbin
Notes:
- If something goes wrong durring sysupgrade, router will go back to
factory image.
- Asrock G10 uses partition layout from smem. So partition layout can
be normal or alternate.
- 900-arm-add-cmdline-override.patch was copied from 102-powerpc-add-cmdline-override.patch
from powerpc target.
Knowledge about BOOTCONFIG partition was based on user "jmomo" post from old
OpenWrt forum (Post #50):
https://forum.archive.openwrt.org/viewtopic.php?id=65956&p=2
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[bump to 5.4, add factory image, fix sysupgrade, convert partition
layout to smem, remove ipq-wifi-asrock-g10 and use ART, minor fixes]
Co-Authored-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Lukasz Ostapiuk <palibrzuch@gmail.com>
2019-10-11 22:49:15 +00:00
|
|
|
asrock,g10 |\
|
|
|
|
nec,wg2600hp)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" "1:wan" "0@eth0"
|
|
|
|
;;
|
ipq806x: add support for Buffalo WXR-2533DHP
Buffalo WXR-2533DHP is a 2.4/5 GHz band 11ac router, based on Qualcomm
IPQ8064.
The U-Boot on WXR-2533DHP employs a complicated dual firmware
protection scheme against corruptions of the kernel and rootfs
images. See the notes in buffalo.sh for details.
specifications:
- Qualcomm IPQ8064 (384 - 1,400 MHz, 2C2T)
- 512 MB of RAM (DDR3)
- 256 MB of Flash (NAND)
- 4T4R 2.4/5 GHz Wlan (QCA9980)
- 5x 10/100/1000 Mbps Ethernet
- 10x LEDs, 8x keys (6x buttons, 2x slide-switches)
- 2x USB 3.0 Type-A
- 12VDC/4A AC Adapter
- UART through-hole on PCB
- J3: Vcc, GND, TX, RX from USB port side
- 115200n8
Boot instructions for the initramfs image:
1. Prepare the TFTP server with the initramfs image renamed to
"wxr2300dhp-initramfs.uImage" and IP address "192.168.11.10".
2. Press the "AOSS" button while powering on the WXR-2533DHP.
3. Wait until the "Wireless" LED flashes before releasing the AOSS button.
The WXR-2533DHP will grab the image from TFTP server and will boot it.
Flashing instructions:
To persistently write the firmware, flash an openwrt sysupgrade image
from inside the initramfs, for example transfer
via `scp <sysupgrade> root@192.168.1.1:/tmp` and flash on the device
with `sysupgrade -n /tmp/<sysupgrade>`. Then wait ~120 seconds to
let it finish the flashing process.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded message]
2018-12-24 06:20:25 +00:00
|
|
|
buffalo,wxr-2533dhp |\
|
2016-10-30 08:51:54 +00:00
|
|
|
compex,wpq864 |\
|
2018-01-05 13:00:11 +00:00
|
|
|
netgear,d7800 |\
|
|
|
|
netgear,r7500 |\
|
|
|
|
netgear,r7500v2 |\
|
|
|
|
qcom,ipq8064-ap148 |\
|
|
|
|
tplink,vr2600v)
|
2015-12-03 21:13:12 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
|
|
|
;;
|
2020-09-07 10:43:37 +00:00
|
|
|
edgecore,ecw5410)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
|
|
|
ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)"
|
|
|
|
ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)"
|
|
|
|
;;
|
2020-05-26 19:14:11 +00:00
|
|
|
linksys,ea7500-v1)
|
|
|
|
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
|
|
|
|
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
|
|
|
|
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
|
|
|
;;
|
2016-10-30 08:51:54 +00:00
|
|
|
linksys,ea8500)
|
|
|
|
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
|
|
ucidef_add_switch "switch0" \
|
2020-06-30 09:29:46 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
2016-10-30 08:51:54 +00:00
|
|
|
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
|
|
|
|
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
|
|
|
;;
|
2020-04-21 06:06:12 +00:00
|
|
|
nec,wg2600hp3)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"2:lan" "3:lan" "4:lan" "5:lan" "0@eth1" "1:wan" "6@eth0"
|
|
|
|
;;
|
2018-07-01 13:40:37 +00:00
|
|
|
netgear,r7800 |\
|
2021-01-04 17:27:50 +00:00
|
|
|
tplink,ad7200 |\
|
2018-07-01 13:40:37 +00:00
|
|
|
tplink,c2600)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
|
|
|
|
;;
|
2020-09-17 10:33:45 +00:00
|
|
|
qcom,ipq8064-ap161)
|
|
|
|
ucidef_set_interface_lan "eth1 eth2"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
|
|
|
|
;;
|
2018-01-05 13:00:11 +00:00
|
|
|
qcom,ipq8064-db149)
|
2015-12-03 21:13:12 +00:00
|
|
|
ucidef_set_interface_lan "eth1 eth2 eth3"
|
|
|
|
ucidef_add_switch "switch0" \
|
2017-02-07 07:55:46 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0"
|
2015-12-03 21:13:12 +00:00
|
|
|
;;
|
2018-01-05 13:00:11 +00:00
|
|
|
zyxel,nbg6817)
|
2016-10-25 06:40:34 +00:00
|
|
|
hw_mac_addr=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
2017-10-30 03:28:34 +00:00
|
|
|
ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 2)"
|
|
|
|
ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 3)"
|
2016-10-25 06:40:34 +00:00
|
|
|
;;
|
2015-12-03 21:13:12 +00:00
|
|
|
*)
|
|
|
|
echo "Unsupported hardware. Network interfaces not intialized"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
board_config_flush
|
|
|
|
|
|
|
|
exit 0
|