On Tue, Apr 6, 2010 at 9:24 AM, Lei Luo <[email protected]> wrote:

>
>
> 2010/4/6 Alexandre Vézina <[email protected]>
> >
> > On Mon, Apr 5, 2010 at 9:46 PM, Lei Luo <[email protected]> wrote:
> >>
> >> Hi,
> >
> > Hi
> >
> >>
> >> I am a newbie of socketcan, I compiled and installed it in the direction
> of http://dave.limoilux.org/trac/wiki/UseSocketCAN   There are two mcp2510
> can  controllers in my arm at91rm9200 board.
> >> It failed when run "can_setup start", saying that "cannot creat
> /sys/class/net/can0".
> >
> > If you look in SocketCAN's makefile, did you uncomment export
> CONFIG_CAN_MCP251X=m?
> > You will also need to uncomment export CONFIG_CAN_DEV_SYSFS=y which is
> legacy. We need to patch our kernel, but didn't have the time yet.
>
> Yes, I have done it. I used the newest source code from the svn server and
> patched it manually. Configration is as follows:
> CONFIG_CAN=y;
> CONFIG_CAN_RAW=y;
> CONFIG_CAN_BCM=y;
> CONFIG_CAN_GW=y;
> CONFIG_CAN_ISOTP=y;
>
> CONFIG_CAN_VCAN=y;
> CONFIG_CAN_DEV=y;
> CONFIG_CAN_CALC_BITTIMING=y;
> CONFIG_CAN_MCP251X=y;
>
> >
> >>
> >> Then I use "ip link add type vcan" to create the a vcan interface. But
> cmd "add" is not recognised, ip tool is the newest one which is compiled
> with iproute2-2.6.33.tar.bz2. Linux kernel I used is  2.6.28.
> >
> > Again, in the makefile, did you uncomment export CONFIG_CAN_VCAN=m?
> > Thank you
>
> The problem of "ip link add" is OK after recompiling kernel,
> /sys/class/net/can0 is created if I type in "ip link add dev can0 type
> vcan". But it says "cannot create /sys/class/net/can0" whenever I did it or
> not.
> And how should I do to add the mcp251x_info to the platform definition file
> as what is said in the beginning of mcp251x.c? I added it into
> at91rm9200_device.c, and include <socketcan/can/platform/mcp251x.h>, some
> err informations such as "mcp251x_setup" presented.
>

I guess you should talk with Christian Pellegrin <[email protected]> for
this. It will be a lot easier for him to answer.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to