I have just purchased some
2 Channel CAN BUS FD Shield for Raspberry Pi … with the MCP2518
I have cloned the github repository.
The problem is running the install script (below). It can not find the kernel headers.
the source directory is not present. the directory is named kernel
As a result, the spi and can install does not complete
pi@raspberrypi:~/can-dev $ dmesg | grep spi
[ 7.818415] spi_master spi1: will run message pump with realtime priority
[ 7.856721] mcp251xfd spi1.0 (unnamed net_device) (uninitialized): Failed to detect MCP2517FD (osc=0x00000000).
pi@raspberrypi:~/can-dev $ ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.63.115 netmask 255.255.0.0 broadcast 169.254.255.255
$ sudo ./install.sh
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists… Done
Building dependency tree
Reading state information… Done
90 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
Reading package lists… Done
Building dependency tree
Reading state information… Done
can-utils is already the newest version (2018.02.0-1).
dkms is already the newest version (2.6.1-4).
git is already the newest version (1:2.20.1-2+deb10u3).
0 upgraded, 0 newly installed, 0 to remove and 90 not upgraded.
Deleting module version: 0.1
completely from the DKMS tree.
Done.
Creating symlink /var/lib/dkms/mcp25xxfd/0.1/source ->
/usr/src/mcp25xxfd-0.1
DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.4.83+ cannot be found at
/lib/modules/5.4.83+/build or /lib/modules/5.4.83+/source.
Error! echo
Your kernel headers for kernel 5.4.83-v7+ cannot be found at
/lib/modules/5.4.83-v7+/build or /lib/modules/5.4.83-v7+/source.
Error! echo
Your kernel headers for kernel 5.4.83-v7l+ cannot be found at
/lib/modules/5.4.83-v7l+/build or /lib/modules/5.4.83-v7l+/source.
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!
------------------------------------------------------