[PATCH] contrib: fix out-of-tree build with jerry-rig.sh

Benedikt Morbach benedikt.morbach at googlemail.com
Wed May 10 23:31:23 CEST 2017


this makes the build system put the objects in ${O}/net/wireguard
instead of ${O}/../../../../../../../../../../../../../../../../../../../../../..${WG}/
(where ${WG} is the full path to wireguard/src), allowing out-of-tree
kernel builds to work with WireGuard jerry-rigged in.
---
 contrib/kernel-tree/jerry-rig.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/kernel-tree/jerry-rig.sh b/contrib/kernel-tree/jerry-rig.sh
index 3d4139a..afc1d9d 100755
--- a/contrib/kernel-tree/jerry-rig.sh
+++ b/contrib/kernel-tree/jerry-rig.sh
@@ -8,5 +8,6 @@ if [[ ! -e $K/net/Kconfig ]]; then
 	exit 1
 fi
 
-sed -i "/^if INET\$/a source \"$WG/Kconfig\"" "$K/net/Kconfig"
-echo "obj-y += ../../../../../../../../../../../../../../../../../../../../../..$WG/" >> "$K/net/Makefile"
+ln -sfT "../../../../../../../../../../../../../../../../../../../../../..$WG/" "$K/net/wireguard"
+sed -i "/^if INET\$/a source \"net/wireguard/Kconfig\"" "$K/net/Kconfig"
+echo "obj-y += wireguard/" >> "$K/net/Makefile"
-- 
2.12.2



More information about the WireGuard mailing list