I’ve compiled a driver for my device and I’m trying to load it via insmod:
insmod ax88179_178a.ko
insmod: error inserting 'ax88179_178a.ko': -1 Unknown symbol in module
somewhere I’ve read that this might be the case when the kernel does not allow loading unsigned modules. How can I figure out whether this is the case for my kernel and how can I change this behavior?
thanks!
P.S: I’m running opensuse 13.1 with
uname -a
Linux laptop.site 3.11.10-21-desktop #1 SMP PREEMPT Mon Jul 21 15:28:46 UTC 2014 (9a9565d) x86_64 x86_64 x86_64 GNU/Linux
I bought the USB adapter for my ARM-Board and I compiled there the same driver, but it is not working: there ethtool always says that there is no link (physically) so i wanted to test this specific driver on my laptop. The built-in driver is working properly on opensuse, but maybe not the sources I used for the ARM-board.
lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0b95:1790 ASIX Electronics Corp.
Bus 001 Device 003: ID 04f2:b221 Chicony Electronics Co., Ltd integrated camera
I forgot to say, that I blacklisted the ax88179_178a from the kernel.
That weird. Now, when trying to compile it once again i get:
make
make -C /lib/modules/3.11.10-21-desktop/build SUBDIRS=/home/blub/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE modules
make[1]: Entering directory `/usr/src/linux-3.11.10-21-obj/i386/desktop'
CC [M] /home/blub/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.o
In file included from /usr/src/linux-3.11.10-21/include/linux/elf.h:4:0,
from /usr/src/linux-3.11.10-21/include/linux/module.h:14,
from /home/blub/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.c:30:
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h: In function ‘elf_common_init’:
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:170:6: error: ‘struct pt_regs’ has no member named ‘r8’
regs->r8 = regs->r9 = regs->r10 = regs->r11 = 0;
^
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:170:17: error: ‘struct pt_regs’ has no member named ‘r9’
regs->r8 = regs->r9 = regs->r10 = regs->r11 = 0;
^
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:170:28: error: ‘struct pt_regs’ has no member named ‘r10’
regs->r8 = regs->r9 = regs->r10 = regs->r11 = 0;
^
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:170:40: error: ‘struct pt_regs’ has no member named ‘r11’
regs->r8 = regs->r9 = regs->r10 = regs->r11 = 0;
^
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:171:6: error: ‘struct pt_regs’ has no member named ‘r12’
regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;
^
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:171:18: error: ‘struct pt_regs’ has no member named ‘r13’
regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;
^
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:171:30: error: ‘struct pt_regs’ has no member named ‘r14’
regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;
^
/usr/src/linux-3.11.10-21/arch/x86/include/asm/elf.h:171:42: error: ‘struct pt_regs’ has no member named ‘r15’
regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;
^
In file included from /usr/src/linux-3.11.10-21/include/uapi/linux/unistd.h:7:0,
from /usr/src/linux-3.11.10-21/arch/x86/include/asm/seccomp_64.h:4,
from /usr/src/linux-3.11.10-21/arch/x86/include/asm/seccomp.h:4,
from /usr/src/linux-3.11.10-21/include/linux/seccomp.h:9,
from /usr/src/linux-3.11.10-21/include/linux/sched.h:39,
from /home/blub/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.c:32:
/usr/src/linux-3.11.10-21/arch/x86/include/asm/unistd.h: At top level:
/usr/src/linux-3.11.10-21/arch/x86/include/asm/unistd.h:24:33: fatal error: asm/unistd_64_x32.h: Datei oder Verzeichnis nicht gefunden
# include <asm/unistd_64_x32.h>
^
compilation terminated.
make[4]: *** [/home/blub/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE/ax88179_178a.o] Fehler 1
make[3]: *** [_module_/home/blub/Downloads/AX88179_178A_LINUX_DRIVER_v1.10.0_SOURCE] Fehler 2
make[2]: *** [sub-make] Fehler 2
make[1]: *** [all] Fehler 2
make[1]: Leaving directory `/usr/src/linux-3.11.10-21-obj/i386/desktop'
make: *** [default] Fehler 2
DESCRIPTION
insmod is a trivial program to insert a module into the kernel: if the filename is a hyphen, the
module is taken from standard input. Most users will want to use modprobe(8) instead, which is
more clever and can handle module dependencies.