tailscale / tailscale-qpkg

Package Tailscale client in QPKG
MIT License
457 stars 38 forks source link

arm-x19 support? #4

Closed brunoga closed 4 years ago

brunoga commented 4 years ago

I have an old NAS (QNAP TS-219P) with a Marvell CPU (arm-x19) that I would love to get tailscale running on. Any chance you could support this (assuming tailscale itself would compile for this platform, that is)?

ivokub commented 4 years ago

It seems that it would be possible to compile tailscale to different arm architecture versions (https://github.com/golang/go/wiki/GoArm). However, I am not sure which arm architecture versions maps to which QNAP arm versions. I assume that QNAP arm-x19 corresponds to armv7, but I am not sure.

Would it be possible to give the output of cat /proc/cpuinfo on your NAS?

brunoga commented 4 years ago

Here it is:

cat /proc/cpuinfo

Processor name : Feroceon 88F6281 rev 1 (v5l) @ 1.2 GHz BogoMIPS : 1196.85 Features : swp half thumb fastmult edsp CPU implementer : 0x56 CPU architecture: 5TE CPU variant : 0x2 CPU part : 0x131 CPU revision : 1

Hardware : Feroceon-KW ARM Revision : 0000 Serial : 0000000000000000

It is actually ARMv5. So GOARM=5 should do the trick. Is tailscale pure Go? Otherwise a C toolchain for arm v5 should be needed.

Thanks for looking into this. It would be great to have it working on this NAS.

brunoga commented 4 years ago

FYI, I got it to work by simply replacing all occurrences of -x41 to -x19 and forcibly setting GOARM=5.

I guess what you might want to do is to add a -19 qbuild and them compile one other arm version with GOARM=5 set. You will need to change your naming strategy (maybe add GOARCH and GOARM to the name instead of only GOARCH when arch is ARM?

iharsuvorau commented 4 years ago

@brunoga Thank you! Your solution works for the old HS-210 as well.

ivokub commented 4 years ago

Thanks for the feedback and confirming that GOARM=5 works on your QNAP.

I created a pull request. It looks like ARM-x19 package compiles fine. I am merging the pull request and closing the issue for now. If the package does not install or work nicely, then please reopen.