blob: badc97a9738866b35b584de81930d14fec3d81b8 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001require wireguard.inc
2
3inherit module kernel-module-split
4
5DEPENDS = "virtual/kernel libmnl"
6
7# This module requires Linux 3.10 higher and several networking related
8# configuration options. For exact kernel requirements visit:
9# https://www.wireguard.io/install/#kernel-requirements
10
11EXTRA_OEMAKE_append = " \
12 KERNELDIR=${STAGING_KERNEL_DIR} \
13 "
14
15MAKE_TARGETS = "module"
16
17RRECOMMENDS_${PN} = "kernel-module-xt-hashlimit"
18MODULE_NAME = "wireguard"
19
20# Kernel module packages MUST begin with 'kernel-module-', otherwise
21# multilib image generation can fail.
22#
23# The following line is only necessary if the recipe name does not begin
24# with kernel-module-.
25PKG_${PN} = "kernel-module-${MODULE_NAME}"
26
27module_do_install() {
28 install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME}
29 install -m 0644 ${MODULE_NAME}.ko \
30 ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME}/${MODULE_NAME}.ko
31}