summaryrefslogtreecommitdiffhomepage
path: root/kernel-tree-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'kernel-tree-scripts')
-rwxr-xr-xkernel-tree-scripts/create-patch.sh20
-rwxr-xr-xkernel-tree-scripts/jerry-rig.sh (renamed from kernel-tree-scripts/patch-kernel-builtin.sh)2
2 files changed, 21 insertions, 1 deletions
diff --git a/kernel-tree-scripts/create-patch.sh b/kernel-tree-scripts/create-patch.sh
new file mode 100755
index 0000000..93b7bed
--- /dev/null
+++ b/kernel-tree-scripts/create-patch.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../../src/")"
+
+for i in "$WG"/*.c "$WG"/*.h "$WG"/crypto/*.c "$WG"/crypto/*.h "$WG"/crypto/*.S "$WG"/Kbuild "$WG"/Kconfig; do
+ diff -u /dev/null "$i" | sed "s:${WG}:b/net/wireguard:;s:Kbuild:Makefile:"
+done
+
+cat <<_EOF
+--- a/net/Kconfig
++++ b/net/Kconfig
+@@ -85,1 +85,2 @@ config INET
+ if INET
++source "net/wireguard/Kconfig"
+--- a/net/Makefile
++++ b/net/Makefile
+@@ -8,1 +8,2 @@
+ obj-\$(CONFIG_NET) := socket.o core/
++obj-\$(CONFIG_WIREGUARD) += wireguard/
+_EOF
diff --git a/kernel-tree-scripts/patch-kernel-builtin.sh b/kernel-tree-scripts/jerry-rig.sh
index 65cb489..3d4139a 100755
--- a/kernel-tree-scripts/patch-kernel-builtin.sh
+++ b/kernel-tree-scripts/jerry-rig.sh
@@ -1,7 +1,7 @@
#!/bin/sh
K="$1"
-WG="$(readlink -f "$(dirname "$(readlink -f "$0")")/../src/")"
+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