Comments (40)
WireGuard version: 1.0.20200908
WireGuard tools version: 1.0.20200827
libmnl version: 1.0.4
You use it at your own risk. I am not responsible for the consequences of using this package.
WireGuard-geminilake-1.0.20200908.zip
from synology-wireguard.
Let me repeat, I am dumb ( I forgot to re-build the docker image). So long story short, here's the dumbed down version to get it up and running on your Geminilake:
1.git clone https://github.com/runfalk/synology-wireguard.git
2.cd synology-wireguard/
3. sudo vi build.sh
4. Locate line 36 (git clone https://github.com/SynologyOpenSource/pkgscripts-ng) position your cursor on it
5. 'i' for insert
6. Delete the line and replace with 'git clone -b patch-1 https://github.com/Matige/pkgscripts-ng'
7. Escape key
8. :wq Enter to exit vim
9. sudo docker build -t synobuild .
10. sudo docker run --rm --privileged --env PACKAGE_ARCH=geminilake --env DSM_VER=6.2 --env HAS_MEMNEQ=1 -v $(pwd)/artifacts:/result_spk synobuild
Now you should have a usable .spk in your artifacts folder.
Thanks @runfalk and @Matige for figuring it out. Hopefully pkgscripts-ng merges your pull request soon, I approved it (not that that will do anything) :-)
from synology-wireguard.
Anything new about this? I would like to install docker WireGuard in my DS920+
from synology-wireguard.
The error when compiling for Geminilake using the recently released SDK is due to an error in pkgscripts-ng. I have already submitted a pull request (SynologyOpenSource/pkgscripts-ng#26). For the Geminilake platform you should also skip applying memneq patch.
After applying these changes the package was built without any problems. Unfortunately, I don't currently have a Geminilake device to check its operation. However, two DS220+ are already coming to me, so I will soon find out if Wireguard works properly.
If you want to test a package yourself, the easiest way to build a package is to edit the build.sh
file and change the line
git clone https://github.com/SynologyOpenSource/pkgscripts-ng
to
git clone -b patch-1 https://github.com/Matige/pkgscripts-ng
Then run the docker build with the additional --env HAS_MEMNEQ=1
argument
sudo docker run --rm --privileged --env PACKAGE_ARCH=geminilake --env DSM_VER=6.2 --env HAS_MEMNEQ=1 -v $(pwd)/artifacts:/result_spk synobuild
from synology-wireguard.
Read the section Avoiding timeouts when downloading build files in README. You can download these files manually and map the folder to the /toolkit_tarballs Docker volume.
from synology-wireguard.
That repo does unfortunately seem quite abandoned from Synology. I might end up building the patch into this project to work around the issue.
from synology-wireguard.
I'll keep it open so people with Gemenilake can find it easily. I'll close it when Synology fixes their repo or when I get around to implementing the patch myself.
from synology-wireguard.
Turns out the support wasn't there quite yet, but I have merged a workaround based on @Matige's work.
from synology-wireguard.
It doesn't seem like Synology provides a specific SDK for Gemini Lake (https://sourceforge.net/projects/dsgpl/files/toolkit/). Some googling seems to indicate that Gemini Lake is very similar to Apollo Lake. So maybe you can try an Apollo Lake release and see if that works?
Let me know if it works for you!
from synology-wireguard.
Had a shot on it but unfortunately the DSM is not allowing to install either x86 or apollolake package.
I also saw that https://github.com/nirev/synology-tailscale could actually work with geminilake and they credit that their building process is based on this project. So maybe you can checkout their implementation?
from synology-wireguard.
Hm, they don't do any compilation in that project it seems. They just label the amd64 package as compatible with a lot of CPUs. If you're feeling adventurous you could try:
- Clone this project
- Modify
INFO.sh
and hard codearch
tox64 x86 apollolake avoton braswell broadwell broadwellnk bromolow cedarview denverton dockerx64 grantley purley kvmx64 x86_64
(that's what the Tailscale project uses) - Create new docker image and make a new build according to the README.
If this works then one of the architectures in that list allows it to be installed. If you figure out which one I may be able to make a geminilake compatible release.
from synology-wireguard.
After did modification the apollolake version seems to work for me!
https://github.com/developStorm/synology-wireguard/actions/runs/209949062
Update: I hope someone could test this out, I can install and activate it in DSM but encountering issue with wg-quick up.
from synology-wireguard.
Could you provide kernel logs such as from dmesg
when this happens?
from synology-wireguard.
Not really, my NAS was disconnected from the network and becomes unresponsive so that I have to force restart it. The log should already be lost during restart.
from synology-wireguard.
Hm, could you paste your config? (remember to redact sensitive information)
You could try to save the log to disk using something like (wg-quick up wg0; dmesg) > log.txt
from synology-wireguard.
I'm not sure what you're asking for @vidalpascual. This project has nothing to do with docker. Docker is only used on your desktop to build the SPK, but it's actually technically not required.
You could try the same approach I proposed to @developStorm and get an SPK that you can install on your device.
from synology-wireguard.
Sorry for the misunderstanding. I wanted to say that I would like to install this SPK WireGuard packet in my DS920+. I don't think that @developStorm approach went so well: "my NAS was disconnected from the network and becomes unresponsive"
from synology-wireguard.
It could be a configuration issue. Hard to tell at this point.
Without someone with a Gemini Lake NAS to assist me with the debugging, I can't help.
from synology-wireguard.
I can help you then, what do you need me to do?
from synology-wireguard.
Same here, also with a DS920+
What can we do ?
from synology-wireguard.
Hm, they don't do any compilation in that project it seems. They just label the amd64 package as compatible with a lot of CPUs. If you're feeling adventurous you could try:
1. Clone this project 2. Modify `INFO.sh` and hard code `arch` to `x64 x86 apollolake avoton braswell broadwell broadwellnk bromolow cedarview denverton dockerx64 grantley purley kvmx64 x86_64` (that's what the Tailscale project uses) 3. Create new docker image and make a new build according to the README.
If this works then one of the architectures in that list allows it to be installed. If you figure out which one I may be able to make a geminilake compatible release.
Perform the steps here and try it. As long as you don't try to run wg-quick
on startup I think everything should be OK, though no guarantees of course. If your NAS become unresponsive like for @developStorm try to restart it.
If it doesn't work, please provide dmesg
output and your wireguard configuration.
from synology-wireguard.
I can try this on my DS720+. I have cloned and replaced INFO.sh like you said. Now what do I fill in the build command for the arch?
sudo docker run --rm --privileged --env PACKAGE_ARCH=<arch> --env DSM_VER=6.2 -v $(pwd)/artifacts:/result_spk synobuild
from synology-wireguard.
I tried this before:
sudo docker run --rm --privileged --env PACKAGE_ARCH=amd64 --env DSM_VER=6.2 -v $(pwd)/artifacts:/result_spk synobuild
But as you can see I ended up failing, so I'm not sure if that's the right parameter.
from synology-wireguard.
I tried 3 different archs now:
amd64:
PlatformNotAvailableError:
[amd64] is not available platform.
apollolake: builds but I can't install it in DSM. Aborts with a generic error message.
geminilake: I get further than @developStorm in the OP but it fails later on during the build:
2020-10-15 05:30:50 (200 KB/s) - 'wireguard-linux-compat-1.0.20200908.tar.xz' saved [262708]
patching file wireguard-linux-compat-1.0.20200908/src/compat/Kbuild.include
Hunk #1 succeeded at 42 with fuzz 2.
make[1]: Entering directory '/source/WireGuard/wireguard-linux-compat-1.0.20200908/src'
make[2]: Entering directory '/source/WireGuard/wireguard-linux-compat-1.0.20200908/src'
make[2]: *** /usr/local/i686-pc-linux-gnu/i686-pc-linux-gnu/sys-root/usr/lib/modules/DSM-6.2/build: No such file or directory. Stop.
make[2]: Leaving directory '/source/WireGuard/wireguard-linux-compat-1.0.20200908/src'
Makefile:26: recipe for target 'module' failed
make[1]: *** [module] Error 2
make[1]: Leaving directory '/source/WireGuard/wireguard-linux-compat-1.0.20200908/src'
Makefile:64: recipe for target 'wireguard-linux-compat-1.0.20200908/src/wireguard.ko' failed
make: *** [wireguard-linux-compat-1.0.20200908/src/wireguard.ko] Error 2
make: Leaving directory '/source/WireGuard'
[Error] Build project fail!
Time cost: 00:00:06 [Build-->WireGuard]
[INFO] Build WireGuard finished!
----------------- Time cost statistics -----------------
Time cost: 00:00:06 [Build-->WireGuard]
########################################################
Error(s) occurred on project "WireGuard"
########################################################
1 projects, 1 failed.
[Error] Check [/logs/error.build] for fixing errors.
Install log
===========
cat: /build_env/ds.geminilake-6.2/logs.install: No such file or directory
/logs/error.build does not exist.
from synology-wireguard.
Sorry I might have misled you, but I actually tried x64 and apollolake architecture: https://github.com/developStorm/synology-wireguard/actions/runs/209949062/workflow
I'm not sure why you weren't able to install the apollolake version since I was, at least, be able to install it before
from synology-wireguard.
It doesn't seem like Synology provides a specific SDK for Gemini Lake (https://sourceforge.net/projects/dsgpl/files/toolkit/).
Apparently there is an official SDK for Gemini now, however, it doesn't compile properly - the error message is the same as @MadWalnut provided.
from synology-wireguard.
Maybe you can have a look now, since there's a official SDK for Gemini.
I think if we have to wait for Synology for Wireguard support.....
from synology-wireguard.
Ran into the same problem. The problem is that at /usr/local/i686-pc-linux-gnu/i686-pc-linux-gnu/sys-root/usr/lib/ there is no 'modules' directory. In fact the only place that exists for DSM-6.2 is under this path:
/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-6.2/build/
from synology-wireguard.
The error when compiling for Geminilake using the recently released SDK is due to an error in pkgscripts-ng. I have already submitted a pull request (SynologyOpenSource/pkgscripts-ng#26). For the Geminilake platform you should also skip applying memneq patch.
After applying these changes the package was built without any problems. Unfortunately, I don't currently have a Geminilake device to check its operation. However, two DS220+ are already coming to me, so I will soon find out if Wireguard works properly.
If you want to test a package yourself, the easiest way to build a package is to edit the
build.sh
file and change the line
git clone https://github.com/SynologyOpenSource/pkgscripts-ng
to
git clone -b patch-1 https://github.com/Matige/pkgscripts-ng
Then run the docker build with the additional
--env HAS_MEMNEQ=1
argument
sudo docker run --rm --privileged --env PACKAGE_ARCH=geminilake --env DSM_VER=6.2 --env HAS_MEMNEQ=1 -v $(pwd)/artifacts:/result_spk synobuild
Thanks, I will do this on my 920+ tomorrow and report back.
from synology-wireguard.
That's great news!
After compiling could you share a version with me so I can test on my 920+?
from synology-wireguard.
Thx! I'll report my results back.
from synology-wireguard.
I've tried about 5 times now and got through some failed to download packages to completeness errors (they were ending the DL before they were complete for some reason) but now arrive at this error:
DownloadToolkitError: ] 0% URL https://sourceforge.net/projects/dsgpl/files/toolkit/DSM6.2/ds.geminilake-6.2.env.txz does not exist. Please ask synology support for assistance. ] 0% ] 0% ] 0% [ERROR] pkgscripts-ng/EnvDeploy -p geminilake -v 6.2 failed! ] 0% cp: cannot create regular file '/build_env/ds.geminilake-6.2/etc/ssl/certs/': No such file or directory ] 0%
from synology-wireguard.
@Matige
Even cloning the patch I'm still arriving at the same pkgscripts issue as before:
make[1]: Entering directory '/source/WireGuard/wireguard-linux-compat-1.0.20200908/src'
make[2]: Entering directory '/source/WireGuard/wireguard-linux-compat-1.0.20200908/src'
make[2]: *** /usr/local/i686-pc-linux-gnu/i686-pc-linux-gnu/sys-root/usr/lib/modules/DSM-6.2/build: No such file or directory. Stop.
make[2]: Leaving directory '/source/WireGuard/wireguard-linux-compat-1.0.20200908/src'
Makefile:26: recipe for target 'module' failed
make[1]: *** [module] Error 2
from synology-wireguard.
@babcoccl
You must have gone wrong somewhere because I did the compilation in the morning and it all went smoothly. I even included the compiled package in the comment. Are you sure you have made changes in the build.sh
file?
from synology-wireguard.
@babcoccl make sure you have actually made a new Docker image. The build script is included in the image when you create it, so after each update to it you must rebuild the docker image.
from synology-wireguard.
@babcoccl
You must have gone wrong somewhere because I did the compilation in the morning and it all went smoothly. I even included the compiled package in the comment. Are you sure you have made changes in thebuild.sh
file?
You're right, I'm dumb, must not have escaped vim correctly when I thought I wrote.
@runfalk
I actually did clean up everything manually to make sure I was starting fresh. Still getting the error above even after changing the build script and clearing everything out. I've reviewed @Matige changes and in theory I shouldn't be getting that incorrect path anymore. I'll keep playing with it and see if I can get anything different
from synology-wireguard.
That repo does unfortunately seem quite abandoned from Synology. I might end up building the patch into this project to work around the issue.
Or fork the pkgscripts-ng repo and maintain it in parallel? :-(
from synology-wireguard.
@runfalk I think you can close this one down as the manual build is pretty painfree
from synology-wireguard.
You use it at your own risk. I am not responsible for the consequences of using this package.
WireGuard-geminilake-1.0.20200908.zip
Thanks a million! This one does work well with my brand new DS220+ (geminilake) with the standard instructions provided on the main git page. Nothing extra like docker install or package build. Used it straight and it works like a charm.
from synology-wireguard.
Seems like there are geminilake support is available now, so I'll close this.
from synology-wireguard.
Related Issues (20)
- Build SPK on DSM 7.1 on DS920+ (geminilake) fails HOT 14
- Cannot start WireGuard via ssh : command not found HOT 4
- compatibility list / DS118 DSM6 HOT 1
- Trying to use it as a Wireguard "client" to replace Synology's built-in OpenVPN client, but other devices cannot see internet HOT 2
- Not working with DSM 7.1.1-42962 Update 1 HOT 22
- Unable to start Wireguard in DSM 7.1.1-42962 Update 1: Unable to access interface: No such device HOT 1
- Braswell (DS716+II)
- DS918+ DSM7.1 Compiling issue HOT 4
- Help:Handshake successful could access server side LAN but not internet.
- the command "wg show" displays my interface but nothing goes through the tunnel HOT 5
- Any update for DSM 7.2 beta? HOT 9
- rtd1619b arch Compile error HOT 1
- Compile error on DSM 7.2 armada38x HOT 4
- Package fails to run on DSM 7.2 HOT 1
- im try to compile wireguard in kernal version 6.2.0.32
- Module verification failed, module removed HOT 1
- After installation and configuration on DS220+ DSM Web login not possible HOT 1
- wireguard kernel module not loaded
- The container fails to build the wireguard package (at least over here). HOT 1
- Where to I find the config files? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synology-wireguard.