Re: Resources for Linux SocketCAN

Heinz-Jürgen Oertel <[email protected]>
Newsgroups gmane.comp.hardware.bus.can
Organization privat
Message-ID <4255865.VSmyXHATzS@linux-edhj>
Am Freitag 01 Februar 2013, 01:09:27 schrieb Bram Kerkhof:
> The can4linux API seems to be a way better match for my needs than the
> convoluted SocketCAN stuff, but I have the impression that the build process
> needs a fair bit of hand waving and polishing... If I want even a shadow of
> hope that the kernel guys include this in their precious build environment,
> some major trimming needs to be done; ideally it should be a neat and tidy
> buildroot package for my target platform (iMX25@400Mhz), and play nice with
> Crosstool-NG.
> 
> You don't happen to have experience with buildroot? ;-)
> 
> Cheers,
> Bram


Hello Bram,
I have heard about Buildroot but was not aware that it might be
a good means to provide a kernel driver prepared or wrapped with it.
At the moment the build system of a can4linux driver consists of
the sources (of course) a Makefile and a script to set the environment
to build the driver outside of the kernel.
The following is part of the README.xcanps.zynq
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Compiling:
===========================================================================
Get the sources
svn co https://can4linux.svn.sourceforge.net/svnroot/can4linux/trunk trunk
cd to can4linux.
Edit cross-zedboard according to your environment
(kernel sources, cross-compiler and other tools location,..)
Source this environment before calling make.
Use the target specific Makefile-zedboard.
Take care to set the -DCAN_SYSCLK according the settings in XPS
with the CAN module input frequency. Bit-timing tables are provided
already for some input frequencies. It is suggested to use 20MHz.

Copy the canflinux.ko kernel module to the ZedBoard Linux 
/lib/modules/`uname -r`/
call
# modprobe can4linux
It will result in a loaded kernel module and two device entries
/dev/can[01]
   ...
   ...
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

As you can see, that's not 
not very difficult to set up.
If you have difficulties with the i.MX25, let me know, I'll help.

Regards
    Heinz



--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector.com/canlist/
Report any problems to <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.