1. Download Cavium Open Source Distributions Octeaon SDK
2. Clone latest linux kernel sources https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
3. Download the GPL Archive of UBNT (if they released it according to GPL and not infringed the license…), I was able to find it for the security gateway (UGW3) on the firmware download page by clicking on the row. However most other products it is not there.
tar -xjf toolchain-build-54.tar.bz2; tar -xjf toolchain-GCC-7.3-build-230.tar.bz2
…to be continued…