From eed146f01cda1e40cf49e15def785a38143fed0e Mon Sep 17 00:00:00 2001 From: RealStickman Date: Fri, 29 Jul 2022 19:10:24 +0200 Subject: [PATCH] Add wireguard patch instructions --- arch-config/Dokumente/lineageos-build.md | 54 +++++++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/arch-config/Dokumente/lineageos-build.md b/arch-config/Dokumente/lineageos-build.md index 9372831f..24a2bd32 100644 --- a/arch-config/Dokumente/lineageos-build.md +++ b/arch-config/Dokumente/lineageos-build.md @@ -34,6 +34,7 @@ max_size = 30G cache_dir = /var/lineageos-cache ``` +`$ export PATH="${PATH}:/home/exu/.local/bin"` `$ echo 'export USE_CCACHE=1' >> ~/.bashrc` ### Install repo tool @@ -63,12 +64,61 @@ Initialize the repo Sync repo content This can take a long time -`$ repo sync --force-sync` +`$ repo sync` Repo fetches the latest version automatically, so we can use a symlink `$ ln -sf /var/lineageos-build/lineage/.repo/repo/repo ~/.local/bin/repo` -### Download device source files +## Add Wireguard patch to kernel + +### Fetch source +Create the file `(SRC_DIR)/.repo/local_manifests/wireguard.xml` +`(SRC_DIR)` is your `.../lineage/` directory +Make sure to replace `(KERNEL_DIR)` with your device's kernel directory. +For example `(SRC_DIR)/kernel/oneplus/msm8996` +``` + + + + + + + + +``` + +Run `repo sync` + +### Add kernel patch +Edit `(KERNEL_DIR)/net/Makefile` +``` + obj-$(CONFIG_LLC) += llc/ + obj-$(CONFIG_NET) += ethernet/ 802/ sched/ netlink/ + obj-$(CONFIG_NETFILTER) += netfilter/ ++obj-$(CONFIG_WIREGUARD) += wireguard/ + obj-$(CONFIG_INET) += ipv4/ + obj-$(CONFIG_XFRM) += xfrm/ + obj-$(CONFIG_UNIX) += unix/ +``` + +Edit `(KERNEL_DIR)/net/Kconfig` +``` + if INET + source "net/ipv4/Kconfig" + source "net/ipv6/Kconfig" + source "net/netlabel/Kconfig" ++source "net/wireguard/Kconfig" +``` + +Edit `(KERNEL_DIR)/arch/(ARCH)/configs/lineageos_(DEVICE)_defconfig` + +``` + CONFIG_L2TP=y + CONFIG_BRIDGE=y ++CONFIG_WIREGUARD=y +``` + +## Download device source files Activate the build environment `$ . ./build/envsetup.sh`