diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2015-06-05 15:58:00 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-06-25 16:48:39 +0200 |
commit | 99d303ac2739e65a02fbbc325b74ad6fcac63cc2 (patch) | |
tree | 6f4095f42d3d298cdd5ab8bc6f8ed89d9673b38b /contrib/patch-kernel-builtin.sh | |
download | wireguard-monolithic-historical-99d303ac2739e65a02fbbc325b74ad6fcac63cc2.tar.xz wireguard-monolithic-historical-99d303ac2739e65a02fbbc325b74ad6fcac63cc2.zip |
Initial commit
Diffstat (limited to 'contrib/patch-kernel-builtin.sh')
-rwxr-xr-x | contrib/patch-kernel-builtin.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/patch-kernel-builtin.sh b/contrib/patch-kernel-builtin.sh new file mode 100755 index 0000000..8229762 --- /dev/null +++ b/contrib/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" |