This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM437X: CAN support in Starter Kit

Part Number: PROCESSOR-SDK-AM437X

Tool/software: Linux

I know there's no support for DCAN drivers in AM437x starter kit by default, but I want to add this support just for SOFTWARE purpose.

I reconfigured the Linux kernel and recreated zImage, modified the device tree file am437x-sk-evm.dts by copying related code (dcan0 and dcan1) from am437x-gp-evm.dts and copied the compiled dtb file into the boot directory on the target system.

However, I failed to add can0 and can1 in /dev through the above steps. So I couldn't do any software testing on my am437x starter kit eval board.

What else should I do to achieve my goal?

  • I saw the link, but it didn't resolve my issue.
  • Hello Damon,

    Please, thy this command: mknod [-m mode] /dev/name <type> <major> <minor>
    root@am437x-evm:~# mknod -m 666 /dev/can0 c 91 0
    root@am437x-evm:~# mknod -m 666 /dev/can1 c 91 1

    Or use the reserved 42, 120-127 and 240-254 major numbers for local and experimental use.

    Best regards,
    Kemal

  • It worked, but the next steps (ifconfig) and (modprobe vcan) failed. I failed to load vcan(It's located in the directory /lib/modules/3.14.43-g875c69b/kernel/net/can) and the result of ifconfig didn't show can0 and can1.

    root@am437x-evm:~# modprobe vcan
    [ 126.384763] vcan: disagrees about version of symbol module_layout
    modprobe: ERROR: could not insert 'vcan': Exec format error

    root@am437x-evm:/lib/modules/3.14.43-g875c69b# ifconfig
    eth0 Link encap:Ethernet HWaddr C4:BE:84:CC:84:31
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:72

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:10 errors:0 dropped:0 overruns:0 frame:0
    TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:700 (700.0 B) TX bytes:700 (700.0 B)

  • You got the "disagrees about version of symbol module_layout" error. Your module is not build against this kernel version or it is build with different configuration settings.
  • Thank you very much for your help! I made a mistake. The version of my linux kernel is different with the module. Now it works.
    However, how can I add /dev/can0 and /dev/can1 automatically instead of manually (Running a script when starting kernel is not my option.) ? What's wrong with my device tree file?