Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

This forum covers PCAN-Linux and Linux development issues concerning our products
dwyer2bp
Posts: 6
Joined: Fri 30. Sep 2016, 22:18

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by dwyer2bp » Sat 1. Oct 2016, 04:44

Hi,

Just want to update: I have been able to setup a VM to cross-compile this driver. After generating the ko file, I just copy it over to the TX1 system, then run the proper make install commands.

The char dev driver seems to be working when running 'cat /dev/pcanusb32' and sending CAN data to my USB CAN device. However, the provided programs under /test will not connect: error: CAN_VersionInfo(): Inappropriate ioctl for device.


No idea what went wrong there, the APIs do not work...

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by M.Maidhof » Tue 4. Oct 2016, 10:21

Hi,

you have to cross-compile and install the libs too, to let the test application work.

regards

Michael

dwyer2bp
Posts: 6
Joined: Fri 30. Sep 2016, 22:18

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by dwyer2bp » Fri 7. Oct 2016, 02:54

This issue was on NVidia's release of linux for tegra 23.2 (L4T), which is a 64-bit kernel with 32-bit user space. I don't believe the libs would run if compiled via 64bit and ran on the 32-bit system. I will try your suggestion in time, however I am moving to L4T 24.2 since they upped the user space to 64-bit. I hope to do all native compilation.

I will post any progress on using 24.2, and issues.

dwyer2bp
Posts: 6
Joined: Fri 30. Sep 2016, 22:18

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by dwyer2bp » Wed 12. Oct 2016, 18:54

Ok, drivers are up and running on NVidia TX1 - L4T 24.2. With 24.2, you are able to compile modules on the board natively, so no need for cross compiler, and not the Libraries AND drivers for pcan are compiled with the same compiler and seem to be happy.

There are only a few steps to bring your board up to speed with compiling modules, from my memory:
1. Find your linux headers directory under /usr/src/linux-headers-3.10.96-tegra/ (cd here)
2. Run sudo make module_prepare
3. Not sure this helped, but I also ran: apt-get install module_assistant (not sure if this is needed)

After that, drivers compile, library compiles, test programs compile. Run modprobe pcan, and run some test programs.

Excellent, thanks a lot.

Post Reply