hartkopp / can-isotp

Linux Kernel Module for ISO 15765-2:2016 CAN transport protocol PLEASE NOTE: This module is part of the mainline Linux kernel since version 5.10
Other
239 stars 69 forks source link

insmod: ERROR: could not insert module ./net/can/can-isotp.ko: Unknown symbol in module #24

Closed litaoxyz closed 4 years ago

litaoxyz commented 4 years ago

When I sudo insmod ./net/can/can-isotp.ko ,terminal print “insmod: ERROR: could not insert module ./net/can/can-isotp.ko: Unknown symbol in module”. The results of "dmesg | tail -n 1" is "can_isotp: Unknown symbol can_rx_register (err -2)". I want to load this on raspiberry pi 3b+.

The result of "uname -a" is "Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux". The result of "file net/can/can-isotp.ko" is "net/can/can-isotp.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=f52ef777e54005ea9204e616f0fb5a7335f543a8, not stripped". What should I do to solve this problem ? thanks.

hartkopp commented 4 years ago

When using insmod the kernel loads the can-isotp module without taking care about dependencies. Try 'modprobe' instead to make sure the can.ko module is automatically loaded before. Or run 'modprobe can-raw' which would load can.ko and can-raw.ko in advance. can.ko contains the can_rx_register symbol.

litaoxyz commented 4 years ago

When using insmod the kernel loads the can-isotp module without taking care about dependencies. Try 'modprobe' instead to make sure the can.ko module is automatically loaded before. Or run 'modprobe can-raw' which would load can.ko and can-raw.ko in advance. can.ko contains the can_rx_register symbol.

Thanks a lot. After I loaded can.ko by using 'modprobe can-raw',problem solved.