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 omapconf

I have got the source code from  https://github.com/omapconf/omapconf, but I do not know how to build it.

because it need c libraries.

include<ctype.h>、include<unistd.h>、include<stdlib.h>、include<stdio.h>

That ctype.h and unistd.h I have copied from another project and put them in omapconf-master/linux and omapconf-master/arch/arm/mach-omap/omap4 respectively, but stdio.h and stdlib.h I don't know how to set it. Can I copy them from another project and were I can find them? Thank you.

  • Hello,

    If you are using Android, please refer to the following e2e thread, in order to build & install OMAPconf:
    http://e2e.ti.com/support/omap/f/849/t/221707.aspx

    For Ubuntu distribution for OMAP4, the TI Omapconf is available as ubuntu package. You should execute the following commands:
     # sudo apt-get install tiomapconf

      After package is installed, execute

     # dpkg -l tiomapconf

    For other Linux distributions:
     To only build the output binary file:


     # make CROSS_COMPILE=arm-none-linux-gnueabi- omapconf


     where CROSS_COMPILE variable must be set to point to the correct compiler.

     To build and install omapconf:


     # make CROSS_COMPILE=arm-none-linux-gnueabi- DESTDIR=YOUR_DIR install


     where YOUR_DIR is a destination directory of your choice where omapconf output binary file will be copied
     (e.g. ubuntu/android filesystem).


    Best Regards,
    Yordan

  • Hi Yordan

    I can't make instruction sudo apt-get install tiomapconf

                $  sudo apt-get install tiomapconf
               [sudo] password for bernie:
               Reading package lists... Done
               Building dependency tree      
               Reading state information... Done
               E: Unable to locate package tiomapconf


    Because I went to  packages.ubuntu.com and did't find tiomapconf packages. So I download entire folder from github named omapconf-master to build. I have no problem with set CROSS-COMPLE etc, but I don't know how I set c libraries. When I into omapconf-master and make, it appears

     

    bernie@ubuntu:~/ST4B1/omapconf-master
    $ make
    /home/bernie/ST4B1/mydroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc  -D_OMAP5430 -D_SC_VER_1_16 -c -Wall -Wextra -Wno-missing-field-initializers -I/home/bernie/ST4B1/mydroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/../lib/gcc/arm-eabi/4.6.x-google/include -I. -Icommon -Ipmic -Iaudioic -Ilinux -Ii2c-tools -Iarch/arm/mach-omap/common -Iarch/arm/mach-omap/common/prcm -Iarch/arm/mach-omap/common/statcoll -Iarch/arm/mach-omap/omap4 -Iarch/arm/mach-omap/omap4/prcm -Iarch/arm/mach-omap/omap4/dpll -Iarch/arm/mach-omap/omap4/pmi -Iarch/arm/mach-omap/omap5 -Iarch/arm/mach-omap/omap5/prcm -Iarch/arm/mach-omap/omap5/dpll -Iarch/arm/mach-omap/omap5/ctrlmod -Iarch/arm/mach-omap/dra7 -Iarch/arm/mach-omap/dra7/ctrlmod -Iarch/arm/mach-omap/dra7/prcm -Iarch/arm/mach-omap/dra7/dpll -static omapconf.c -o omapconf.o
    omapconf.c:47:20: fatal error: stdlib.h: No such file or directory
    compilation terminated.
    make: *** [omapconf.o] Error 1

     

     


    Thanks to your patient reply.


    BestRegards

    Bernie

     

  • Hello Bernie,

    I. Regarding the building of OMAPCONF. I think you are using the wrong cross compiler. Here are the steps I took to build omapconf tool:

    1. cloned sources from github: https://github.com/omapconf/omapconf.git

    2. # cd ~/omapconf/omapconf

    3. #export PATH=/home/bin/toolchains/arm-2010q1/bin/:$PATH

    4.#make CROSS_COMPILE=arm-none-linux-gnueabi- omapconf

    After taking the above steps the build was successful.

    II. Regarding the installation with apt-get install command. You must have Ubuntu OS running on your OMAP4 board.  I have ported the GLP release (in which omapconf is enabled by default) for pandaboard, and bellow is the result:

    root@omaphost:~# apt-get install tiomapconf
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    tiomapconf is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    Here are the sources my pandaboard uses for apt-get command:
    root@omaphost:/etc/apt# cat sources.list
    # Precise Canonical
    deb http://ports.ubuntu.com/ubuntu-ports/ precise main universe multiverse restricted
    deb-src http://ports.ubuntu.com/ubuntu-ports/ precise main universe multiverse restricted
    deb http://ports.ubuntu.com/ubuntu-ports/ precise-security main universe multiverse restricted
    deb-src http://ports.ubuntu.com/ubuntu-ports/ precise-security main universe multiverse restricted
    deb http://ports.ubuntu.com/ubuntu-ports/ precise-updates main universe multiverse restricted
    deb-src http://ports.ubuntu.com/ubuntu-ports/ precise-updates main universe multiverse restricted

    Best Regards,
    Yordan

  • Hi Yordan

    Thanks your prompt reply, I will clarify it tomorrow.

    Because we use 2.5P2 code on the board, so I regarded to use the cross-compiler that build 2.5P2 in the first time.

     

    export YOUR_PATH=~/jorjin_bsp
    export MYDROID=${YOUR_PATH}/mydroid
    export PATH=$PATH:${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/
    export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-

    BestRegards
    Bernie
  • Bernie,

    The omapconf reuqires arm-none-linux-gnueabi- cross compiler, in order to be build.  This is clarified in the README.md file in omapconf sources.

    Best Regards,

    Yordan

  • As I see you use android, so after you build the omapconf tool, you should execute the following sequence:

    Go to the directory where your omapconf binary is outputted after the build. In my case (as explained in the build sequence in my previous post) this is:
    #cd ~/omapconf/omapconf

    Then execute

    #adb remount

    #adb root

    #adb push omapconf /system/bin

    That should install omapconf on your board.

    Best Regards,
    Yordan

  • Hi Ti

    Excuse me, If I want to check these values of hardware registers such as DISPC_DIVISOR and DISPC_DIVISOR2, or display controllers registers else, does omapconf can do that? Thank you.

    Bernie

  • Hi Bernie,

    Yes omapconf can read & write to device registers.

    You should use

     $sudo omapconf read <REGISTER_ADDRESS>

     $sudo omapconf write <REGISTER_ADDRESS>


    Have in mind that, if the module is not functional (clocks/pwr are NOT enabled from PRCM), omapconf would not be able to read the register value. You should enable the module first (you can do that by using omapconf write to the appropriate PRCM registers) and then read the hw registers. 

    Best Regards,

    Yordan