[GH-ISSUE #147] Kernel source requirement for 5.6+ builds successfully with headers only #91

Open
opened 2026-10-13 21:06:27 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @fa1rid on GitHub (Mar 7, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/147

The README states that for kernels ≥ 5.6, the full kernel source tree is required and must be symlinked to src/kernel. However, the module builds and functions correctly using only the linux-headers package, without the kernel source or symlink.
Environment:

  • Debian 13 (trixie), arm64
  • Kernel: 6.12.73+deb13-arm64
  • DKMS build with linux-headers-arm64, no linux-source installed

What I checked:

  • compat/Kbuild.include resolves all $(srctree) wildcard checks against the headers directory — on 6.12, every header exists, so no compat shim is compiled
  • dkms.conf has no custom MAKE or BUILD_DEPENDS referencing kernel source
  • Kbuild has no reference to a kernel symlink
  • The built module loads, creates amneziawg-type interfaces, and passes traffic with AmneziaWG-specific parameters

Is the kernel source requirement still accurate for modern kernels? If it's only needed for older 5.x kernels where certain headers are missing, it might be worth clarifying that in the README.

Install on Debian 13:

apt-get update && apt-get install -y build-essential dkms git "linux-headers-$(dpkg --print-architecture)"
# Reboot if it installed new kernel

repo="/usr/src/amneziawg-linux-kernel-module"
git clone https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git "$repo"
make -C "${repo}/src" dkms-install
dkms add "amneziawg/1.0.0"
dkms build "amneziawg/1.0.0"
dkms install "amneziawg/1.0.0"
echo "amneziawg" > /etc/modules-load.d/amneziawg.conf
modprobe amneziawg
lsmod | grep amneziawg
modinfo amneziawg

Output:

lsmod | grep amneziawg
amneziawg             110592  0
libchacha20poly1305    16384  1 amneziawg
libcurve25519_generic    32768  1 amneziawg
ip6_udp_tunnel         16384  1 amneziawg
udp_tunnel             32768  1 amneziawg


modinfo amneziawg
filename:       /lib/modules/6.12.73+deb13-arm64/updates/dkms/amneziawg.ko.xz
intree:         Y
alias:          net-pf-16-proto-16-family-amneziawg
alias:          rtnl-link-amneziawg
version:        1.0.20251009
author:         Jason A. Donenfeld <Jason@zx2c4.com>, AmneziaVPN <admin@amnezia.org>
description:    AmneziaWG secure network tunnel
license:        GPL v2
srcversion:     CF17DBA902A6A711D43DA4A
depends:        libcurve25519-generic,udp_tunnel,ip6_udp_tunnel,libchacha20poly1305
name:           amneziawg
vermagic:       6.12.73+deb13-arm64 SMP mod_unload modversions aarch64
sig_id:         PKCS#7
signer:         DKMS module signing key
sig_key:        55:5B:2E:81:D2:48:2B:9B:02:A7:75:2E:42:46:F8:47:FF:93:9C:B8
sig_hashalgo:   sha256
signature:      02:15:F1:08:4E:03:46:80:84:F3:FA:3C:37:CF:B2:0A:37:63:4C:99:
                86:2A:A0:FD:05:FC:69:AE:B3:54:E6:6D:FC:49:8D:AE:E2:6B:BB:90:
                BE:19:FE:12:1E:BC:A7:89:D2:16:AC:5C:11:A4:D6:4E:34:74:E5:28:
                59:55:7A:DE:48:F6:F1:CF:86:0B:0D:E1:B5:70:9D:4F:89:9B:74:55:
                80:03:6F:B7:F4:A3:44:2B:B4:0E:E8:06:63:45:E1:8A:42:1C:4A:1B:
                26:57:FF:60:92:7E:FE:9D:81:DD:85:1E:E4:AD:B9:58:45:F9:AE:68:
                C3:C4:80:C3:61:2B:7E:79:3E:F1:C1:25:A9:90:51:F5:65:2D:9F:F4:
                7B:C0:DD:2B:39:5C:5C:3F:7E:49:5F:CC:21:6A:D6:3E:47:42:82:0B:
                5B:C5:69:24:D3:72:0B:FA:35:B3:C0:61:86:BC:0B:E2:31:48:46:0D:
                18:35:9B:10:AE:4B:12:C9:8A:97:3A:B0:8D:BA:92:15:41:82:B3:FE:
                2E:5D:97:B0:5B:EE:10:54:13:53:07:A0:1E:2C:07:08:C7:17:20:3E:
                AB:F5:42:67:E5:C4:54:57:D1:AE:A3:34:40:64:0E:4C:7F:63:1E:1D:
                C2:15:DC:36:E3:73:53:37:21:54:A5:28:7B:32:10:E2
parm:           bogus_endpoints:int
parm:           bogus_endpoints_prefix:charp
parm:           bogus_endpoints_prefix6:charp

awg show

awg0
  public key: (hidden)
  private key: (hidden)
  listening port: 123
  jc: 4
  jmin: 8
  jmax: 80
  s1: 23
  s2: 39
  h1: 5
  h2: 12
  h3: 25
  h4: 42

peer: (hidden)
  endpoint: (hidden):53584
  allowed ips: 10.20.0.2/32
  latest handshake: 6 minutes, 30 seconds ago
  transfer: 92.38 KiB received, 194.75 KiB sent
Originally created by @fa1rid on GitHub (Mar 7, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/147 The README states that for kernels ≥ 5.6, the full kernel source tree is required and must be symlinked to src/kernel. However, the module builds and functions correctly using only the linux-headers package, without the kernel source or symlink. Environment: * Debian 13 (trixie), arm64 * Kernel: 6.12.73+deb13-arm64 * DKMS build with linux-headers-arm64, no linux-source installed What I checked: * compat/Kbuild.include resolves all $(srctree) wildcard checks against the headers directory — on 6.12, every header exists, so no compat shim is compiled * dkms.conf has no custom MAKE or BUILD_DEPENDS referencing kernel source * Kbuild has no reference to a kernel symlink * The built module loads, creates amneziawg-type interfaces, and passes traffic with AmneziaWG-specific parameters Is the kernel source requirement still accurate for modern kernels? If it's only needed for older 5.x kernels where certain headers are missing, it might be worth clarifying that in the README. Install on Debian 13: ``` apt-get update && apt-get install -y build-essential dkms git "linux-headers-$(dpkg --print-architecture)" # Reboot if it installed new kernel repo="/usr/src/amneziawg-linux-kernel-module" git clone https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git "$repo" make -C "${repo}/src" dkms-install dkms add "amneziawg/1.0.0" dkms build "amneziawg/1.0.0" dkms install "amneziawg/1.0.0" echo "amneziawg" > /etc/modules-load.d/amneziawg.conf modprobe amneziawg lsmod | grep amneziawg modinfo amneziawg ``` Output: ``` lsmod | grep amneziawg amneziawg 110592 0 libchacha20poly1305 16384 1 amneziawg libcurve25519_generic 32768 1 amneziawg ip6_udp_tunnel 16384 1 amneziawg udp_tunnel 32768 1 amneziawg modinfo amneziawg filename: /lib/modules/6.12.73+deb13-arm64/updates/dkms/amneziawg.ko.xz intree: Y alias: net-pf-16-proto-16-family-amneziawg alias: rtnl-link-amneziawg version: 1.0.20251009 author: Jason A. Donenfeld <Jason@zx2c4.com>, AmneziaVPN <admin@amnezia.org> description: AmneziaWG secure network tunnel license: GPL v2 srcversion: CF17DBA902A6A711D43DA4A depends: libcurve25519-generic,udp_tunnel,ip6_udp_tunnel,libchacha20poly1305 name: amneziawg vermagic: 6.12.73+deb13-arm64 SMP mod_unload modversions aarch64 sig_id: PKCS#7 signer: DKMS module signing key sig_key: 55:5B:2E:81:D2:48:2B:9B:02:A7:75:2E:42:46:F8:47:FF:93:9C:B8 sig_hashalgo: sha256 signature: 02:15:F1:08:4E:03:46:80:84:F3:FA:3C:37:CF:B2:0A:37:63:4C:99: 86:2A:A0:FD:05:FC:69:AE:B3:54:E6:6D:FC:49:8D:AE:E2:6B:BB:90: BE:19:FE:12:1E:BC:A7:89:D2:16:AC:5C:11:A4:D6:4E:34:74:E5:28: 59:55:7A:DE:48:F6:F1:CF:86:0B:0D:E1:B5:70:9D:4F:89:9B:74:55: 80:03:6F:B7:F4:A3:44:2B:B4:0E:E8:06:63:45:E1:8A:42:1C:4A:1B: 26:57:FF:60:92:7E:FE:9D:81:DD:85:1E:E4:AD:B9:58:45:F9:AE:68: C3:C4:80:C3:61:2B:7E:79:3E:F1:C1:25:A9:90:51:F5:65:2D:9F:F4: 7B:C0:DD:2B:39:5C:5C:3F:7E:49:5F:CC:21:6A:D6:3E:47:42:82:0B: 5B:C5:69:24:D3:72:0B:FA:35:B3:C0:61:86:BC:0B:E2:31:48:46:0D: 18:35:9B:10:AE:4B:12:C9:8A:97:3A:B0:8D:BA:92:15:41:82:B3:FE: 2E:5D:97:B0:5B:EE:10:54:13:53:07:A0:1E:2C:07:08:C7:17:20:3E: AB:F5:42:67:E5:C4:54:57:D1:AE:A3:34:40:64:0E:4C:7F:63:1E:1D: C2:15:DC:36:E3:73:53:37:21:54:A5:28:7B:32:10:E2 parm: bogus_endpoints:int parm: bogus_endpoints_prefix:charp parm: bogus_endpoints_prefix6:charp ``` awg show ``` awg0 public key: (hidden) private key: (hidden) listening port: 123 jc: 4 jmin: 8 jmax: 80 s1: 23 s2: 39 h1: 5 h2: 12 h3: 25 h4: 42 peer: (hidden) endpoint: (hidden):53584 allowed ips: 10.20.0.2/32 latest handshake: 6 minutes, 30 seconds ago transfer: 92.38 KiB received, 194.75 KiB sent ```
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#91
No description provided.