Daniel Plank 6d802f6148 qualcommax: ipq50xx: add support for Ubiquiti UniFi 6 Pro
Specification:

- SoC        Qualcomm IPQ5018, dual-core Cortex-A53
- RAM        1 GiB
- Flash      8 MiB SPI-NOR (Macronix MX25U6435F)
             4 GiB eMMC
- WLAN       2.4 GHz 2x2 802.11ax, IPQ5018 (SoC)
             5 GHz 4x4 802.11ax, Qualcomm QCN9074 (PCIe)
- Ethernet   1x 10/100/1000 Mbps, IPQ5018 internal GE PHY
- Buttons    1x reset
- LEDs       1x white, 1x blue (GPIO)
- UART       J8 next to the reset button, pin order (starting at the
             button): GND, TX, RX, VCC; 1.8 V logic, VCC pin 3.3 V;
             115200 8N1
- Power      802.3at PoE

eMMC layout (GPT):

  p1 0:HLOS    64 MiB  kernel0
  p2 0:HLOS_1  64 MiB  kernel1
  p3 bs         1 KiB  boot select
  p4 cfg        1 MiB  config
  p5 log        2 GiB

"bs" selects the boot slot:

  00 00 00 00 2b e8 4d a3  slot 0 (0:HLOS)
  ff ff ff ff 2b e8 4d a3  slot 1 (0:HLOS_1)

Tested with stock firmware BZ.6.6.65 and BZ.6.8.2, both with U-Boot
v1.0.25.152.

The default boot command "bootubnt" verifies images against the RSA key
"uap_ipq50xx" in the U-Boot control FDT. OpenWrt is therefore started
with "bootm" after removing /signature from the control FDT.

Flash instructions:

1. SSH into the stock firmware (ubnt:ubnt by default) via its DHCP
   assigned address, or the default 192.168.1.20

2. Copy the sysupgrade image over:

     scp -O openwrt-qualcommax-ipq50xx-ubnt_unifi-6-pro-squashfs-sysupgrade.bin \
         ubnt@<ap>:/tmp/openwrt.bin

3. Check the partition names:

     grep PARTNAME /sys/block/mmcblk0/mmcblk0p2/uevent   # 0:HLOS_1
     grep PARTNAME /sys/block/mmcblk0/mmcblk0p3/uevent   # bs
     grep PARTNAME /sys/block/mmcblk0/mmcblk0p5/uevent   # log

4. Unlock the partitions and unmount the log partition:

    [ -e /proc/ubnthal/.uf ] && echo 5edfacbf > /proc/ubnthal/.uf
    until umount /tmp/log 2>/dev/null; do
        kill $(lsof | grep "\t/tmp/log/" | cut -f1)
    done

5. Write kernel and rootfs:

     tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-pro/kernel -O | \
         dd of=/dev/mmcblk0p2
     tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-pro/root -O | \
         dd of=/dev/mmcblk0p5

6. Set up the U-Boot environment:

     a='fdt addr ${fdtcontroladdr}; fdt rm /signature;'
     b='mmc read 0x50000000 0x20022 0x20000; bootm 0x50000000#config@a650'
     fw_setenv boot_openwrt "$a $b"
     a='mmc read 0x44000000 0x40022 1; if itest.l *0x44000000 == 0xffffffff;'
     b='then run boot_openwrt; else bootubnt; fi'
     fw_setenv bootcmd_real "$a $b"

7. Boot from slot 1:

     printf '\xff\xff\xff\xff\x2b\xe8\x4d\xa3' | dd of=/dev/mmcblk0p3
     reboot

OpenWrt should now be reachable at its DHCP assigned address.

Reverting to stock firmware from OpenWrt:

  printf '\x00\x00\x00\x00\x2b\xe8\x4d\xa3' > /dev/mmcblk0p3
  fw_setenv bootcmd_real bootubnt
  fw_setenv boot_openwrt
  reboot

The stock firmware reformats the log partition as ext4 on its first
boot, which removes the OpenWrt rootfs.

Notes:

- Ubiquiti filed two FCC IDs, SWX-U6PRO (2020) and SWX-U6PROR (2021, which
  adds Bluetooth LE). My unit (PCBA 113-00963-48) has GPIO-driven
  white/blue LEDs and an unpopulated footprint for an LED MCU, so a
  revision with an MCU-driven LED (like the U6-LR v1) may exist.

MAC addresses:

  LAN   : EEPROM 0x0 (label)
  2.4GHz: label + 1
  5GHz  : label + 2

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Daniel Plank <tyrolyean@escpe.net>
Link: https://github.com/openwrt/openwrt/pull/26562
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-11-16 21:24:36 +01:00
2026-11-14 14:26:19 +01:00
2021-02-05 14:54:47 +01: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 macOS 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.8+ 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

S
Description
This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Readme BSD-2-Clause BSD-3-Clause GPL-1 GPL-2 ISC Linux-syscall-note MIT
1.2 GiB
0 Stars 1 Watchers 0 Forks
Languages
C 60.1%
Makefile 23.2%
Shell 8.5%
UnrealScript 2.6%
Perl 2.5%
Other 2.8%