openwrt/target/linux/ipq40xx/base-files/etc/board.d/01_leds

39 lines
1012 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# Copyright (C) 2015 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
boardname="${board##*,}"
case "$board" in
ipq40xx: add support for ASUS RT-AC58U/RT-ACRH13 This patch adds support for ASUS RT-AC58U/RT-ACRH13. hardware highlights: SOC: IPQ4018 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 128 MiB DDR3L-1066 @ 537 MHz (1074?) NT5CC64M16GP-DI NOR: 2 MiB Macronix MX25L1606E (for boot, QSEE) NAND: 128 MiB Winbond W25NO1GVZE1G (cal + kernel + root, UBI) ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN) USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2 INPUT: one Reset and one WPS button LEDS: Status, WAN, WIFI1/2, USB and LAN (one blue LED for each) Serial: WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has an unpopulated 1x4 0.1" header. The pinout (VDD, RX, GND, TX) is printed on the PCB right next to the connector. U-Boot Note: The ethernet driver isn't always reliable and can sometime time out... Don't worry, just retry. Access via the serial console is required. As well as a working TFTP-server setup and the initramfs image. (If not provided, it has to be built from the OpenWrt source. Make sure to enable LZMA as the compression for the INITRAMFS!) To install the image permanently, you have to do the following steps in the listed order. 1. Open up the router. There are four phillips screws hiding behind the four plastic feets on the underside. 2. Connect the serial cable (See notes above) 3. Connect your router via one of the four LAN-ports (yellow) to a PC which can set the IP-Address and ssh and scp from. If possible set your PC's IPv4 Address to 192.168.1.70 (As this is the IP-Address the Router's bootloader expects for the tftp server) 4. power up the router and enter the u-boot choose option 1 to upload the initramfs image. And follow through the ipv4 setup. Wait for your router's status LED to stop blinking rapidly and glow just blue. (The LAN LED should also be glowing blue). 3. Connect to the OpenWrt running in RAM The default IPv4-Address of your router will be 192.168.1.1. 1. Copy over the openwrt-sysupgrade.bin image to your router's temporary directory # scp openwrt-sysupgrade.bin root@192.168.1.1:/tmp 2. ssh from your PC into your router as root. # ssh root@192.168.1.1 The default OpenWrt-Image won't ask for a password. Simply hit the Enter-Key. Once connected...: run the following commands on your temporary installation 3. delete the "jffs2" ubi partition to make room for your new root partition # ubirmvol /dev/ubi0 --name=jffs2 4. install OpenWrt on the NAND Flash. # sysupgrade -v /tmp/openwrt-sysupgrade.bin - This will will automatically reboot the router - Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2018-03-07 09:13:10 +01:00
asus,rt-ac58u)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2G" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5G" "phy1tpt"
ucidef_set_led_usbport "usb" "USB" "${boardname}:blue:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e"
;;
avm,fritzbox-4040)
ucidef_set_led_wlan "wlan" "WLAN" "fritz4040:green:wlan" "phy0tpt" "phy1tpt"
ucidef_set_led_netdev "wan" "WAN" "fritz4040:green:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "fritz4040:green:lan" "switch0" "0x1e"
;;
glinet,gl-b1300)
ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wlan" "phy0tpt"
;;
ipq40xx: add Cisco Meraki MR33 Support This patch adds support for Cisco Meraki MR33 hardware highlights: SOC: IPQ4029 Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB DDR3L-1600 @ 627 MHz Micron MT41K128M16JT-125IT NAND: 128 MiB SLC NAND Spansion S34ML01G200TFV00 (106 MiB usable) ETH: Qualcomm Atheros AR8035 Gigabit PHY (1 x LAN/WAN) + PoE WLAN1: QCA9887 (168c:0050) PCIe 1x1:1 802.11abgn ac Dualband VHT80 WLAN2: Qualcomm Atheros QCA4029 2.4GHz 802.11bgn 2:2x2 WLAN3: Qualcomm Atheros QCA4029 5GHz 802.11a/n/ac 2:2x2 VHT80 LEDS: 1 x Programmable RGB+White Status LED (driven by Ti LP5562 on i2c-1) 1 x Orange LED Fault Indicator (shared with LP5562) 2 x LAN Activity / Speed LEDs (On the RJ45 Port) BUTTON: one Reset button MISC: Bluetooth LE Ti cc2650 PG2.3 4x4mm - BL_CONFIG at 0x0001FFD8 AT24C64 8KiB EEPROM Kensington Lock Serial: WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated 1x4 0.1" header with half-height/low profile pins. The pinout is: VCC (little white arrow), RX, TX, GND. Flashing needs a serial adaptor, as well as patched ubootwrite utility (needs Little-Endian support). And a modified u-boot (enabled Ethernet). Meraki's original u-boot source can be found in: <https://github.com/riptidewave93/meraki-uboot/tree/mr33-20170427> Add images to do an installation via bootloader: 0. open up the MR33 and connect the serial console. 1. start the 2nd stage bootloader transfer from client pc: # ubootwrite.py --write=mr33-uboot.bin (The ubootwrite tool will interrupt the boot-process and hence it needs to listen for cues. If the connection is bad (due to the low-profile pins), the tool can fail multiple times and in weird ways. If you are not sure, just use a terminal program and see what the device is doing there. 2. power on the MR33 (with ethernet + serial cables attached) Warning: Make sure you do this in a private LAN that has no connection to the internet. - let it upload the u-boot this can take 250-300 seconds - 3. use a tftp client (in binary mode!) on your PC to upload the sysupgrade.bin (the u-boot is listening on 192.168.1.1) # tftp 192.168.1.1 binary put openwrt-ipq40xx-meraki_mr33-squashfs-sysupgrade.bin 4. wait for it to reboot 5. connect to your MR33 via ssh on 192.168.1.1 For more detailed instructions, please take a look at the: "Flashing Instructions for the MR33" PDF. This can be found on the wiki: <https://openwrt.org/toh/meraki/mr33> (A link to the mr33-uboot.bin + the modified ubootwrite is also there) Thanks to Jerome C. for sending an MR33 to Chris. Signed-off-by: Chris Blake <chrisrblake93@gmail.com> Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2018-03-10 10:59:18 +01:00
meraki,mr33)
ucidef_set_interface_lan "eth0"
;;
*)
;;
esac
board_config_flush
exit 0