You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.6 KiB
Plaintext

#!/bin/sh
#
# Copyright (C) 2011-2014 OpenWrt.org
#
[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
case "$board" in
alfa-network,ap121f|\
arduino,yun|\
buffalo,bhr-4grv2|\
ath79: add support for Devolo Magic 2 WIFI This patch support Devolo Magic 2 WIFI, board devolo_dlan2-2400-ac. This device is a plc wifi AC2400 router/extender with 2 Ethernet ports, has a G.hn PLC and uses LCMP protocol from Home Grid Forum. Hardware: SoC: AR9344 CPU: 560 MHz Flash: 16 MiB (W25Q128JVSIQ) RAM: 128 MiB DDR2 Ethernet: 2xLAN 10/100/1000 PLC: 88LX5152 (MaxLinear G.hn) PLC Flash: W25Q32JVSSIQ PLC Uplink: 1Gbps MIMO PLC Link: RGMII 1Gbps (WAN) WiFi: Atheros AR9340 2.4GHz 802.11bgn Atheros AR9882-BR4A 5GHz 802.11ac Switch: QCA8337, Port0:CPU, Port2:PLC, Port3:LAN1, Port4:LAN2 Button: 3x Buttons (Reset, wifi and plc) LED: 3x Leds (wifi, plc white, plc red) GPIO Switch: 11-PLC Pairing (Active Low) 13-PLC Enable 21-WLAN power MACs Details verified with the stock firmware: Radio1: 2.4 GHz &wmac *:4c Art location: 0x1002 Radio0: 5.0 GHz &pcie *:4d Art location: 0x5006 Ethernet &ethernet *:4e = 2.4 GHz + 2 PLC uplink --- *:4f = 2.4 GHz + 3 Label MAC address is from PLC uplink OEM SSID: echo devolo-$(grep SerialNumber /dev/mtd1 | grep -o ...$) OEM WiFi password: grep DlanSecurityID /dev/mtd1|tr -d -|cut -d'=' -f 2 Recommendations: Configure and link your PLC with OEM firmware BEFORE you flash the device. PLC configuration/link should remain in different memory and should work straight forward after flashing. Restrictions: PLC link detection to trigger plc red led is not available. PLC G.hn chip is not compatible with open-plc-tools, it uses LCMP protocol with AES-128 and requires different software. Notes: Pairing should be possible with gpio switch. Default configuration will trigger wifi led with 2.4Ghz wifi traffic and plc white led with wan traffic. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.100 2. Download the sysupgrade image and rename it to uploadfile 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Allow 1-2 minutes for the first boot. Signed-off-by: Manuel Giganto <mgigantoregistros@gmail.com>
5 years ago
devolo,magic-2-wifi|\
engenius,ecb1750|\
etactica,eg200|\
ath79: GL-AR750S: provide NAND support; increase kernel to 4 MB The GL.iNet GL-AR750S has been supported by the ar71xx and ath79 platforms with access to its 16 MB NOR flash, but not its 128 MB SPI NAND flash. This commit provides support for the NAND through the upstream SPI-NAND framework. At this time, the OEM U-Boot appears to only support loading the kernel from NOR. This configuration is preserved as this time, with the glinet,gl-ar750s-nand name reserved for a potential, future, NAND-only boot. The family of GL-AR750S devices on the ath79 platform now includes: * glinet,gl-ar750m-nor-nand "nand" target * glinet,gl-ar750m-nor "nand" target (NAND-aware) NB: This commit increases the kernel size from 2 MB to 4 MB "Force-less" sysupgrade is presently supported from the current versions of following NOR-based firmwre images to the version of glinet,gl-ar750s-nor firmware produced by this commit: * glinet,gl-ar750s -- OpenWrt 19.07 ar71xx * glinet,gl-ar750s -- OpenWrt 19.07 ath79 Users who have sucessfully upgraded to glinet,gl-ar750m-nor may then flash glinet,gl-ar750m-nor-nand with sysupgrade to transtion to the NAND-based variant. Other upgrades to these images, including directly to the NAND-based glinet,gl-ar750s-nor-nand firmware, can be accomplished through U-Boot. NB: See "ath79: restrict GL-AR750S kernel build-size to 2 MB" which enables flashing of NAND factory.img with the current GL-iNet U-Boot, "U-Boot 1.1.4-gcf378d80-dirty (Aug 16 2018 - 07:51:15)" The GL-AR750S OEM U-Boot allows upload and flashing of either NOR firmware (sysupgrade.bin) or NAND firmware (factory.img) through its HTTP-based GUI. Serial connectivity is not required. The glinet,gl-ar750s-nor and glinet,gl-ar750s-nor-nand images generated after this commit flash each other directly. This commit changes the control of the USB VBUS to gpio-hog from regulator-fixed introduced by commit 0f6b944c92. This reduces the compressed kernel size by ~14 kB, with no apparent loss of functionality. No other ath79-nand boards are using regulator-fixed at this time. Note: mtd_get_mac_binary art 0x5006 does not return the proper MAC and the GL.iNet source indicates that only the 0x0 offset is valid The ar71xx targets are unmodified. Cc: Alexander Wördekemper <alexwoerde@web.de> Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years ago
glinet,gl-ar750s-nor|\
glinet,gl-ar750s-nor-nand|\
librerouter,librerouter-v1|\
netgear,ex6400|\
netgear,ex7300|\
ath79: add support for Netgear WNDR4300 v2 This patch introduces support for Netgear WNDR4300v2. Specification ============= * Description: Netgear WNDR4300 v2 * Loader: U-boot * SOC: Qualcomm Atheros QCA9563 (775 MHz) * RAM: 128 MiB * Flash: 2 MiB SPI-NOR + 128 MiB SPI-NAND - NOR: U-boot binary: 256 KiB - NOR: U-boot environment: 64 KiB - NOR: ART Backup: 64 KiB - NOR: Config: 64 KiB - NOR: Traffic Meter: 64 KiB - NOR: POT: 64 KiB - NOR: Reserved: 1408 KiB - NOR: ART: 64 KiB - NAND: Firmware: 25600 KiB (see notes for OpenWrt) - NAND: Language: 2048 KiB - NAND: mtdoops Crash Dump: 128 KiB - NAND: Reserved: 103296 KiB * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8337) * Wireless: - 2.4 GHz b/g/n (internal) - 5 GHz a/n (AR9580) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN 2G (green) - WLAN 5G (blue) - 4 x LAN (amber/green) - USB (green) - WPS (green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 1.5A * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2 Important Notes =============== 0. NOR Flash (2 MiB) is not touched by OpenWrt installation. 1. NAND Flash (128 MiB) layout under OpenWrt is changed as follows: all space is split between 4 MiB kernel and 124 MiB UBI areas; vendor partitions (language and mtdoops) are removed; kernel space size can be further expanded if needed; maximum image size is set to 25600k for compatibility reasons and can also be increased. 2. CPU clock is 775 MHz, not 750 MHz. 3. 5 GHz wireless radio chip is Atheros AR9580-AR1A with bogus PCI device ID 0xabcd. For ath9k driver to load successfully, this is overriden in DTS with correct value for this chip, 0x0033. 4. RFKILL button is wired to AR9580 pin 9 which is normally disabled by chip definition in ath9k code (0x0000F4FF gpio mask). Therefore 'qca,gpio-mask=<0xf6ff>' hack must be used for button to work properly. 5. USB port is always on, no GPIO for 5V power control has been identified. Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_nand=y CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300-v2=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years ago
netgear,wndr4300-v2|\
netgear,wndr4500-v3|\
netgear,wnr1000-v2|\
netgear,wnr2000-v3|\
netgear,wnr2200-8m|\
netgear,wnr2200-16m|\
netgear,wnr612-v2|\
ocedo,koala|\
ocedo,raccoon|\
openmesh,om5p-ac-v2|\
ubnt,nanostation-m|\
yuncore,a770|\
yuncore,a782|\
yuncore,xd4200)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;;
buffalo,wzr-hp-ag300h)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
;;
domywifi,dw33d)
ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
;;
glinet,gl-ar150)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
;;
glinet,gl-ar300m-lite|\
glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor|\
glinet,gl-ar300m16)
idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
;;
netgear,wndr3700|\
netgear,wndr3700-v2|\
netgear,wndrmac-v1)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
;;
ath79: add support for Netgear WNDR3700v4 This patch adds ath79 support for Netgear WNDR3700v4. Router was previously supported by ar71xx target only. Note: device requires 'ar934x-nand' driver in kernel. Specification ============= * Description: Netgear WNDR3700v4 * Loader: U-boot * SOC: Atheros AR9344 (560 MHz) * RAM: 128 MiB * Flash: 128 MiB (NAND) - U-boot binary: 256 KiB - U-boot environment: 256 KiB - ART: 256 KiB - POT: 512 KiB - Language: 2 MiB - Config: 512 KiB - Traffic Meter: 3 MiB - Firmware: 25 MiB - ART Backup: 256 KiB - Reserved: 96 MiB * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8327) * Wireless: - 2.4 GHz b/g/n (internal) - 5 GHz a/n (AR9580) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN 2G (green) - WLAN 5G (blue) - 4 x LAN (amber/green) - USB (green) - WPS (amber/green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 2.5A * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Note about partitioning: firmware partition offset (0x6c0000) is hardcoded into vendor's u-boot, so this partition cannot be moved and resized to include Netgear-specific flash areas (pot, language, config, traffic_meter) not used by OpenWrt. Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_nand=y CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr3700-v4=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y Signed-off-by: Paul Blazejowski <paulb@blazebox.homeip.net>
5 years ago
netgear,wndr3700-v4|\
netgear,wndr4300|\
ath79/nand: add support for Netgear WNDR4300TN This patch adds support for the WNDR4300TN, marketed by Belgian ISP Telenet. The hardware is the same as the WNDR4300 v1, without the fifth ethernet port (WAN) and the USB port. The circuit board has the traces, but the components are missing. Specifications: * SoC: Atheros AR9344 * RAM: 128 MB * Flash: 128 MB NAND flash * WiFi: Atheros AR9580 (5 GHz) and AR9344 (2.4 GHz) * Ethernet: 4x 1000Base-T * LED: Power, LAN, WiFi 2.4GHz, WiFi 5GHz, WPS * UART: on board, to the right of the RF shield at the top of the board Installation: * Flashing through the OEM web interface: + Connect your computer to the router with an ethernet cable and browse to http://192.168.0.51/ + Log in with the default credentials are admin:password + Browse to Advanced > Administration > Firmware Upgrade in the Telenet interface + Upload the Openwrt firmware: openwrt-ath79-nand-netgear_wndr4300tn-squashfs-factory.img + Proceed with the firmware installation and give the device a few minutes to finish and reboot. * Flashing through TFTP: + Configure your wired client with a static IP in the 192.168.1.x range, e.g. 192.168.1.10 and netmask 255.255.255.0. + Power off the router. + Press and hold the RESET button (the factory reset button on the bottom of the device, with the gray circle around it, next to the Telenet logo) and turn the router on while keeping the button pressed. + The power LED will start flashing orange. You can release the button once it switches to flashing green. + Transfer the image over TFTP: $ tftp 192.168.1.1 -m binary -c put openwrt-ath79-nand-netgear_wndr4300tn-squashfs-factory.img Signed-off-by: Davy Hollevoet <github@natox.be> [use DT label reference for adding LEDs in DTSI files] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
netgear,wndr4300tn|\
netgear,wndr4300sw)
ath79: add support for Netgear WNDR4300 This patch adds ath79 support for Netgear WNDR4300. Router was previously supported by ar71xx target only. Note: device requires 'ar934x-nand' driver in kernel. Specification ============= * Description: Netgear WNDR4300 * Loader: U-boot * SOC: Atheros AR9344 (560 MHz) * RAM: 128 MiB * Flash: 128 MiB (NAND) - U-boot binary: 256 KiB - U-boot environment: 256 KiB - ART: 256 KiB - POT: 512 KiB - Language: 2 MiB - Config: 512 KiB - Traffic Meter: 3 MiB - Firmware: 25 MiB - ART Backup: 256 KiB - Reserved: 96 MiB * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8327) * Wireless: - 2.4 GHz b/g/n (internal) - 5 GHz a/n (AR9580) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN 2G (green) - WLAN 5G (blue) - 4 x LAN (amber/green) - USB (green) - WPS (amber/green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 2.5A * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Note about partitioning: firmware partition offset (0x6c0000) is hardcoded into vendor's u-boot, so this partition cannot be moved and resized to include Netgear-specific flash areas (pot, language, config, traffic_meter) not used by OpenWrt. Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_nand=y CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
5 years ago
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
;;
qihoo,c301)
ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
;;
esac
config_load ubootenv
config_foreach ubootenv_add_app_config ubootenv
exit 0