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.

How to build dsplinkk.ko and lpm_omap3530.ko

Other Parts Discussed in Thread: OMAP3530

Dear Sir,

I am using Codec Engine with CE tools (that is LPM included) release 2.26.02.11 and DSP Link release 1.65.00.03 How do I build the corresponding .ko files?

I managed to build cmemk.ko file out of the codec engine linux utils but I can not see any doc/notes regarding this.

Thanks Ofer

  • To build the DSPLink driver, look at the Install Guide for your device in your DSPLink install folder. For example, on OMAP3530

    dsplink/doc/InstallGuide_Linux_OMAP3530.pdf

    Section 7.3 talks about LPM. Section C talks about configuring and building DSPLink.

    Here are some alternate instructions for building the lpm driver. Look at the makefile in the module directory for your device. For example, on OMAP3530, look in

    ti/bios/power/modules/omap3530/lpm/Makefile

    In this makefile, you will see a comment describing the following make variables which you need to define.

    LINUXKERNEL_INSTALL_DIR
    MVTOOL_PREFIX
    DSPLINK_REPO

    Then just run make in that directory.

    ~ Ramsey

  • Ramsey,

    Thanks alot. How about cmemk.ko? (I built it but I think it was build for OMAP1 and not OMAP 3530 despite the fact that I change all variables required) can you describe this also? thanks

    Ofer

  • Ofer,

    There is a readme file in the linuxutils/cmem folder.

    ti/sdo/linuxutils/cmem/readme.txt

    You can also just enter the following commands which clean and build the driver with the given tool chain and Linux kernel.

    # ti/sdo/linuxutils/cmem
    rm -rf modules/evm3530
    mkdir -p modules/evm3530
    make -C src/modules MVTOOLS_PREFIX=... LINUXKERNEL_INSTALL_DIR=... clean release
    cp src/module/cmemk.ko modules/evm3530

    ~ Ramsey

  • Ramsey,

    Thanks, yes I am aware of the readme and use it, how does I gurrentte that cmem is compiled to OMAP3530 (or it is linux only dependent)?

    Thanks for you help.,

    Ofer

  • The cmemk.ko generated is looking for specifc path .dep file - how can I change the path it is searching for? (it is searching /lib/modules/2.6.29-rc3-omap1/modules.dep

    Ofer

  • I believe cmem is hardware independent; it only depends on the Linux version. As long as you build against the same Linux version you are running on the device, you should be okay.

    ~ Ramsey

  • OK (last one) - my kernel on target is 2.6.22 while PSP is 2.6.29 is this an issue ? or maybe I need to configure somehow the .dep file that it is looking so or simply look for the corresponding PSP (that is for 2.6.22) ?

    Ofer

  • Regarding the second question, did this error occur when you ran the loadmodules.sh script? If so, try copying cmemk.ko into the same directory as the loadmodules.sh script. Then run the script again, this will cause the script to insmod the driver which does not require a modules.dep path. The loadmodules.sh script will use the modprobe command if the driver is not in the same folder; this is probably where the error is coming from. I don't know how to change the modules.dep search path. Its best to setup your folder with the cmemk.ko driver.

    ~ Ramsey

  • Re: Linux versions. I always use the Linux kernel from the PSP release on the target. The driver might not insmod correctly if it is built against a different version from what is running on the target. It would complain about a version mismatch. Either find the PSP for the Linux version you are using (which might not exist) or load the kernel image provided in the PSP release you already have.

    ~ Ramsey

  • Ramsey,

    The .sh and the .ko are at the same directory as was suggested by the examples description docs, the cmem fails with structure disagree.. and also looking for that .dep file I copied the .sh from the codecengine directory but now I am building all .ko by the stand alone packages that is I installed unixutils for cmemk.ko and lpm tool for lpm_omap3530.ko and dsplink tool I have already as stand alone.

    Ofer

  • I think the cmem failure to install comes from the different Linux versions. You need to build against the exact same Linux kernel that you are running on the target.

    ~ Ramsey

  • Ramsey,

    While tring to insmod the .ko files I got "disagrees about version of symbol structure_module" although my target kernel is 2.6.29-rc3 and I built using PSP 02.01.01.08 which is (according documentation) based on 2.6.29-rc3

    Ofer

  • also, while building the dsplink it only generated dsplink.lib and not dsplinkk.ko (this is why I asked before regrding this file althouth I built dsplink already several weeks ago)

    Ofer

  • OK I managed to compile the dsplinkk.ko. So now the only issue is the "disagrees.....symbol struct_module" from reading in the Internet I understand that not only the version string shall be identical (so in my case) but the configuration used to compile. How can I make sure I am using same configuration ? (and by that solving the issue)?

    Ofer

  • Also based on FAQ published by TI I checked my target kernel = 2.6.29-rc3-omap1 and also the cmemk.ko (and dsplinkk.ko) magic number and it is equivalent (2.6.29-rc3-omap1) and this as the FAQ might be the casuse of the error (disagrees....symbol struct_module) but this is not the case here.

    Any idea?

    Ofer

  • It sounds like you are not building the dsplinkk.ko driver against the exact same kernel you are running on the target board. As you discovered, the Linux kernel version and configuration must match.

    When building dsplinkk.ko, you need to set KERNEL_DIR (see dsplink/doc/Install Guide, Sec 9.5) to the same folder which built the kernel image you are running on the development board. If you don't have access to that folder, then you need to build the kernel yourself (see PSP/docs/GettingStarted.pdf), load it onto the target board and set KERNEL_DIR to your kernel build folder.

    ~ Ramsey

  • Ramsey,

    Thanks. Indeed that what i was told by Robert and it solved the issue. Now if I may I have 2 questions: (1) cmemk insmod parameters (0x86000000-0x86000000) is failed while saying that it overlapped with kernel ? (2) while running the application on the target it says can not find the codec ?

    Thanks Ofer

  • Please start a new thread for each new question and provide more details. You will get more people looking at the thread and better responses. These questions are not in my area, but I'll make a quick guess.

    Re: question 1, the kernel mem boot args must be overlapping with the cmem parameters. You will have to modifiy one or both to eliminate the overlap. It seems odd that the cmem params have the same start and end addresses.

    Re: question 2, you will need to provide more details such as what application, which core is it running on, copy of error message, etc.

    Again, please start new threads.

    ~ Ramsey