porteous
Topic Author
Posts: 3
Joined: 14 May 2019, 11:13

Building USB2CAN driver fails

14 May 2019, 11:32

I am getting the this error while building a driver on the RevPi Connect running Raspbian Stretch:
scripts/basic/fixdep: not found
I used the instructions at http://www.8devices.com/wiki/usb2can:compile-raspberry to build the driver:
sudo apt-get update
sudo apt-get install git raspberrypi-kernel raspberrypi-kernel-headers can-utils
git clone https://github.com/krumboeck/usb2can.git
cd usb2can
sudo make
I get this error when running the make command:
make -C /lib/modules/4.9.76-rt60-v7+/build M=/home/pi/usb2can modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.76-rt60-v7+'
  CC [M]  /home/pi/usb2can/usb_8dev.o
/bin/sh: 1: scripts/basic/fixdep: not found
Here is the kernel version:
uname -a
Linux RevPi11760 4.9.76-rt60-v7+ #1 SMP PREEMPT RT Tue, 12 Mar 2019 15:19:36 +0100 armv7l GNU/Linux
Could this be an error in the RevPi distribution? I found a similar situation which was due to a distro error.

Thanks,
Ed
 
porteous
Topic Author
Posts: 3
Joined: 14 May 2019, 11:13

Re: Building USB2CAN driver fails

06 Jun 2019, 10:58

Has anyone else managed to compile an external module using kernel 4.9.76-rt60-v7+?

I've tried a couple of different modules and I always get:
/bin/sh: 1: scripts/basic/fixdep: not found
Thanks,
Ed
 
porteous
Topic Author
Posts: 3
Joined: 14 May 2019, 11:13

Re: Building USB2CAN driver fails

13 Jun 2019, 12:03

The problem is that the update.sh script includes a function copy_files() which doesn't copy the script binaries (fixdep, genksyms, etc.) from the kbuild and kbuild7 directories into the header directories, so the header directories on the RevPi do not contain these script binaries. In contrast, the base Raspberry Pi header directories do contain these binaries. I suggest that update.sh should be modified to copy these binaries into the release header directories.

A workaround is to run on the Revolution Pi:
cd /usr/src/linux-headers-4.9.76-rt60-v7+/
sudo make scripts
sudo make scripts_basic
This allows me to build my external modules.

Who is online

Users browsing this forum: No registered users and 1 guest