Commit Graph

41 Commits (4edadfb997824e93d34c6b76dbbe03821026ee23)

Author SHA1 Message Date
Roger Pueyo Centelles 4edadfb997 ath79: add support for Ubiquiti NanoStation Loco M (XW)
This commit adds support for the NanoStation Loco M2/M5 XW devices
on the ath79 target (support was long ago available on ar71xx).

Specifications:

 - AR9342 SoC @ 535 MHz
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
 - AR8032 switch
 - 2T2R 5 GHz radio, 22 dBm
 - 13 dBi built-in antenna
 - POWER/LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1) on PCB

Flashing via TFTP:

 - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
   button on the device or on the PoE supply pressed
 - Power on the device via PoE (keep reset button pressed)
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button
 - The device starts a TFTP server at 192.168.1.20
 - Set a static IP on the computer (e.g., 192.168.1.21/24)
 - Upload via tftp the factory image:
   $ tftp 192.168.1.20
   tftp> bin
   tftp> trace
   tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-xw-squashfs-factory.bin

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
(backported from commit 633c4304ad)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler b2660e67f0 Revert "ath79: add support for Ubiquiti NanoStation Loco M (XW)"
This reverts commit 21bf718b8c.

Until the mdio-reset is solved, this is not ready for stable release.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Roger Pueyo Centelles 21bf718b8c ath79: add support for Ubiquiti NanoStation Loco M (XW)
This commit adds support for the NanoStation Loco M2/M5 XW devices
on the ath79 target (support was long ago available on ar71xx).

Specifications:

 - AR9342 SoC @ 535 MHz
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
 - AR8032 switch
 - 2T2R 5 GHz radio, 22 dBm
 - 13 dBi built-in antenna
 - POWER/LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1) on PCB

Flashing via TFTP:

 - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
   button on the device or on the PoE supply pressed
 - Power on the device via PoE (keep reset button pressed)
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button
 - The device starts a TFTP server at 192.168.1.20
 - Set a static IP on the computer (e.g., 192.168.1.21/24)
 - Upload via tftp the factory image:
   $ tftp 192.168.1.20
   tftp> bin
   tftp> trace
   tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-xw-squashfs-factory.bin

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
(backported from commit 633c4304ad)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 8fa6107aee ath79: add support for Ubiquiti Picostation M (XM)
This adds support for the Ubiquiti Picostation M (XM), which has the
same board/LEDs as the Bullet M XM, but different case and antennas.

Specifications:
- AR7241 SoC @ 400 MHz
- 32 MB RAM
- 8 MB SPI flash
- 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
- External antenna: 5 dBi (USA), 2 dBi (EU)
- POWER/LAN green LEDs
- 4x RSSI LEDs (red, orange, green, green)
- UART (115200 8N1) on PCB

Flashing via WebUI:
  Upload the factory image via the stock firmware web UI.

  Attention: airOS firmware versions >= 5.6 have a new bootloader with
  an incompatible partition table!

  Please downgrade to <= 5.5 _before_ flashing OpenWrt!
  Refer to the device's Wiki page for further information.

Flashing via TFTP:
  Same procedure as other NanoStation M boards.

- Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
  button on the device or on the PoE supply pressed
- Power on the device via PoE (keep reset button pressed)
- Keep pressing until LEDs flash alternatively LED1+LED3 =>
  LED2+LED4 => LED1+LED3, etc.
- Release reset button
- The device starts a TFTP server at 192.168.1.20
- Set a static IP on the computer (e.g., 192.168.1.21/24)
- Upload via tftp the factory image:
  $ tftp 192.168.1.20
  tftp> bin
  tftp> trace
  tftp> put openwrt-ath79-generic-xxxxx-ubnt_picostation-m-squashfs-factory.bin

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 6fdaf16dd0)
4 years ago
Sven Roederer 6a950afde1 ath79: add support for Ubiquiti Nanostation Loco M (XM)
This adds support for the Ubiquiti Nanostation Loco M (XM), which
has the same board/LEDs as the Bullet M XM, but different case and
antennas.

Specifications:
- AR7241 SoC @ 400 MHz
- 32 MB RAM
- 8 MB SPI flash
- 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
- NS Loco M2: built-in antenna: 8 dBi; AR9287
- NS Loco M5: built-in antenna: 13 dBi; 2T2R 5 GHz radio
- POWER/LAN green LEDs
- 4x RSSI LEDs (red, orange, green, green)
- UART (115200 8N1) on PCB

Flashing via WebUI:
  Upload the factory image via the stock firmware web UI.
  Note that only certain firmware versions accept unsigned
  images. Refer to the device's Wiki page for further information.

Flashing via TFTP:
  Same procedure as other NanoStation M boards.

- Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
  button on the device or on the PoE supply pressed
- Power on the device via PoE (keep reset button pressed)
- Keep pressing until LEDs flash alternatively LED1+LED3 =>
  LED2+LED4 => LED1+LED3, etc.
- Release reset button
- The device starts a TFTP server at 192.168.1.20
- Set a static IP on the computer (e.g., 192.168.1.21/24)
- Upload via tftp the factory image:
  $ tftp 192.168.1.20
  tftp> bin
  tftp> trace
  tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-squashfs-factory.bin

Tested on NanoStation Loco M2.

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit b56bcfe3be)
4 years ago
Adrian Schmutzler 47935940d6 ath79: fix SUPPORTED_DEVICES not matching ar71xx board names
Based on a script for comparison, this fixes (hopefully) all errors
in SUPPORTED_DEVICES for ar71xx->ath79 upgrade.

Devices where old string is removed as the device does not exist
in ar71xx:
- dlink_dir-859-a1
- tplink_archer-a7-v5
- tplink_cpe510-v3 [only in master]

Devices where string is changed because it did not match the board
name in ar71xx:
- tplink_tl-mr3220-v1
- tplink_tl-mr3420-v1
- tplink_tl-wr2543-v1
- tplink_tl-wr741nd-v4
- tplink_tl-wr841-v7
- ubnt_unifiac-mesh
- ubnt_unifiac-mesh-pro
- ubnt_unifiac-pro

For this device, the correct string could not be found, but we could
not determine the correct one. Thus, the string is removed for now:
- tplink_tl-wr740n-v4

The script for checking this is quite simple (note that newer
entries, i.e. ath79->ath79 upgrade, are displayed as missing):

  newpath=target/linux/ath79/image/
  oldpath=target/linux/ar71xx/base-files/lib/ar71xx.sh

  for s in $(grep -roh "SUPPORTED_DEVICES.*" $newpath | sed 's/SUPPORTED_DEVICES *.= *//'); do
    found="Missing"
    grep -q -r "\"$s\"" $oldpath && found="Found"
    echo "$s: $found."
  done

The errors might be filtered by appending 'grep "Missing"' to the script.

Fixes: FS#2751

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 07ce940b77)
4 years ago
Paul Fertser 3030abfa7e ath79: use ath10k-ct-smallbuffers for 64 MiB devices
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
Roger Pueyo Centelles fe82c71964 ath79: include rssileds package for ubnt devices with LEDs
Some Ubiquiti devices had the RSSI LEDs configured in 01_leds but
were missing the rssileds package, while others that don't have
RSSI LEDS had the package included.

This commit includes the rssileds package only for those devices
that need it.

Tested on a NanoStation M XW.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
(cherry picked from commit 1c6066a867)
[backported to 19.07]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Andreas Ziegler 8cf67728d3 ath79: add support for UniFi AC-LR
The Unifi AC-LR has identical hardware to the Unifi AC-Lite.
The antenna setup is different according to the vendor,
which explains the thicker enclosure.

Therefore, it is helpful to know the exact device variant,
instead of having "Ubiquiti UniFi-AC-LITE/LR".

Signed-off-by: Andreas Ziegler <dev@andreas-ziegler.de>
[fix legacy name in commit message; add old boardname to
SUPPORTED_DEVICES]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 07c1ddf522)
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Adrian Schmutzler 081d96bece ath79: fix SUPPORTED_DEVICES for ubnt_nanostation-m
The ar71xx images for the Ubiquiti NanoStation M (XM) devices use
"nanostation-m" as board name, but the ath79 images are only
compatible with the "nano-m" board name, so sysupgrade complains.

By changing this additional supported device, sysupgrade smoothly
upgrades from ar71xx to ath79.

Ref: openwrt#2418

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit f473ce6f23)
5 years ago
Roger Pueyo Centelles 77b96c5068 ath79: add SUPPORTED_DEVICES to ubnt_nanostation-m-xw
The ar71xx images for the Ubiquiti NanoStation M (XW) devices use
"nanostation-m-xw" as the board name, but the ath79 images are only
compatible with the "nano-m-xw" board name, so sysupgrade complains.

By adding this additional supported device, sysuspgrade smoothly
upgrades from ar71xx to ath79.

Tested on a NanoStation M (XW) running OpenWrt ar71xx r10250-016d1eb.

Ref: https://github.com/openwrt/openwrt/pull/2418
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[removed duplicate DEVICE_VARIANT, removed uneeded nano-m-xw support]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 6dda2ea6ad)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
David Bauer b058da3a7b ath79: correct ar71xx boardname for UniFi AC Lite
This corrects the additional boardname for the image metadata to the one
used in ar71xx. The previously present additional entry was never used
on a running system.

Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 1a256470e7)
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Tomasz Maciej Nowak 39ae849d0d ath79: image: add supported string for routerstations and ja76pf2
Now that the md5 check is fixed and metadata present, sysupgrade on
ar71xx will complain about device not being supported by the image.
Since the cause is not matching strings for supported devices add them
accordingly.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
(cherry picked from commit a45cf75eca)
5 years ago
Tomasz Maciej Nowak 4e93d17f2a ath79: image: append metadata to routerstations and ja76pf2 images
This target enforces metadata check so add the necessary information. It
was previously removed because md5 sum check. When using these sysupgrade
images on ar71xx target the check would complain about them not matching.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
(cherry picked from commit 077d06a1a5)
5 years ago
Christian Mauderer 8a4dc6f48c ath79: add support for Ubiquiti airCube ISP
The Ubiquiti Network airCube ISP is a cube shaped 2.4 GHz with internal
2x2 MIMO antennas. It can be supplied via a USB connector or via PoE.
There are for 10/100 Mbps ports (1 * WAN + 3 * LAN). There is an
optional PoE passthrough from the first LAN port to the WAN port.

SoC:       Qualcomm / Atheros QCA9533-BL3A
RAM:       64 MB DDR2
Flash:     16 MB SPI NOR
Ethernet:  4x 10/100 Mbps (1 WAN + 3 LAN)
LEDS:      1x via a SPI controller (not yet supported)
Buttons:   1x Reset
Serial:    1x (only RX and TX); 115200 baud, 8N1

Missing points:
- LED not yet supported
- Factory upgrade via web IF or TFTP recovery not yet supported
  (Needs RSA signed images, for details see PR#1958)

The serial port is on a four pin connextor labeled J1 and located
between Ethernet and USB connector. The pinout is:
1. 3V3 (out)
2. Rx (in)
3. Tx (out)
4. GND

Upgrading via serial port / U-Boot:
- Connect the serial port via a level converter
- Power the system and stop U-Boot with pressing any key when `Hit any
  key to stop autoboot` is displayed. Note: Pressing space multiple
  times untill U-Boot reaches that location works well.
- Connect a PC with the IP 192.168.1.100 (or some other in that net)
  running a TFTP-Server to one of the LAN ports. Copy the sysupgrade
  image to the server.
- Set the U-Boot server IP with
    setenv serverip 192.168.1.100
- Load the flash image to RAM with
    tftpboot 0x81000000 sysupgrade.bin
- Erase the flash with
    erase 0x9f050000 0x9ffaffff
- Write the new flash content with
    cp 0x81000000 0x9f050000 ${filesize}
- Reset the device with
    reset

Signed-off-by: Christian Mauderer <oss@c-mauderer.de>
[removed full stop in subject and added lockdown note to commit message]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Tobias Schramm d78e229903 ath79: Add support for Ubiquiti NanoBeam AC
The NanoBeam is a small AR9342 based directional 5 GHz AC CPE with hardware
almost identical to the Ubiquiti NanoStation AC loco. Over the NanoStation
AC loco it has 5 additional LEDs. Four of those LEDs are used as rssi
indicators, the fifth LED is used as an ethernet link/activity indicator.

CPU:   Atheros AR9342 SoC
RAM:   64 MB DDR2
Flash: 16 MB NOR SPI
WLAN:  QCA988X
Ports: 1x GbE

Flashing procedure is identical to the NanoStation AC loco and can be performed
either via serial or the factory firmware upgrade.

Serial flashing:

1. Connect to serial header on device (8N1 115200)
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Flashing through factory firmware:

1. Ensure firmware version v8.5.0.36727 is installed. Up/downgrade to this exact version.
2. Patch fwupdate.real binary using `hexdump -Cv /bin/ubntbox | sed 's/14 40 fe fe/00 00 00 00/g' | hexdump -R > /tmp/fwupdate.real`
3. Make the patched fwupdate.real binary executable using `chmod +x /tmp/fwupdate.real`
4. Copy the squashfs factory image to /tmp on the device
5. Flash OpenWRT using `/tmp/fwupdate.real -m <squashfs-factory image>`
6. Wait for the device to reboot

Thanks to @cybermaus for testing!

Tested-by: Maurits van Dueren den Hollander <cybermaus@gmail.com>
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
5 years ago
Sven Roederer f1396ac753 ath79: align naming of Ubiquiti Nanostation M
Support for the Nanostation M (XW) was added in 40530c8eb with board
name "nanostation-m-xw". The current image for the "Nanostation M"
uses "nano-m" as the board name.
This commit renames it to the full product name as it's used by all
other boards. The legacy boardname of the ar71xx target is added
via SUPPORTED_DEVICES to ease switching to ath79 target.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
[touch-ups on the commit message, removed subject remains]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Tomasz Maciej Nowak 8f6f260302 ath79: routerstation: prepare to use sysupgrade-tar format image
In PR [1] introducing initial support for Ubiquiti RouterStation boards,
Mathias Kresin suggested to replace the combined sysupgrade image with
tarball generated by sysupgrade-tar.sh. This would simplify deployment
of sysupgrade as the kernel size (needed to update FIS partition) could
be simply calculated on the fly instead of reading value from combined
image header. Unfortunately this would break sysupgrade compatibility
between ar71xx image and ath79 image. Therefore this commit creates
migration path to use new sysuprade image, it adds code to accept both
of them at this moment. The plan is to keep it until new stable version
is released. Then the image recipe should be changed to new format and
compatibility code for old image removed.

1. https://github.com/openwrt/openwrt/pull/1237

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Petr Štetiar 40530c8eb4 ath79: Add support for Ubiquiti Nanostation M (XW)
CPU:  AR9342 SoC
RAM:      64 MB DDR2
Flash:     8 MB NOR SPI
Ports: 2x100 MBit (24V PoE in, 24V PoE out), AR8236 switch
WLAN:  2.4/5 GHz
UART:      1 UART
LEDs:        Power, 2x Ethernet, 4x RSSI LEDs (orange, red, 2x green)
Buttons:     Reset

Flashing instructions using recovery method over TFTP

 1. Unplug the ethernet cable from the router.
 2. Using paper clip press and hold the router's reset button. Make sure
    you can feel it depressed by the paper clip. Do not release the button
    until step 4.
 3. While keeping the reset button pressed in, plug the ethernet cable
    back into the AP. Keep the reset button depressed until you see the
    device's LEDs flashing in upgrade mode (alternating LED1/LED3 and
    LED2/LED4), this may take up to 25 seconds.
 4. You may release the reset button, now the device should be in TFTP
    transfer mode.
 5. Set a static IP on your Computer's NIC. A static IP of 192.168.1.25/24
    should work.
 6. Plug the PoE injector's LAN cable directly to your computer.
 7. Start tftp client and issue following commands:
     tftp> binary
     tftp> connect 192.168.1.20
     tftp> put openwrt-ath79-generic-ubnt-nano-m-xw-squashfs-factory.bin

Tested-by: Joe Ayers <ae6xe@arrl.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Christian Lamparter f54ac91ef5 ar71xx/ath79: switch devices to the -ct driver and firmware
Since commit 61b5b4971e ("mac80211: make ath10k-ct the default ath10k")
select ath10k-ct and the -ct firmwares by default.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Mathias Kresin dacd962cfd ath79: remove duplicate image build variables
Remove image build variables which are set to the same value as the
default image build recipe.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Russell Senior 73127a878d ath79: add support for Ubiquiti AirRouter
Indoor low-power router with 2.4 GHz radio

CPU:    Atheros AR7241 rev 1
RAM:    32 MB
Flash:  8 MB NOR SPI
Switch: Atheros AR7240
Ports:  1x WAN, 4x LAN 10/100 Ethernet
WLAN:   Atheros AR9285 (2.4 GHz)
USB:    1x USB2 host port

Note: Ethernet WAN/LAN port naming is reversed from ar71xx.
WAN is eth0; LAN is eth1.1.

UART settings: 115200, 8N1

                LEDs
        +--------------------------
        |
        |
        |
        |
        |
        |
        |
        |
    VCC | x x
     RX | * x
        | x x
        | x x
     TX | * x
    GND | * x
        |
        |
        |
        |
        +--------------------------
                ETHERNET PORTS

Installation from Ubiquiti firmware, is as for other ubnt-xm AirOs devices.

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Petr Štetiar d42a7c4699 ath79: ubnt-m-xw: Fix factory image flashing using TFTP recovery method
Ubiquity allows flashing of unsigned factory images via TFTP recovery
method[1]. They claim in airOS v6.0.7 release changelog[2] following:

 All future airOS versions will be signed in this way and not allow
 unsigned firmware to be loaded except via TFTP.

U-boot bootloader on M-XW devices expects factory image revision
version in specific format. On airOS v6.1.7 with `U-Boot 1.1.4-s1039
(May 24 2017 - 15:58:18)` bootloader checks if the revision major(?)
number is actually a number, but in currently generated images there's
OpenWrt text and so the check fails:

 Hit any key to stop autoboot:  0
 Setting default IP 192.168.1.20
 Starting TFTP server...
 Receiving file from 192.168.1.25:38438
 Received 4981148 bytes
 Firmware check failed! (1)

By placing arbitrary correct number first in major version, we make the
bootloader happy and we can flash factory images over TFTP again:

 Received 3735964 bytes
 Firmware Version: XW.ar934x.v6.0.4-42.r8474-56aa1ac-OpenWrt
 Setting U-Boot environment variables
 Un-Protected 1 sectors
 Erasing Flash.... done

Patch provided by AREDN[3] project, tested on Bullet M2 XW (ynezz) and
Nanostation M5 XW (ae6xe).

1. https://help.ubnt.com/hc/en-us/articles/204910124-UniFi-TFTP-Recovery-for-Bricked-Access-Points
2. https://dl.ubnt.com/firmwares/XW-fw/v6.0.7/changelog.txt
3. https://github.com/aredn

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Petr Štetiar db4b6535f8 ath79: Add support for Ubiquity Bullet M (XW)
CPU: AR9342 SoC
RAM:     64 MB DDR2
Flash:    8 MB NOR SPI
Ports:  100 MBit (24V PoE in)
WLAN: 2.4/5 GHz
UART:     1 UART on PCB marked as J1 with 115200 8N1 config
LEDs:       Power, Ethernet, 4x RSSI LEDs (orange, red, 2x green)
Buttons:    Reset

UART connection details

  .---------------------------------.
  |                                 |
[ETH]          J1                 [ANT]
  |    o VCC o RX o TX o GND        |
  `---------------------------------'

Flashing instructions

 A) Serial console, U-Boot and TFTP

   1. Connect to serial header J1 on the PCB
   2. Power on device and enter U-Boot console
   3. Set up TFTP server serving an OpenWrt initramfs build
   4. Load initramfs build using the command tftpboot in the U-Boot cli
   5. Boot the loaded image using the command bootm
   6. Copy squashfs OpenWrt sysupgrade build to the booted device
   7. Use mtd to write sysupgrade to partition "firmware"
   8. Reboot and enjoy

 B) Experimental factory image flashing over SSH from airOS v6.1.7

   1. You need to flash your UBNT M2HP with airOS v6.1.7 firmware
      no other airOS version is currently supported
   2. git clone https://github.com/true-systems/ubnt-bullet-m2hp-openwrt-flashing
   3. cd ubnt-bullet-m2hp-openwrt-flashing
   4. make flash-factory FW_OWRT=/path/to/your/openwrt-ath79-generic-ubnt_bullet-m-xw-squashfs-factory.bin

Tested only on Bullet M2HP.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Roger Pueyo Centelles 23f9b2d9a9 ath79: Add support for Ubiquiti LiteAP ac (LAP-120)
This commit adds support for the Ubiquiti LiteAP ac (LAP-120), an outdoor
5 GHz AC access point with an integrated 120° 16 dBi antenna. The device
was previously known as LiteBeam AP ac but was later rebranded.

CPU:    Atheros AR9342 SoC
RAM:    64 MB DDR2
Flash:  16 MB NOR SPI
Ports:  1 GbE port (PoE in)
WLAN:   5 GHz QCA899X (PCI)

The integrated QCA899X is a Ubiquiti branded part with modified vendor
and product id (0777:11ac9). It is very similar to the NanoStation loco
AC, except for the 2.4 GHz management radio (missing here).

Installation procedure is the same as the NanoStation [loco] AC:

1. Connect to serial header on device
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
6 years ago
Mathias Kresin b09992a7d9 ath79: fix build warning
The image build code for the Ubiquiti Nanostation AC series adds the
factory image as to be build image. The same is already done by an
included recipe which results into an expanded IMAGE variable of:

  IMAGES = sysupgrade.bin factory.bin factory.bin

The build system doesn't like these duplicates and issues the following
warning:

  Makefile:82: warning: overriding recipe for target...

Get remove the duplicate factory image to get rid of the warning.

Fixes: 5736af8024 ("ath79: Add support for Ubiquiti NanoStation AC loco")
       fa3c2676ab ("ath79: Add support for Ubiquiti Nanostation AC")

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Tobias Schramm fa3c2676ab ath79: Add support for Ubiquiti Nanostation AC
5 GHz AC wireless outdoor PoE CPE with internal 2.4 GHz management radio

CPU:    Atheros AR9342 SoC
RAM:    64 MB DDR2
Flash:  16 MB NOR SPI
Switch: QCA8334
Ports:  2 GbE ports (1x PoE in, 1x PoE passthrough)
WLAN:   5 GHz QCA899X (PCI) and 2.4 GHZ AR9342

Successor to the old NanoStation M5 with AC wireless.

The integrated QCA899X is a Ubiquiti branded part with modified vendor and
product id (0777:11ac9).

Serial

Serial settings: 115200, 8N1

* = plated through hole
0 = nylon screw

      [Top of device]
+--------------------------+
|    [label]               |
|  0                       |
|                    0     |
|         [ubnt]           |
|         [logo]  3V3  *   |
|                  TX  *   |
|                  RX  *   |
|                 GND  *   |
|                          |
|                      *   |
|                      *   |
|                      *   |
|                      *   |
|    0                     |
|                 0        |
|                          |
|                          |

Installation

1. Connect to serial header on device
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
6 years ago
Tobias Schramm 5736af8024 ath79: Add support for Ubiquiti NanoStation AC loco
Atheros AR9342, 16 MB flash, 64 MB RAM

Successor to the old NanoStation M5 loco with AC wireless.

Includes a mac80211 patch for ath10k_pci because Ubiquiti uses a Ubiquiti
branded and customized QCA988X with vendor id 0777 and device id 11ac for
AC wireless.

Installation

1. Connect to serial header on device (8N1 115200)
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
6 years ago
John Crispin 61b5b4971e mac80211: make ath10k-ct the default ath10k
We select ath10k-ct by default, but it is still possible to build
the upstream version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Lech Perczak 4f93342d92 ath79: ubnt-xm: add rssileds package
In order to make RSSI indicator on the device work out of box,
include "rssileds" package in per-device rootfs image by default
for Ubiquiti XM family.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
6 years ago
Matt Merhar d03c89838e ath79: initial support for Ubiquiti RouterStation and RouterStation Pro
This adds a shared ar7161_ubnt_routerstation.dtsi as well as two other
.dts files that utilize it, ar7161_ubnt_routerstation.dts and
ar7161_ubnt_routerstation-pro.dts.

The modifications to generic-ubnt.mk, config-default, and base-files
necessary for image generation, parsing RedBoot FIS partitions, network
configuration, and sysupgrade are also included.

This reintroduces vital bits from platform_do_upgrade_combined() and its
supporting functions to /lib/upgrade/platform.sh, which were previously
removed from ath79 in 3e9d9f6225 "ath79:
sysupgrade: drop unused platform checks". The new function is called
"routerstation_do_upgrade" and will *only* work for the RouterStation
series of boards. It does however retain the ability to downgrade (e.g.
from master -> 17.01.x using sysupgrade -F).

All hardware is functional including the AR8216 switch (for the Pro),
wireless via ath5k/ath9k using the miniPCI slots, flash, USB, button,
and LED.

Switch and LAN/WAN configuration is the same as it is with the
equivalent ar71xx targets. MAC addresses are assigned based upon the
content stored in the RedBoot config partition.

Flashing via both sysupgrade and TFTP has been confirmed to work. Also,
the initramfs images are now raw .bin files instead of being wrapped in
a uImage (as they currently are in ar71xx), which makes them bootable
with RedBoot.

One notable difference to ar71xx is the inclusion of the RedBoot
"fconfig" utility (analogous to U-Boot’s fw_printenv/fw_setenv) in
DEVICE_PACKAGES. The FIS partitions are probed using the RedBoot MTD
parser’s DT binding, whose proper usage is mutually exclusive to
defining a separate fixed-partitions node for "RedBoot config". This
config partition contains the board's base MAC address. The lack of a
hard-coded flash location means that the mtd-mac-address property cannot
be used in the .dts, so instead fconfig is used to read the MAC
addresses from flash in userspace during first boot.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
6 years ago
Christoph Krapp e420b7b5c5 ath79: add support for UniFi AC-Mesh Pro
The Unifi AC-Mesh Pro has identical hardware to the Unifi AC-Pro except
USB support.
Furthermore for setting parameters like antenna gain it is helpful to
know the exact device variant.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
6 years ago
Adrian Schmutzler 4456dd4660 ath79: add support for Unifi AC Mesh
The Unifi AC Mesh is equivalent to the Unifi AC Lite. However,
for setting certain parameters with the flashed device it is
helpful that the devices know their variant (e.g. automatically
setting antenna gain for the different antennas in Lite and Mesh).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
6 years ago
Lucian Cristian 7dd3d7e1d3 ath79: add support for Ubiquiti UniFi AC-Pro
rework the dts to a common unifi-ac dtsi
pro network is connected via phy0 and has usb ports
lite network is connected via phy4 without usb ports

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Adrian Schmutzler 56fddc2577 ath79: sync naming of Ubiquiti devices
Use a Unifi AC Lite board-/image name consistent with other Ubiquiti
devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
6 years ago
Lucian Cristian cad843e1f5 ath79: add ubiquiti unifi ap ac lite/lr
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Mathias Kresin f7ec385c13 ath79: add and enforce image metadata
Add metadata to images and make the metdata mandatory.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin f77db1a590 ath79: cleanup image build code
Remove recipes for not yet migrated boards. Drop variables which aren't
required due to the switch to devicetree like boardname.

Drop the legacy image build code. Boards added to this target shouldn't
use the legacy image build code anyway.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 0ff5785c5d ath79: fix dts files
Add the SoC compatible to the individual dts files. Rename the dts files
to match the common pattern.

Remove dts files wich aren't used and no image in ar71xx exists.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Matthias Schiffer db34cdf6c5
ath79: Ubiquiti Airmax M: add relocate-kernel to invalidate cache
Apply ar71xx fix for broken Ubiquiti bootloader to ath79 as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
John Crispin 53c474abbd ath79: add new OF only target for QCA MIPS silicon
This target aims to replace ar71xx mid-term. The big part that is still
missing is making the MMIO/AHB wifi work using OF. NAND and mikrotik
subtargets will follow.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago