Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | require wireguard.inc |
| 2 | |
| 3 | inherit module kernel-module-split |
| 4 | |
| 5 | DEPENDS = "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 | |
| 11 | EXTRA_OEMAKE_append = " \ |
| 12 | KERNELDIR=${STAGING_KERNEL_DIR} \ |
| 13 | " |
| 14 | |
| 15 | MAKE_TARGETS = "module" |
| 16 | |
| 17 | RRECOMMENDS_${PN} = "kernel-module-xt-hashlimit" |
| 18 | MODULE_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-. |
| 25 | PKG_${PN} = "kernel-module-${MODULE_NAME}" |
| 26 | |
| 27 | module_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 | } |