View Issue Details

IDProjectCategoryView StatusLast Update
0017437AltArch - armhfpkernelpublic2020-10-28 16:24
Reporterbahleka.hoobovo Assigned To 
Status resolvedResolutionfixed 
PlatformAltArch-armhfpOSCentOS 7OS Version7.8.2003
Product Version7.8-2003 
Summary0017437: wireguard not working on kernel 5.4.42
Descriptionwireguard stops working after kernel-update from 5.4.28 to 5.4.42

Steps To Reproduce1) Install kernel 5.4.28
2) configure wireguard
3) Install kernel 5.4.42
4) wireguard is not available anymore
Additional Information5.4.42 $ lsmod | grep wire
is empty
5.4.42 $ insmod wireguard
insmod: ERROR: could not load module wireguard: No such file or directory

5.4.28 $ lsmod | grep wire
wireguard 135168 0
ip6_udp_tunnel 16384 1 wireguard
udp_tunnel 16384 1 wireguard
ipv6 466944 29 nf_reject_ipv6,ip6table_mangle,wireguard

Seems like "wireguard-dkms.noarch" is not working for the new kernel.

$ yum list *kernel-headers*
Installed Packages
kernel-headers.armv7hl 5.4.28-200.el7 @base

Maybe missing kernel-headers?
Tagscentos7 raspberripi arm




2020-06-08 11:41

developer   ~0037050

Is this generic kernel or for raspberrypi2 kernel?
How did you install wireguard (step by step or reference url, so I can try to replicate without assuming anything)

Since wireguard isn't included in kernel until 5.6, I'm assuming that something must have broken the build in kernel upstream, but I'd like to be able to confirm that


2020-06-08 12:23

reporter   ~0037051

$ yum list *kernel*
Installed Packages
kernel-headers.armv7hl 5.4.28-200.el7 @base
raspberrypi2-kernel-devel.armv7hl 5.4.28-v7.1.el7 @centos-kernel
raspberrypi2-kernel-devel.armv7hl 5.4.42-v7.1.el7 @centos-kernel
raspberrypi2-kernel4.armv7hl 5.4.28-v7l.1.el7 installed
raspberrypi2-kernel4.armv7hl 5.4.42-v7l.1.el7 @centos-kernel
raspberrypi2-kernel4-devel.armv7hl 5.4.28-v7l.1.el7 @centos-kernel
raspberrypi2-kernel4-devel.armv7hl 5.4.42-v7l.1.el7 @centos-kernel

$ yum list *wireguard*
wireguard-dkms.noarch 1:1.0.20200506-1.el7
wireguard-tools.armv7hl 1.0.20200513-1.el7 @epel


$ yum repolist
!base/7/armhfp CentOS-7 - Base 7,454
!centos-kernel/7/armhfp CentOS LTS Kernels for armhfp 19
! Copr repo for wireguard owned by jdoss 5
!epel Epel rebuild for armhfp 24,610
!extras/7/armhfp CentOS-7 - Extras 320
!updates/7/armhfp CentOS-7 - Updates 522

There is a kernel-headers package @base, but only for 5.4.28-200.el7, no other is found.
I think therefore the dkms does not build.


2020-06-08 12:53

reporter   ~0037052

$ dkms install wireguard/1.0.20200506 -k 5.4.42-v7.1.el7
Error! echo
Your kernel headers for kernel 5.4.42-v7.1.el7 cannot be found at
/lib/modules/5.4.42-v7.1.el7/build or /lib/modules/5.4.42-v7.1.el7/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.


2020-06-08 16:26

developer   ~0037056

I think the error is that you're building a different kernel.
IIUC, you should run dkms install wireguard/1.0.20200506 -k 5.4.42-v7l.1.el7 (notice the v7l instead of v7)


2020-06-10 12:16

reporter   ~0037061

You're absolutely right. I choosed the wrong kernel doing it by hand. Nevertheless it also does not work with the right kernel, but with a different error message. Actually it should do this all automatic without user intervention.

$ dkms install wireguard/1.0.20200506 -k 5.4.42-v7l.1.el7
Error! Bad return status for module build on kernel: 5.4.42-v7l.1.el7 (armv7hl)
Consult /var/lib/dkms/wireguard/1.0.20200506/build/make.log for more information.

$ cat /var/lib/dkms/wireguard/1.0.20200506/build/make.log
  LD [M] /var/lib/dkms/wireguard/1.0.20200506/build/wireguard.o
  Building modules, stage 2.
  MODPOST 1 modules
make[3]: *** No rule to make target `arch/arm/kernel/', needed by `/var/lib/dkms/wireguard/1.0.20200506/build/wireguard.ko'. Stop.
make[3]: *** Waiting for unfinished jobs....
  CC [M] /var/lib/dkms/wireguard/1.0.20200506/build/wireguard.mod.o
make[2]: *** [__modpost] Error 2
make[1]: *** [modules] Error 2
make: *** [sub-make] Error 2
make: Leaving directory `/usr/src/kernels/5.4.42-v7l.1.el7'

with the older kernel it works fine:
$ dkms install wireguard/1.0.20200506 -k 5.4.28-v7l.1.el7
DKMS: install completed.

$ cat make.log
  LD [M] /var/lib/dkms/wireguard/1.0.20200506/build/wireguard.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M] /var/lib/dkms/wireguard/1.0.20200506/build/wireguard.mod.o
  LD [M] /var/lib/dkms/wireguard/1.0.20200506/build/wireguard.ko
make: Leaving directory `/usr/src/kernels/5.4.28-v7l.1.el7'


2020-06-10 12:31

reporter   ~0037062

after coping the "" from the old-kernel-dir to the new-kernel-dir it works. But this is not the way it should work.

$ cat arch/arm/kernel/
    .plt (NOLOAD) : { BYTE(0) }
    .init.plt (NOLOAD) : { BYTE(0) }
    .text.ftrace_trampoline (NOLOAD) : { BYTE(0) }


2020-06-10 12:37

developer   ~0037063

Agreed, but I'm guessing that's what you did the first time, since nothing changed in the packaging.
I'll see if I can get that file added for the next time


2020-06-10 13:51

reporter   ~0037064

You are right. History says: I injected the file from somewhere to the old kernel.

Adding the file would be great. Here is an one year old thread (other linux) with he same problem for arm64:

So maybe it's a problem in the upstream?


2020-06-10 21:03

developer   ~0037068

No, definitely a problem with the way we build that kernel.


2020-07-22 17:24

developer   ~0037397

@ bahleka.hoobovo This should be fixed in 5.4.49, can you check?


2020-07-28 08:10

reporter   ~0037426

OK. the update works. I can not check a fresh install now.


2020-07-28 10:11

developer   ~0037427

Just an FYI, we'll be building 5.4.53 this week, (both Raspberry and generic kernels) and it will include wireguard, so no need for dkms/kmod anymore :)


2020-10-25 14:00

developer   ~0037822

Wireguard is now included in all our 5.4.x kernels

Issue History

Date Modified Username Field Change
2020-06-06 20:32 bahleka.hoobovo New Issue
2020-06-06 20:32 bahleka.hoobovo Tag Attached: centos7 raspberripi arm
2020-06-08 11:41 pgreco Note Added: 0037050
2020-06-08 12:23 bahleka.hoobovo Note Added: 0037051
2020-06-08 12:53 bahleka.hoobovo Note Added: 0037052
2020-06-08 16:26 pgreco Note Added: 0037056
2020-06-10 12:16 bahleka.hoobovo Note Added: 0037061
2020-06-10 12:31 bahleka.hoobovo Note Added: 0037062
2020-06-10 12:37 pgreco Note Added: 0037063
2020-06-10 13:51 bahleka.hoobovo Note Added: 0037064
2020-06-10 21:03 pgreco Note Added: 0037068
2020-07-22 17:24 pgreco Note Added: 0037397
2020-07-28 08:10 bahleka.hoobovo Note Added: 0037426
2020-07-28 10:11 pgreco Note Added: 0037427
2020-10-25 14:00 pgreco Status new => closed
2020-10-25 14:00 pgreco Resolution open => fixed
2020-10-25 14:00 pgreco Note Added: 0037822
2020-10-28 16:24 toracat Status closed => resolved