WireGuard / wireguard-vyatta-ubnt

WireGuard for Ubiquiti Devices
https://www.wireguard.com/
GNU General Public License v3.0
1.46k stars 69 forks source link

Any plans to support UbiOS? #32

Closed tusc closed 2 years ago

tusc commented 4 years ago

With the UDM and UDM pro having a much more powerful CPU based on an Alpine AL-324 ARM® Cortex-A57, doesn't it make sense to include support for this platform?

I've managed to compile the userland tools using Buildroot but no luck with the kernel modules. The kernel config is available but the generic kernel source seems to be missing patches against the Alpine architecture.

FossoresLP commented 4 years ago

There has been a request for this before though not via a public GitHub issue. I would be open to adding support but compiling kernel modules is the hard part like you already said. A temporary solution that we could explore would be compiling on the device itself since they have the necessary performance for that. Since I do not own an UDM I cannot test this however. Otherwise we would have to ask Ubiquiti for kernel source to cross-compile.

Lochnair commented 4 years ago

Ubiquiti doesn't always publish GPL archives when releasing new FW versions/models, but nagging them on the forums usually works.

I assume UbiOS isn't based on EdgeOS/Vyatta anymore?

FossoresLP commented 4 years ago

AFAIK it is still based on Debian but everything else is completely reworked. It is also no longer running on MIPS but instead on ARM64/AArch64. See ubios-recon.txt for some more information that was provided in the previous conversation about adding UbiOS support. I have asked the Ubiquiti Support directly for the GPL archive before and they referred me to the forums but I never got around to asking there. Also I would still suggest creating a new repository for this since it is basically a completely different thing. @tusc Could you try manually (using dpkg) installing the packages from Debian can be found here? Not sure if DKMS is available but if it is this might work.

kiall commented 4 years ago

AFAIK it is still based on Debian but everything else is completely reworked.

UbiOS is not Debian based anymore:

https://community.ui.com/questions/Introducing-the-UniFi-Next-Gen-Gateway-Product-Line-Starting-with-UXG-Pro-/732dd4dd-10bf-463c-8622-382d77702872#answer/a48566cc-e2cd-4695-826a-832d5a6ae9c1

Seems it's "custom" based upon https://buildroot.org/ - I've no idea though what that uses under the covers, or if buildroot is from scratch.

tusc commented 4 years ago

There are a lot of references to ALPINE in the kernel config file (found on the UDM under /proc/config.gz). Also a lot of reference to MT7603E (one of the wifi chips). None of these are in the generic 4.1.37 kernel tree.

config-UDM.txt

They also must be using a custom buildroot version as seen in the kernel boot up message:

[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.1.37-v1.7.2-rc.5.2620-469e612 (builder@link-xenial-builder) (gcc version 6.4.0 (Buildroot 0.9.0.0) ) #1 SMP Tue Jun 2 13:31:58 MDT 2020

tusc commented 4 years ago

@FossoresLP I did ask recently in the forums but was given a lecture on how to interpret the GPL:

https://community.ui.com/questions/UbiOS-kernel-source-code/48b98dd0-f418-48a2-ab1a-bc6f49e4c82f

FossoresLP commented 4 years ago

@tusc Thanks for asking on the forums. Since there has not been any official response, I would hope that they will still provide the source code. Maybe it would be a good idea to directly CC someone on the UbiOS team if you can find out who that could be.

tusc commented 4 years ago

I've tagged UI-Glenn in that thread for a reply as he is the UI employee that responds the most in the forums. We will see.

tusc commented 4 years ago

@FossoresLP

I did reach out to UI support and they responded with the following. It sounds like they might release it in the future but not now.

"Vivian N. (Ubiquiti Networks Help Center)

Jul 1, 2020, 1:41 PM PDT

Thanks for getting in touch with us! We don't have any plan to release the GPL source code for the UDM and UDM pro yet. If you have any other questions, please let us know!

Thanks!

UI Team"

sprocktech commented 3 years ago

This project offers Wireguard on the UDM platform: https://github.com/boostchicken/udm-utilities/tree/master/wireguard-go

tusc commented 3 years ago

Yep, and I did a similar project using boringtun for the UDM platform: https://github.com/tusc/wireguard

Unfortunately both run in userland, ideally a kernel build would be faster.

FossoresLP commented 2 years ago

@tusc @peacey I finally got around to merging the UDM support into this repo. The documentation is still something I have to work on but I'll take care of that ASAP. It looks like there have been a few new commits to your repo in the meantime. Would you mind opening a PR to get them in here, too? I can't really test UDM builds so I would prefer if you could take care of that.

peacey commented 2 years ago

@FossoresLP, thank you so much for getting this added to the repo! We will open a PR request to keep it up to date with our changes and test it. If you want, we can also write up a documentation for it as well to save you some trouble.

FossoresLP commented 2 years ago

@peacey Thank you very much for your work in getting the UDM support ready to merge and for keeping it up-to-date in the future. It would be great if you could take care of the documentation as you know a lot more about the UDM than I do. I'd like to try to use the wiki for that, but there are some issues with that (no more PRs for documentation) that I'll try to work out. EDIT: You should both have write access to the wiki now.