summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-kernel
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2017-04-26 22:30:21 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-04-27 12:02:13 -0400
commit9867ffa48e2a4001fa743e5a0b9a96074da46ffb (patch)
tree8686ce446fbafc914b41759ae3d6bb329a85a80a /meta-networking/recipes-kernel
parent57d3b5c5c8e6b649f0b029ce5a2a4c51387e3882 (diff)
downloadmeta-openembedded-9867ffa48e2a4001fa743e5a0b9a96074da46ffb.tar.gz
wireguard: add WireGuard kernel module and tools
WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPSec, while avoiding the massive headache. The recipes add the current experimental snapshot v0.0.20170421 out-of-tree kernel module and tools. The kernel module has some kernel configuration dependencies such as some configuration part of features/netfilter/netfilter.scc, hence netfilter.scc should be part of KERNEL_EXTRA_FEATURES (which is the case by default). Since wireguard-tools is TUNE_PKGARCH and depends on wireguard-module which is MACHINE_ARCH (like all kernel modules) we need to add this dependency to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-kernel')
-rw-r--r--meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170421.bb13
-rw-r--r--meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170421.bb27
-rw-r--r--meta-networking/recipes-kernel/wireguard/wireguard.inc18
3 files changed, 58 insertions, 0 deletions
diff --git a/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170421.bb b/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170421.bb
new file mode 100644
index 000000000..cb21bda93
--- /dev/null
+++ b/meta-networking/recipes-kernel/wireguard/wireguard-module_0.0.20170421.bb
@@ -0,0 +1,13 @@
1require wireguard.inc
2
3inherit module
4
5# This module requires Linux 3.10 higher and several networking related
6# configuration options. For exact kernel requirements visit:
7# https://www.wireguard.io/install/#kernel-requirements
8
9EXTRA_OEMAKE += "KERNELDIR=${STAGING_KERNEL_DIR}"
10MAKE_TARGETS = "module"
11MODULES_INSTALL_TARGET = "module-install"
12
13RRECOMMENDS_${PN} = "kernel-module-xt-hashlimit"
diff --git a/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170421.bb b/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170421.bb
new file mode 100644
index 000000000..79d420f1a
--- /dev/null
+++ b/meta-networking/recipes-kernel/wireguard/wireguard-tools_0.0.20170421.bb
@@ -0,0 +1,27 @@
1require wireguard.inc
2
3inherit bash-completion systemd pkgconfig
4
5DEPENDS = "wireguard-module libmnl"
6
7do_compile_prepend () {
8 cd ${S}/tools
9}
10
11do_install () {
12 cd ${S}/tools
13 oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
14 SYSTEMDUNITDIR="${systemd_unitdir}" \
15 WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
16 WITH_BASHCOMPLETION=yes \
17 WITH_WGQUICK=yes \
18 install
19}
20
21FILES_${PN} = " \
22 ${sysconfdir} \
23 ${systemd_unitdir} \
24 ${bindir} \
25"
26
27RDEPENDS_${PN} = "wireguard-module"
diff --git a/meta-networking/recipes-kernel/wireguard/wireguard.inc b/meta-networking/recipes-kernel/wireguard/wireguard.inc
new file mode 100644
index 000000000..46a9971f8
--- /dev/null
+++ b/meta-networking/recipes-kernel/wireguard/wireguard.inc
@@ -0,0 +1,18 @@
1SUMMARY = "WireGuard is an extremely simple yet fast and modern VPN"
2DESCRIPTION="WireGuard is a secure network tunnel, operating at layer 3, \
3implemented as a kernel virtual network interface for Linux, which aims to \
4replace both IPsec for most use cases, as well as popular user space and/or \
5TLS-based solutions like OpenVPN, while being more secure, more performant, \
6and easier to use."
7SECTION = "networking"
8HOMEPAGE = "https://www.wireguard.io/"
9LICENSE = "GPLv2"
10
11LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
12
13SRC_URI = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz"
14
15SRC_URI[md5sum] = "8e559f4fd672b15c38a15eb4d88cc84d"
16SRC_URI[sha256sum] = "03c82af774224cd171d000ee4a519b5e474cc6842ac04967773cf77b26750000"
17
18S = "${WORKDIR}/WireGuard-${PV}/src/"