aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel-tree-scripts
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2015-06-05 15:58:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-06-25 16:48:39 +0200
commitb448d6f35bf1d3faf961347c23835f7237548065 (patch)
treec908492ab6e5953f5d6b9fe91fca0bf4fde21c4a /kernel-tree-scripts
downloadwireguard-linux-compat-b448d6f35bf1d3faf961347c23835f7237548065.tar.xz
wireguard-linux-compat-b448d6f35bf1d3faf961347c23835f7237548065.zip
Initial commit
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'kernel-tree-scripts')
-rwxr-xr-xkernel-tree-scripts/patch-kernel-builtin.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel-tree-scripts/patch-kernel-builtin.sh b/kernel-tree-scripts/patch-kernel-builtin.sh
new file mode 100755
index 0000000..8229762
--- /dev/null
+++ b/kernel-tree-scripts/patch-kernel-builtin.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+K="$1"
+WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../src/")"
+
+if [[ ! -e $K/net/Kconfig ]]; then
+ echo "You must specify the location of kernel sources as the first argument." >&2
+ exit 1
+fi
+
+sed -i "/^if NET/a source \"$WG/Kconfig\"" "$K/net/Kconfig"
+echo "obj-y += ../../../../../../../../../../../../../../../../../../../../../..$WG/" >> "$K/net/Makefile"