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.

DM6446 errors trying to install dsplinkk.ko module

Hi,

I am having problems installilng the dsplinkk.ko module that comes with the DVSDK for DM6446. I recompiled dvsdk so that it matches the Linux kernel. However, the loadmodules.sh script fails with the following message:

cmem initialized 4 pools between 0x87800000 and 0x88000000
dsplinkk: no version for "struct_module" found: kernel tainted.
dsplinkk: module license 'DSP/BIOS(TM) LINK' taints kernel.
mknod: wrong number of arguments
Try `mknod --help' for more information.

Looks like there is no entry by name 'dsplink' under /proc/devices. Therefore, the loadmodules.sh script fails. Here is the loadmodules.sh script:

------------

iinsmod cmemk.ko phys_start=0x87800000 phys_end=0x88000000 pools=1x3145728,5x829440,1x61440,1x10240

# insert dsplinkk

insmod dsplinkk.ko

# make /dev/dsplink
rm -f /dev/dsplink
mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0
---------------

Looking at the driver sources for dsplink.ko, there should be a message printed on the console with version, date and time. The following is the snippet from dsplink_140-05p1/packages/dsplink/gpp/src/pmgr/Linux/2.6/drv_pmgr.c that prints the message during module_init()

    PRINT_Printf ("DSPLINK Module (%s) created on Date: %s Time: %s\n",
                  DSPLINK_VERSION,
                  __DATE__,
                  __TIME__) ;

Looks like may be the module_init() is not getting called because the above printf/printk is one of the first few lines in the module_init().

I tried doing a make clean followed by make for both Linux kernel and dvsdk. Does not seem to help. Although, I am able to load the module with the vanilla version of the kernel and modules. Is there something I am missing here?

 

Thanks in advance,

-sid

 

  • Here is my /proc/devices:

    ==========================================

    Character devices:
      1 mem
      2 pty
      3 ttyp
      4 /dev/vc/0
      4 tty
      4 ttyS
      5 /dev/tty
      5 /dev/console
      5 /dev/ptmx
      7 vcs
     10 misc
     13 input
     14 sound
     29 fb
     81 video4linux
     89 i2c
     90 mtd
    128 ptm
    136 pts
    180 usb
    230 dsplink
    253 cmem
    254 Resizer

    Block devices:
      1 ramdisk
      3 ide0
     31 mtdblock
    254 mmc

    ==============================================

    we can get from "mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0" that "mknod" wants to find out a major number for dsplink from /proc/devices, but it's failed in your post.   

    I think "awk" does not find the major number of "dsplink", so could you try "awk '{if($2~/dsplink/) print $1;}' /proc/devices" to check whether it is existed or not?

    Lorry.

  • Hi Lorry,
    There is no entry by name dsplink in /proc/devices. Therefore awk is going to return an error (empty string). I tried to figure out why there is no entry in /proc/devices and looks like the code that creates this entry (register_chrdev) is never called from the kernel. Is there any particular dependency on kernel configuration etc ?

    thanks,

    -sid

  • Yes, I think "register_chrdev" failed or "DSP_SUCCEEDED (status)" is false;  My dsplink driver is lower than yours, so I do not find "PRINT_Printf" in the driver code.

    I wonder whether it has been existed a device who's major number is 230 in your /proc/devices before "insmod dsplink", if it is true, I think, "register_chrdev" will fail.

    If "cmem" can be set successfully, I think "register_chrdev" should also succeed while setting "dsplink".

    I suggest that you can enable a trace function "TRC_SET_SEVERITY (TRC_ENTER)" which is commented before "register....." to trace the driver.

    BTW, I don't know where you check the print result of "PRINT_Printf", I think it will print in "/var/log/messages" instead of terminal.