1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00
OpenWrt Source Repository https://openwrt.org/
Go to file
Glen Lee 74e7f8ebbd ipq40xx: add support for Extreme Networks WS-AP391x series APs
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>
2023-09-25 23:21:09 +02:00
.github uboot-bcm53xx: Add U-Boot for NorthStar BCM53xx 2023-08-20 18:08:13 +02:00
config kernel: default ARM_PMU on for armsr/armv8 2023-08-15 15:55:00 +02:00
include build: replace SourceName with PKG_NAME compile unit name 2023-09-24 19:33:53 +02:00
LICENSES
package treewide: Add extra CPE identifier 2023-09-25 23:06:33 +02:00
scripts scripts/download.pl: Remove stale download sites and convert to https 2023-09-16 12:10:22 +02:00
target ipq40xx: add support for Extreme Networks WS-AP391x series APs 2023-09-25 23:21:09 +02:00
toolchain toolchain: assign PKG_CPE_ID 2023-09-19 20:22:59 +02:00
tools ccache: add missing \ 2023-09-24 12:49:50 +02:00
.gitattributes
.gitignore .gitignore: ignore link if target is included from feed 2023-07-26 17:45:11 +02:00
BSDmakefile
Config.in
COPYING
feeds.conf.default Revert "feeds: use git-src-full to allow Git versioning" 2023-05-23 14:38:55 +02:00
Makefile treewide: add ORIG_PATH variable 2023-06-05 08:31:47 +02:00
README.md build: drop support for python 3.6 2023-05-22 13:23:35 +02:00
rules.mk prereq-build: increase GCC requirement to 8 2023-08-14 20:18:42 +02:00

OpenWrt logo

OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.

Sunshine!

Download

Built firmware images are available for many architectures and come with a package selection to be used as WiFi home router. To quickly find a factory image usable to migrate from a vendor stock firmware to OpenWrt, try the Firmware Selector.

If your device is supported, please follow the Info link to see install instructions or consult the support resources listed below.

An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:

Development

To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.

Requirements

You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.

binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.7+ rsync subversion unzip which

Quickstart

  1. Run ./scripts/feeds update -a to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default

  2. Run ./scripts/feeds install -a to install symlinks for all obtained packages into package/feeds/

  3. Run make menuconfig to select your preferred configuration for the toolchain, target system & firmware packages.

  4. Run make to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.

The main repository uses multiple sub-repositories to manage packages of different categories. All packages are installed via the OpenWrt package manager called opkg. If you're looking to develop the web interface or port packages to OpenWrt, please find the fitting repository below.

  • LuCI Web Interface: Modern and modular interface to control the device via a web browser.

  • OpenWrt Packages: Community repository of ported packages.

  • OpenWrt Routing: Packages specifically focused on (mesh) routing.

  • OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).

Support Information

For a list of supported devices see the OpenWrt Hardware Database

Documentation

Support Community

  • Forum: For usage, projects, discussions and hardware advise.
  • Support Chat: Channel #openwrt on oftc.net.

Developer Community

License

OpenWrt is licensed under GPL-2.0