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.

cmem/dsplink kernel module issue with OMAP-L138 and c6run

Other Parts Discussed in Thread: OMAPL138

I'm using the latest DSPLINK package (1.65.0.3) as part of the c6run package.  I am compiling the packages against the Linux kernel 2.2.37 from the SDK version 3.21.0.4.  Building works, however, when I try to load the kernel modules cmem.ko and dsplinkk.ko I must create the cmem device node manually (using mknod) or my application will not run.

If I do not create the device node manually, the application will not run.  Tracing through the cmem driver code, it looks to me that the device node should be automatically created in the same way as the dsplink device node.

This investigation came about from the fact that I can not unload the dsplink and cmem modules, then reinsert them.  cmem fails with the message unable to allocate the major device number (242 in our case).

q1 : Should I be able to load/unload cmem and dsplink  as needed ?

q2: Should cmem create the device node automatically ?

 

  • If you look in the platforms/omapl138 directory inside the C6Run tree, you'll see the loadmodules.sh script that is used to test c6run examples on the actual target platform.  We do not manually create the device node in that script and I have never had any issue with the device node being created automatically upon module load. You will notice that the script does manually create a DSPLink device node (I don't know why - the scripts were copied from previous versions written long ago in days of yore, and maybe that's not needed any more if the device node is supposed to get created automatically)

    I can only conclude that there must be something else going wrong with Linux or your filesystem.  Looking at this post on StackOverflow and looking at the module code and makefiles for CMEM, it looks like they assume udev is in place to generate device nodes.  Is the udev daemon running on your target?

    Regards, Daniel

  • Thank you Daniel,

    I have bypassed that issue by creating the /dev/cmem in the loadmodules.sh script. This is not the correct solution, but it gets me moving on a time critical application.  I will have to revisit this after the system is at least demonstrated to run.