Figured I would do a little write up on my adventures with a Ubiquiti EdgeRouter X and OpenWRT (18.06.1, r7258-5eb055306f).
Last Updated 1/10/2019

Back story.
This whole process started when I was trying to upgrade from OpenWRT(VM) to something bare metal. The rest of my house is all Ubiquiti Unifi gear, but Ubiquiti's current Unifi Routers (USG) dont fit my needs/cost use case. After much googling and frustration I stumbled across the Ubiquiti EdgeRouter X (ERX). I was VERY pleased to find a nice peace of hardware with solid specs (2 core, 4 threads, 256/256 Storage/RAM), NO wireless, PoE (24V), 5X 1Gbps ports,and an all metal case. Was even more happy that I could just power the ERX right off my core switch.

How to get from the stock EdgeOS to OpenWRT.
The process is simple. EdgeOS --> custom version of OpenWRT --> stock OpenWRT 18.06.1. Firstly we need to build the "openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar" which will be used as a stepping stone to get to a stock version of OpenWRT. Here are my steps to build openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar. But if you are lazy, here is the link to my compiled version: http://batbuilds.com/openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar

Moving from my custom image to a stock OpenWRT image
First thing on my list is getting a "stock" install of OpenWRT in place. This assumes you have a "WAN" connection, with functional internet, on port eth0. You could also download the firmware to a local computer and scp it over.Pro Tip: By default OpenWRT's LAN connection will come up on the physical port "eth1".

Moving the "WAN" connection to "eth4"
At this point we are running a stock version of OpenWRT. One tweak I like to make is moving the "LAN" connection back to "eth0" and bumping the "WAN" connection to "eth4". That is simply done by tweaking around the switch ports as seen below.Pro Tip: Ports 0~3, with my tweak, all act as "LAN" ports. Use any of them, like you would a normal switch. Only the physical port labeled "eth0" can support 24V PoE in. (PoE out is covered in the Wiki, see references below)

Performance test: LAN
At this point I have everything up and running and I am very happy to have internet up. New hardware is in play, but how fast is it? speedtest(dot)net puts my connection around 550/400 down/up, and the CPU on my ERX drops to less than 5% idle. I know my Centurylink(dot)net 1Gbps fiber connection can do 930/930. Lets look at what iperf says, for local traffic:

NEED MORE SPEED!! Enabling hardware flow control:
BIG FAT WARNING! Hardware flow offloading and SQM are incompatible with each other.
Through the web interface, Network --> Firewall, "Software flow offloading, which will then allow you to enable "Hardware flow offloading". All other setting are unchanged/defaults.
SQM on the other hand is an installed package 'opkg install luci-app-sqm' Network --> SQM QoS.

1. SQM works with software flow offload, allowing throughput of up to 200mbps with +3ms bufferbloat. Any thing faster maxes the CPU.
2. HW flow offload resulting in 900mbps but the +200ms bufferbloat hurts
3. NO HW flow offload, NO SQM, resulting in 550+ mbps with +80ms bufferbloat

Final thoughts.
At a $50 USD price point, this thing is AMAZING! Getting to OpenWRT is almost painless, as it requires one extra step. Serial console on the PCB is a VERY nice fall back, for when I brick the ERX. Hardware acceleration is a major boost, if you can suffer a little buffer bloat.

CenturyLink fiber config
For any one who follows in my tracks, here is my full networking config, including VLAN 201 stuff required by CenturyLink fiber. Please note on the VLAN 201, both ports need to be tagged "option ports '4t 6t'"

I'm a total newbie here and just flashed this. So far internet works on port 4 and lan works on ports 0-3. How did you get the web interface to show up? I type in 192.168.1.1 and I don't see the luci web interface.

Fantastic article, it went flawlessly for my brand new ERX thanks to it.
I used the serial console for the install and upgrade to stock 18.06.1
Just out of curiosity, has anyone tried updating from EdgeOS' web using the compiled tar ?

HW flow offload is not compatible with SQM, resulting in 900+ mbps with +200ms bloat

Is that right? That's actually pretty good. Out of this relatively cheap device, you can nearly max out a 1 Gbps connection with HW offload (but with bloat) or you can get roughly half that with funcitonal SQM and minimal bloat.

I'd like some clarity on this as well, as far as I can tell from reading back, the 550mbps might have been without software offload or SQM. I'd be very surprised if this device can do SQM at 550Mbps that's x86 territory