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.

A CMEM Error running DM6467 decode Demo

Other Parts Discussed in Thread: OMAP3530

HELLO

When i running a decode demo on an dm6467 board, there is a problem:

root@(none):/# cd /opt/dvsdk/dm6467/

.loadmodules.sh.swp            encodeCombo.x64P

cmemk.ko                       encodedecode

data/                          encodedecode.txt

davincieffect_1080i_30fps.264  interface

decode                         loadmodules.sh

decode.txt                     loadmodules.sh~

decodeCombo.x64P               loopbackCombo.x64P

dsplinkk.ko                    mapdmaq-hd

dvevmdemo                      thirdpartydemos/

encode                         web/

encode.txt

root@(none):/opt/dvsdk/dm6467# ./loadmodules.sh

CMEMK module: built on Dec 18 2009 at 16:23:45

  Reference Linux version 2.6.18

  File /home/sp/dvsdk_2_00_00_22/linuxutils_2_23_01/packages/ti/sdo/linuxutils/c

mem/src/module/cmemk.c

ioremap_nocache(0x87800000, 8388608)=0xc9000000

allocated heap buffer 0xc9000000 of size 0x4ac000

cmem initialized 3 pools between 0x87800000 and 0x88000000

dsplinkk: no version for "struct_module" found: kernel tainted.

DSPLINK Module (1.61.03) created on Date: Apr 16 2009 Time: 18:25:15

root@(none):/opt/dvsdk/dm6467# lsmod

Module                  Size  Used by

dsplinkk              109844  0

cmemk                  28108  0

root@(none):/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080i_30fps

.264

Decode demo started.

CMEM Error: init: Failed to open /dev/cmem: 'No such file or directory'

CMEM Error: CMEM file descriptor -1 (failed 'open()'), ensure CMEMK kernel modul

e cmemk.ko has been installed with 'insmod'CMEM Error: CMEM file descriptor -1 (

failed 'open()'), ensure CMEMK kernel module cmemk.ko has been installed with 'i

nsmod'Error: Failed to create display device

Failed to allocate memory.

Error: Failed to create BufTab for display pipe

Error: Failed to create Ir Object

root@(none):/opt/dvsdk/dm6467#

 my bootarg is: bootargs=console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/hda1 nolock mem=120M

 

how can i resolve this problem ?

please help me. Thank you very much.

 

 

  • This is interesting, it certainly seems like CMEM was inserted properly by the loadmodules.sh script, however the demo is not able to locate the CMEM node. I see the module is there because of your lsmod command, but is there actually a /dev/cmem directory that was created upon insertion? If not I am curious if you are running the default kernel and configuration provided with the DVSDK, as the /dev/cmem node should be instantiated automatically upon insertion of the CMEM module. If you are running the default setup than there may be some problem elsewhere that we may want to dig into, if you are using a custom configuration than it sounds like your kernel and filesystem are not using udev, in which case you may have to run mknod yourself to instantiate the /dev/cmem node.

  • Hello Bernie

    Thanks for you help

    When i build the kernel i disabled fuctions of USB & NetWork, will these do some impact?

    Thanks.

  • Hi

    Is this issue resolved? I am also seeing similar issue with DM365 EVM board and have no clue as to how to resolve. Can you or TI team help in cause of the failure and how to resolve the same.

    Thanks for your help,

    Rajam

  • Thanks to Bernie, I solved this problem.

    As mentioned by Bernie, you probably use “mknod”.

    Pictures following show how i solve this problem:

     

    From this Screenshot above you can get the major-number of the device cmem is 251, and the minor-number 0(default)

    Then you can make the node, as show below

     If you done this work, you can insmod the cmemk.ko.

    Myenglish is not good, so please forgive me if my expression is not clear.

    Thanks.

     

  • Thank you for the reply. My problem was not with the creation of CMEM. I could see the device but was getting the error "Failed to create Ir Object". I downloaded the latest DVSDK 3_10_00_16 along with the file system and rebuilt everything. Now the issue is not seen.

    Thanks for the help,

    Rajam

  • Hi Bernie, We have a similar issue like someone mentioned below. The device file was created succesfully under /dev but still got the error. I have enabled debug option in cmem.c. Below is the debug message

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

    CMEM Debug: init: entered - ref_count 0, cmem_fd -2
    CMEM Error: init: Failed to open /dev/cmem: 'No such device or address'
    CMEM Debug: alloc: entered w/ size 0xa9000, params - type POOL, flags NONCACHED, align 0
    CMEM Error: CMEM file descriptor -1 (failed 'open()'), ensure CMEMK kernel module cmemk.ko has been installed with 'insmod'

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

    Please note that the return code is -2 (ENOENT).

    # ls /dev
    cmem                null                tty35

    ...

    ...

    We are using 2.6.32 kernel for OMAP3530 and pulled cmem from ti-dvsdk_omap3530-evm_4_01_00_09/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils

    We use our customized yaffs2 file system.

    Built kernel on ubuntu host with arm-2009q1-203-arm-none-linux-gnueabi. We use mdev as device manager not udev.

    Any suggestions??  Thanks.

    Kalai

  • Bernie,

    I take back this issue. Actually its a problem with my mdev. It creates cmem as block device. But it was listed as char under /proc/devices.