Porting to UniFi Gateway Max (UXG)

Hello!

I have recently obtained a UniFi Gateway Max, and would really like to get OpenWRT working on this.

(I believe stock firmware is based on OpenWRT 17.01) - I was incorrect

Specifications

CPU - Quad-core ARM® Cortex®-A53 (IPQ5322) at 1.5 GHz

Memory - 2GB DDR4

WAN Ports - 1x 2.5 GbE RJ45
LAN Ports - 4x 2.5 GbE RJ45

It appears SoC patches have already been submitted from Linaro (IPQ5332 vs IPQ5322 on device): https://lwn.net/Articles/923622/

I can see it has 16GB eMMC as well

I noticed the SDK here, would this be applicable in my case? https://wiki.codelinaro.org/en/clo/qsdk/overview

I don’t have much linux kernel dev experience, however i do have friends that are, and would be willing to help out.

How difficult would it potentially be to port OpenWRT to this? Id be willing to test builds.

root@UXGMax:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@UXGMax:~# Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              1
Core(s) per socket:              4
Socket(s):                       1
Vendor ID:                       Qualcomm
Model:                           4
Model name:                      Kryo V2
Stepping:                        0xa
CPU max MHz:                     1500.0000
CPU min MHz:                     1100.0000
BogoMIPS:                        48.00
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Vulnerable
Vulnerability Mmio stale data:   Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; __user pointer sanitization
Vulnerability Spectre v2:        Vulnerable
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid

AFAIK it's not supported by Linux.

The stock firmware is running Debian Linux, OpenWRT 17.01 under the hood, what do you mean by that?

Edit: bare in mind i am not an expert with linux, do you mean mainline compatibility?

Please decide which of two.....
image

Its Debian - I had read online UI stock firmware was based on old OpenWRT, i had just assumed it was somehow both

The platform soc is not supported by mainline linux, you can read that online too.

Is it theoretically supportable, yes - and it's an attractive target at that.
But right now, it isn't. Neither in OpenWrt, nor in Debian - nor in mainline linux. Yes, QCA is submitting 'some' bits and pieces for the SOC support, but that is very incomplete and buggy - and it completely lacks (wired) network support drivers.

If you wanted to get it supported, you'd have to become an expert on this - and spend a double digit number of months to work on the development to get it supported. Chances for future ipq53xx or ipq957x support in OpenWrt aren't actually that bad, but it will take a long time and herculean development efforts from very dedicated developers. As mentioned, these are attractive targets, but they're new, expensive and need a lot of work (and even ipq807x still suffers badly from its bad and slow nss-dp switchdev drivers, ipq60xx isn't supported yet).

Never bet on future device support, only buy what's known to be supported right now (at least in main snapshots). If you're willing to take some gamble, you may be lucky with not-yet-supported devices for well-known targets that have at least an open PR pending, but even that might fail and/ or rely on you picking up the pieces to push the development over the finish line.

IANAL, but that looks like a Trademark violation to me. Goes hand in hand with the copyright violations, I guess.