mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 09:12:39 +00:00
74e7f8ebbd
This in a single image to run many types of hardware in the AP391x series (AP3912/AP3915/AP3916/AP3917/AP7662). Hardware -------- Qualcomm IPQ4029 WiSoC 2T2R 802.11 abgn 2T2R 802.11 nac Macronix MX25L25635E SPI-NOR (32M) 512M DDR3 RAM 1-4x Gigabit Ethernet Senao EXT1025 HD Camera (AP3916 only) USB 2.0 Port (AP3915e only) 1x Cisco RJ-45 Console port - except for AP3916 and AP3912 where there is no external serial console and it is TDB how to solder one. Possibly J12 is UART with pin1 = 3.3V, pin2 = GND, pin3 = TXD, pin4 = RXD. - Settings: 115200 8N1 Installation With Serial Console -------------------------------- 1. Attach to the Console port. Power up the device and press the s key to interrupt autoboot. 2. The default username / password to the bootloader is admin / new2day 3. Check uboot variables using printenv, and update if necessary: $ setenv AP_MODE 0 $ setenv WATCHDOG_COUNT 0 $ setenv WATCHDOG_LIMIT 0 $ setenv AP_PERSONALITY identifi $ setenv serverip <SERVER_IPADDR> $ setenv ipaddr <UNIQUE_IPADDR> $ setenv MOSTRECENTKERNEL 0; ## OpenWRT only uses the primary image $ saveenv $ saveenv ## 2nd time to write the secondary copy 4. On the TFTP server located at <SERVER_IPADDR>, download the OpenWrt initramfs image. Rename and serve it as vmlinux.gz.uImage.3912 5. TFTP boot the OpenWrt initramfs image from the AP serial console: $ run boot_net 6. Wait for OpenWrt to start. Internet port sw-eth5 is assiged to LAN bridge and sw-eth4 (if available) is assigned to WAN. The LAN port will use default IP address 192.168.1.1 and run a DHCP server. If you already have a working DHCP server or already have 192.168.1.1 on your network you MUST DISCONNECT the LAN cable from your active network immediately after the power/status LED turns green! At this point, you need to temporarily reconfigure the AP to have a way to transfer the OpenWRT sysupgrade image to it. Reconfigure the newly converted OpenWRT AP using serial console or plug in a PC to a sw-eth5 as a separate network. Note -- the LAN/WAN port assignments were designed to make it possible to convert to OpenWRT without serial console and using a common firmware image for many AP models -- they may not make the most sense when fully deployed. 7. Download and transfer the sysupgrade image to the device using e.g. SCP. 8. Install OpenWrt to the device using "sysupgrade" $ sysupgrade -n /path/to/openwrt.bin 9. After it boots up again, as in step 6, connect to AP and reconfigure for final deployment. This build supports APs in the AP391x series and similar such as WiNG AP7662. Ethernet devices within OpenWRT are named "sw-eth1" thru "sw-eth5". Mapping from OpenWRT internal naming to external naming on the case is as follows: ``` |sw-eth1|sw-eth2|sw-eth3|sw-eth4|sw-eth5 ------------+-------+-------+-------+-------+------- AP3917 | | | | GE2 | GE1 ------------+-------+-------+-------+-------+------- AP7662 | | | | GE2 | GE1 ------------+-------+-------+-------+-------+------- AP3916 | | | | CAM* | GE1 ------------+-------+-------+-------+-------+------- AP3915 | | | | | GE1 ------------+-------+-------+-------+-------+------- AP3912 | | P1 | P2 | P3 | LAN1 ------------+-------+-------+-------+-------+------- ``` By default sw-eth4 is mapped to WAN. All others are assigned to the LAN. CAM* - On AP3916, sw-eth4 is the camera's interface. You should reconfigure this to be on LAN after OpenWRT boots from flash. Installation Without Serial Console ----------------------------------- The main premise is to set u-boot environment variables using the Extreme Networks firmware's rdwr_boot_cfg program. $ rdwr_boot_cfg Utility to manipulate the boot ROM config blocks All errors are written to the sytem log file (/tmp/log/ap.log) ``` Usage: rdwr_boot_cfg <read_all|read_var|read_var_f|write_var|rm_var> ... read_all read the entire active block read_var <var> read a single variable from the active block read_var_f <var> read a single variable from the active block (formatted) write_var <var=val> write a single variable/value pair to both blocks rm_var <var> delete a single variable from both blocks ``` WARNING: Be very sure you have set the u-boot environment correctly. If not, it can only be fixed by attaching serial console! Be aware that the Extreme Networks shell environment will automatically reboot every 5 minutes if there is no controller present. Read and understand these steps fully before attempting. It is easy to make mistakes! 1. Place the OpenWRT initramfs on the TFTP server and name it as vmlinux.gz.uImage.3912 2. Boot up to Extreme Networks WING-Campus mode OS. Port GE1/LAN1 will be a DHCP **client**. Find out the IP address from your DHCP server and SSH in. Default user/passwd is admin/new2day or admin/admin123. If it is booting to WING-Distributed mode, use this command to convert to Campus mode. $ operational-mode centralized 3. Upon bootup you have about 5mins to changed these u-boot variables if necessary using the rdwr_boot_cfg command in Linux shell: $ rdwr_boot_cfg write_var AP_MODE=0 $ rdwr_boot_cfg write_var MOSTRECENTKERNEL=0 $ rdwr_boot_cfg write_var WATCHDOG_COUNT=0 $ rdwr_boot_cfg write_var WATCHDOG_LIMIT=0 $ rdwr_boot_cfg write_var AP_PERSONALITY=identifi $ rdwr_boot_cfg write_var serverip=<SERVER_IPADDR> $ rdwr_boot_cfg write_var ipaddr=<UNIQUE_IPADDR> $ rdwr_boot_cfg write_var bootcmd="run boot_net" 4. Reboot AP. 5. Connect PC with ethernet to GE1/LAN1 port. You should get a DHCP address in the 192.168.1.x range and should be able to SSH to the new OpenWRT TFTP recovery/installation shell. 6. At this point, u-boot is still set to TFTP boot, so you have to replace the TFTP image with the original Extreme Networks image so that you can change the u-boot environment. See the instructions for Extracting Extreme Networks firmware image. DON'T REBOOT YET! 7. Next you must follow steps 6 thru 8 from the Installation with serial console. After which you should have OpenWRT installed to primary flash firmware. 8. Now Reboot. This time it will boot using TFTP into Extreme Networks image. You may need to reconnect cables at this point -- GE1/LAN1 will be a DHCP **client** and you can SSH in -- just like step 2. Get the IP address from you own DHCP server. 9. Set u-boot env as follows: $ rdwr_boot_cfg write_var MOSTRECENTKERNEL=0 $ rdwr_boot_cfg write_var WATCHDOG_COUNT=0 $ rdwr_boot_cfg write_var bootcmd="run boot_flash" 10. Reboot AP. This time it should be into OpenWRT. GE1/LAN1 will be a DHCP **server** and have static IP 192.168.1.1 -- just like step 5. 11. SSH into the LAN port and reconfigure to final configuration. Don't make any changes that prevent you from SSH or Luci access! Restoring Extreme Networks firmware ----------------------------------- Assuming you have the original Extreme Networks image: 1. Login to OpenWRT shell 2. scp the Extreme Networks packaged firmware image file AP391x-*.img to /tmp 3. Extract the firmware uimage file: $ tar xjf AP391x-*.img vmlinux.gz.uImage 4. Force run sysupgrade: $ sysupgrade -F /tmp/AP391x-*.img / 5. Restore the u-boot varable(s): $ rdwr_boot_cfg write_var WATCHDOG_LIMIT=3 USB 2.0 Port on AP3915e ----------------------- Enable this by setting LED "eth:amber_or_usb_enable" to ALWAYS ON. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Glen Lee <g2lee@yahoo.com> |
||
---|---|---|
.. | ||
11-ath10k-caldata |