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.

loadmodule-rc & dm365mmap device

Hi,

Someone can teach me why in loadmodule-rc is used mknod to create the device, while for other modules no ?

    modprobe edmak
    modprobe dm365mmap
    mknod /dev/dm365mmap c `awk "\\$2==\"dm365mmap\" {print \\$1}" /proc/devices` 0

I use DM365 and my kernel is 2.6.32.17-davinci. And I use the "ro" file system.

My Probem at boot:   mknod: /dev/dm365mmap: File exists

this sometimes using gstreamer give me black video . Note: if I put FS in "rw" and I  delete and crate dm365mmap again, my problem disappear.

Now I have moved the device in ram e I link to it.  But  I'd like to know why dm365mmap is different from other in loadmodule-rc.

Thanks

Simone Cianni

  • Simone,

    Check the major number of the device when it is statically created and when you create using loadmodule-rc in rw filesystem?

  • Hi Thomas,
    thanks for your answer. The major il the same.
    do you mean , that can change? and it is taken from /proc/devices ? Why?

    In this two months, I'm learning Arago (we use it to create the file system), and I see that  dm365mmap, is the unique module in gstreamer that have dipendece of the kernel.
    in kernel documentation : the file, device.txt, wrote from Alan Cox, it talk about major from 240 to 254 as usefull for Logical-Experimental Use.
    And I learn, that this meant that the kernel decide itself by a routine how use it. dm365mmap is in this range.

    Same Kernel and same Gstreamer module, rebuilt have always same major  (if you don't rebuild it). and Udev use always the same number.
    thanks , Simone

  • Simone,

    Generally device nodes are created by udevd by reading /proc/devices entries. But there are cases where it can be statically created using mknod command. That's why I asked you to check this. 

  • Hi,

    In my  experience, Major number would be changed as kernel configuration. If new a device driver will be included in kernel configuration, kernel affect some major number in /proc/devices. So, If you avoid message "File exists", you could compare major number of /proc/devices with /dev/dm365mmap, then, If different major number, remove /dev/dm365mmap and recreate it with new major number from /proc/devices.

    BR,

    Choi 

  • Yes, it is my solution.

    Because we have a statically device table (don't use Udev), and because we use a ReadOlny File system, I have modified the loadmodule-rc  to create node in Ram RW directory, and I added a statically link in /dev/.. .

    It's ok now .(No more Black Video)

    I'm only courios to say why dm365mmap is different fro the other. Maybe it's source is not well done, and as Thomas saied "But there are cases where it can be statically created using mknod command"

    Best Regards