2016-07-20 13:44:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
|
|
|
|
board_config_update
|
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
board=$(board_name)
|
2016-07-20 13:44:50 +00:00
|
|
|
|
|
|
|
case "$board" in
|
2017-12-17 14:00:01 +00:00
|
|
|
meraki,mr24)
|
2016-07-20 13:44:51 +00:00
|
|
|
ucidef_set_led_netdev "wan" "WAN" "mr24:green:wan" "eth0"
|
|
|
|
ucidef_set_led_wlan "wlan1" "WLAN1" "mr24:green:wifi1" "phy0assoc"
|
|
|
|
ucidef_set_led_wlan "wlan2" "WLAN2" "mr24:green:wifi2" "phy0assoc"
|
|
|
|
ucidef_set_led_wlan "wlan3" "WLAN3" "mr24:green:wifi3" "phy0assoc"
|
|
|
|
ucidef_set_led_wlan "wlan4" "WLAN4" "mr24:green:wifi4" "phy0tpt"
|
|
|
|
;;
|
|
|
|
|
2017-12-17 14:00:01 +00:00
|
|
|
meraki,mx60)
|
2016-11-16 15:38:07 +00:00
|
|
|
ucidef_set_led_switch "wan" "WAN" "mx60:green:wan" "switch0" "0x20"
|
|
|
|
ucidef_set_led_switch "lan1" "LAN1" "mx60:green:lan1" "switch0" "0x10"
|
|
|
|
ucidef_set_led_switch "lan2" "LAN2" "mx60:green:lan2" "switch0" "0x08"
|
|
|
|
ucidef_set_led_switch "lan3" "LAN3" "mx60:green:lan3" "switch0" "0x04"
|
|
|
|
ucidef_set_led_switch "lan4" "LAN4" "mx60:green:lan4" "switch0" "0x02"
|
|
|
|
;;
|
|
|
|
|
apm821xx: add support for the Netgear WNDAP620 and WNDAP660
This patch adds support for the Netgear WNDAP620 and WNDAP660,
they are similar devices, but due to the LAN LED configuration,
the switch setup and WIFI configuration each gets a different
device target.
Hardware Highlights WNDAP620:
CPU: AMCC PowerPC APM82181 at 1000 MHz
DRAM: 128 MB, 2 x 64 MiB DDR2 Hynix H5PS5162GF
CPU: AMCC PowerPC APM82181 at 1000 MHz
FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A
Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY - Only 1 GBit Port (POE)
Wifi: Atheros AR9380 minipcie - Dual-Band - 3x3:3
Serial: console port with RJ45 Interface (9600-N-8-1)
LEDS: Power, LAN-Activity, dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs
Button: Soft Reset Button
Antennae: 3 internal dual-band antennae + 3 x RSMA for external antennaes
Hardware Highlights WNDAP660:
CPU: AMCC PowerPC APM82181 at 1000 MHz + 2 Heatsinks
DRAM: 256 MB, 2 x 128 MiB DDR2
FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A
Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY (POE)
Wifi1: Atheros AR9380 minipcie - Dual-Band - 3x3:3
Wifi2: Atheros AR9380 minipcie - Dual-Band - 3x3:3
Serial: console port with RJ45 Interface (9600-N-8-1)
LEDS: Power, LAN-Activity, 2x dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs
Button: Soft Reset Button
Antennae: 6 internal dual-band antennae + 3 x RSMA for external antennaes
Flashing requirements:
- needs a tftp server at 192.168.1.10/serverip.
- special 8P8C(aka RJ45)<->D-SUB9 Console Cable
("Cisco Console Cable"). Note: Both WNDAP6x0 have
a MAX3232 transceivers, hence no need for any separate
CMOS/TTL level shifters.
External Antenna:
The antennae mux is controlled by GPIO 11 and GPIO14. Valid Configurations:
= Config# = | = GPIO 11 = | = GPIO 14 = | ===== Description =====
1. | 1 / High | 0 / Low | Use the internal antennae (default)
2. | 0 / Low | 1 / High | Use the external antennae
The external antennaes are only meant for the 2.4 GHz band.
One-way Flashing instructions via u-boot:
0. connect the serial cable to the RJ45 Console Port
Note: This requires a poper RS232 and not a TTL/USB adaptor.
1. power up the AP and interrupt the u-boot process at
'Hit any key to stop autoboot'
2. setup serverip and ipaddr env settings
Enter the following commands into the u-boot shell
# setenv ipaddr 192.168.1.1
# setenv serverip 192.168.1.10
3. download the factory.img image to the AP
Enter the following commands into the u-boot shell
# tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-squashfs-factory.img
4. verfiy image integrity
Enter the following commands into the u-boot shell
# crc32 $fileaddr $filesize
If the calculated crc32 checksum does not match, go back to step 3.
5. flash the image
Enter the following commands into the u-boot shell
# nand erase 0x110000 0x1bd0000
# nand write ${kernel_addr_r} 0x110000 ${filesize}
6. setup uboot environment
Enter the following commands into the u-boot shell
# setenv bootargs
# setenv fileaddr
# setenv filesize
# setenv addroot 'setenv bootargs ${bootargs} root=/dev/ubiblock0_0'
# setenv owrt_boot 'nboot ${kernel_addr_r} nand0 0x110000; run addroot; run addtty; bootm ${kernel_addr_r}'
# setenv bootcmd 'run owrt_boot'
# saveenv
7. boot
# run bootcmd
Booting initramfs instructions via u-boot:
Follow steps 0 - 2 from above.
3. boot initramfs
Enter the following commands into the u-boot shell
# tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-initramfs-kernel.bin
# run addtty
# bootm ${kernel_addr_r}
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2018-10-17 20:37:38 +00:00
|
|
|
netgear,wndap620)
|
|
|
|
ucidef_set_led_switch "lan_act" "LAN (Activity)" "wndap6x0:green:activity" "switch0" "0x04" "0x0f" "rx tx"
|
|
|
|
ucidef_set_led_switch "lan_100" "LAN 100Mbps" "wndap620:amber:link100" "switch0" "0x04" "0x04" "link"
|
|
|
|
ucidef_set_led_switch "lan_1000" "LAN 1000Mbps" "wndap620:green:link1000" "switch0" "0x04" "0x08" "link"
|
|
|
|
;;
|
|
|
|
|
|
|
|
netgear,wndap660)
|
|
|
|
ucidef_set_led_netdev "lan_act" "LAN (Activity)" "wndap6x0:green:activity" "eth0"
|
|
|
|
ucidef_set_led_switch "lan1_100" "LAN 100Mbps" "wndap660:amber:lan1-link100" "switch0" "0x04" "0x04" "link"
|
|
|
|
ucidef_set_led_switch "lan1_1000" "LAN 1000Mbps" "wndap660:green:lan1-link1000" "switch0" "0x04" "0x08" "link"
|
|
|
|
ucidef_set_led_switch "lan2_100" "LAN 100Mbps" "wndap660:amber:lan2-link100" "switch0" "0x02" "0x04" "link"
|
|
|
|
ucidef_set_led_switch "lan2_1000" "LAN 1000Mbps" "wndap660:green:lan2-link1000" "switch0" "0x02" "0x08" "link"
|
|
|
|
ucidef_set_led_wlan "wlan2g" "WLAN2G" "wndap6x0:green:wlan2g" "phy0tpt"
|
|
|
|
ucidef_set_led_wlan "wlan5g" "WLAN5G" "wndap6x0:green:wlan5g" "phy1tpt"
|
|
|
|
;;
|
|
|
|
|
2017-12-17 14:00:01 +00:00
|
|
|
netgear,wndr4700)
|
2016-11-07 17:10:09 +00:00
|
|
|
ucidef_set_led_switch "wan_green" "WAN (green)" "wndr4700:green:wan" "switch0" "0x20"
|
|
|
|
ucidef_set_led_netdev "wan_yellow" "WAN (yellow)" "wndr4700:yellow:wan" "eth0.2" "tx rx"
|
2016-10-28 10:40:01 +00:00
|
|
|
ucidef_set_led_usbport "usb3" "USB3" "wndr4700:blue:usb" "usb2-port1" "usb2-port2" "usb3-port1" "usb3-port2"
|
apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720
This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720
hardware highlights:
CPU: AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz)
Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits)
32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
Board: AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG
DRAM: 256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3)
NAND: 128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64)
ETH: Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN)
USB: 2 x 3.0 (Renesas uPD720202K8-711-BAA-A, firmware not included)
SATA: 1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA).
WLAN1: Atheros AR9380 5GHz 802.11an 3:3x3
WLAN2: Atheros AR9581 2.4GHz 802.11bgn 3:3x3
SDCARD: GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 host)
I2C: GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor)
TC654 (i2c-0 @ 0x1b - Dual PWM fan Speed controller)
WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!
INFO: Since this device only has a NAND chip. I opted for going with
root.squashfs in a UBI volume. There's no squashfs/jffs2 image.
This target produces three images.
a. netgear factory image
This image can be used to flash the Netgear WNDR4700 via the
firmware recovery mechanism and the web admin site.
The bootloader can be instructed to do a firmware recovery via the
# fw_recovery
command. It will start a tftp server and listen on 192.168.1.1
(the ipaddr variable in u-boot) for incoming, binary tftp clients.
The firmware recovery mechanism is also started if any of the flash
content which contains the kernel, device-tree definitions or the
(fake)rootfs fails to verify or load.
b. sysupgrade.tar image for sysupgrade
An sysupgrade will replace the entire current LEDE installation
with a newer version. This does include the kernel and the ubi rootfs
partition. The configuration can be carried over automatically as well
if desired.
simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run:
root@lede:~# sysupgrade sysupgrade.tar
and let it reboot.
Note: The devicetree flash area is NOT updated. Until the devicetree
definition is stable, this can lead to all sorts of hardware
detection problems! So make sure, if you experience issues: try
the fw_recovery. If you are unsure whenever this affects you:
test if you can reproduce your issue with the initramfs method.
As it will always have up-to-date device-tree definitions.
c. initramfs image for TFTP (for development and testing)
To use the initramfs method, follow the following steps:
1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin"
file to to the root directory of your TFTP server.
2) rename it to wndr4700.bin
3) On the WNDR4700 - Hit Enter during u-boot and insert:
# tftp 400000 wndr4700.bin; run addtty; bootm 400000 -
This will boot the LEDE image.
Note: The default tftp server is 192.168.1.7, if you want to change it:
# setenv serverip 192.168.8.7;
Note2: The default address for the WNDR4700 is 192.168.1.1:
# setenv ipaddr 192.168.8.8;
Note: Connect you tftp server on the last LAN port (not the WAN)
Note: The firmware for the USB 3.0 Host chip is not included anymore.
Therefore the two USB 3.0 ports will not work without the
uPD7070x-firmware package installed.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-20 13:44:57 +00:00
|
|
|
ucidef_set_led_wlan "wlan2g" "WLAN2G" "wndr4700:blue:wlan" "phy0tpt"
|
|
|
|
ucidef_set_led_wlan "wlan5g" "WLAN5G" "wndr4700:blue:wlan" "phy1tpt"
|
|
|
|
;;
|
|
|
|
|
2016-07-20 13:44:50 +00:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
board_config_flush
|
|
|
|
|
|
|
|
exit 0
|