Hi Juraj,

Juraj wrote:
> Hi,
> 
> I try to compile the socketcan for the version 2.6.18 (cross compiling for
> ARCH=arm, kernel 2.6.18 changed by montavista for TI devices).

Please switch to a recent version of the Linux kernel, if it's an option.

> I have checked out files from the /socketcan/trunk tried to compile
> according what I have read in README file and I get lot of errors like:
> 
> error: #error This driver does not support Kernel versions < 2.6.27

The error message is pretty clear, I think.

> Then I have seen also errors like
> 
> socketcan/kernel/2.6/include/socketcan/can/dev.h:92: error: 'struct
> net_device' has no member named 'stats'
> 
>  
> 
> I am a newie in such things so I have understood that the backporting will
> not be so straightforward for me.

Well, the MCP251x driver relies on the SPI interface, which might not
even be available in 2.6.18.

> So this is what is my goal:
> 
> = to have some CAN interface (as a first step - as simple as possible) in
> the user space. We use CAN chip MCP2515.
> 
>  
> 
> What are my main questions now:
> 
> 1. Isn't the kernel 2.6.18 too old for the socketcan? (I have seen in
> mailing list
> https://lists.berlios.de/pipermail/socketcan-core/2009-December/thread.html
> that Matthias made it working on his system, so I hope it would be possible
> also for my one)

Some SJA1000 drivers have support down to 2.6.18.

> 2. What is a minimum set of files/ objects which I need to compile to have
> some API? (I think it would be better to start with a minimum of the files
> .)

You need support for the CAN protocol (in net/can) and a CAN driver (in
drivers/net/can). The basic CAN support including device interface is
available. You just need to port the MCP251x driver, which might be
non-trivial, I'm afraid. But if you are lucky, I might be wrong.

> 3. I have found patch
> https://lists.berlios.de/pipermail/socketcan-core/2009-December/003638.html
> posted by Wolfgang, but by my opinion it does not solve problem in dev.h
> file. Or am I wrong?

See above.

Wolfgang.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to