0
michcubox

Can't load wireguard kernel module

Recommended Posts

Armbianmonitor:

Hello,

 

I wanted to test wireguard with my cubox i4, but I'm not able to load the module.

 

I tried to search the net for this error, but fond nothing useful.

 

Maybe someone has an idea.

 

Thank you

Michael

 

uname -a
Linux loki 4.19.41-cubox #5.85 SMP Wed May 8 15:52:55 CEST 2019 armv7l GNU/Linux

dpkg -l | grep linux
ii  console-setup-linux              1.164                              all          Linux specific part of console-setup
ii  libselinux1:armhf                2.6-3+b3                           armhf        SELinux runtime shared libraries
ii  linux-base                       4.5                                all          Linux image base package
ii  linux-dtb-next-cubox             5.85                               armhf        Linux DTB, version 4.19.41-cubox
ii  linux-headers-next-cubox         5.85                               armhf        Linux kernel headers for 4.19.41-cubox on armhf
ii  linux-image-next-cubox           5.85                               armhf        Linux kernel, version 4.19.41-cubox
ii  linux-libc-dev                   5.70                               armhf        Linux support headers for userspace development
ii  linux-stretch-root-next-cubox-i  5.85                               armhf        Armbian tweaks for stretch on cubox-i (next branch)
ii  linux-u-boot-cubox-i-next        5.85                               armhf        Uboot loader 2013.10-rc4
ii  util-linux                       2.29.2-1+deb9u1                    armhf        miscellaneous system utilities

modprobe wireguard
modprobe: ERROR: could not insert 'wireguard': Exec format error

dmesg | grep wireguard
[320752.917616] wireguard: unknown relocation: 102

modinfo wireguard
filename:       /lib/modules/4.19.41-cubox/kernel/net/wireguard/wireguard.ko
alias:          net-pf-16-proto-16-family-wireguard
alias:          rtnl-link-wireguard
version:        0.0.20190406
author:         Jason A. Donenfeld <Jason@zx2c4.com>
description:    WireGuard secure network tunnel
license:        GPL v2
srcversion:     9996946C3FF07EF91C1E1DA
depends:
intree:         Y
name:           wireguard
vermagic:       4.19.41-cubox SMP mod_unload modversions ARMv7 thumb2 p2v8

 

Share this post


Link to post
Share on other sites
1 hour ago, michcubox said:

Maybe someone has an idea.


Are you able to build a kernel on your own? Build a fresh kernel with parameter WIREGUARD="yes" ... it is known to work on our most used Allwinner kernel.

Share this post


Link to post
Share on other sites

Sorry for ma late answer.

But at the moment I sadly have no time to build my own kernel.

I'll try it with the next update.

Share this post


Link to post
Share on other sites

Hi, I tried it with the new " 5.1.16-cubox #5.90 SMP Sun Jul 7 11:37:47 CEST 2019 armv7l GNU/Linux" kernel, but still the same problem.

 

I also tried to build the module with dkms with the wireguard package from debian sid, but the build fails. Here is the logfile of the build.

 

 cat /var/lib/dkms/wireguard/0.0.20190702/build/make.log
DKMS make.log for wireguard-0.0.20190702 for kernel 5.1.16-cubox (armv7l)
Wed Jul 10 23:21:13 CEST 2019
make: Entering directory '/usr/src/linux-headers-5.1.16-cubox'
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/main.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/noise.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/device.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/peer.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/timers.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/queueing.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/send.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/receive.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/socket.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/peerlookup.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/allowedips.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/cookie.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/netlink.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20/chacha20.o
  PERLASM /var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20/chacha20-arm.S
  AS [M]  /var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20/chacha20-unrolled-arm.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/poly1305/poly1305.o
  PERLASM /var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/poly1305/poly1305-arm.S
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20poly1305.o
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/blake2s/blake2s.o
/bin/sh: 1: scripts/genksyms/genksyms: not found
scripts/Makefile.build:275: recipe for target '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/poly1305/poly1305.o' failed
make[1]: *** [/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/poly1305/poly1305.o] Error 127
make[1]: *** Deleting file '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/poly1305/poly1305.o'
make[1]: *** Waiting for unfinished jobs....
/bin/sh: 1: scripts/genksyms/genksyms: not found
scripts/Makefile.build:275: recipe for target '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20/chacha20.o' failed
make[1]: *** [/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20/chacha20.o] Error 127
make[1]: *** Deleting file '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20/chacha20.o'
/bin/sh: 1: scripts/genksyms/genksyms: not found
scripts/Makefile.build:275: recipe for target '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20poly1305.o' failed
make[1]: *** [/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20poly1305.o] Error 127
make[1]: *** Deleting file '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/chacha20poly1305.o'
/bin/sh: 1: scripts/genksyms/genksyms: not found
scripts/Makefile.build:275: recipe for target '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/blake2s/blake2s.o' failed
make[1]: *** [/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/blake2s/blake2s.o] Error 127
make[1]: *** Deleting file '/var/lib/dkms/wireguard/0.0.20190702/build/crypto/zinc/blake2s/blake2s.o'
Makefile:1571: recipe for target '_module_/var/lib/dkms/wireguard/0.0.20190702/build' failed
make: *** [_module_/var/lib/dkms/wireguard/0.0.20190702/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.1.16-cubox'

 

Share this post


Link to post
Share on other sites
21 minutes ago, michcubox said:

i, I tried it with the new " 5.1.16-cubox #5.90 SMP Sun Jul 7 11:37:47 CEST 2019 armv7l GNU/Linux" kernel, but still the same problem.

 

What about modprobe wireguard since module should be build into the kernel?

DKMS could need some fine tuning ...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0