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.

Display Controller setting in Jacinto 6

We are using  Linux kernel 3.8 Jacinto 6 in our automotive rear seat entertainment platform with 2 LCD panels. we need two frame buffers /dev/fb0 and /dev/fb1.      what are the Linux kernel settings to enable two display output channels. 

there are also other use-case scenarios like :

1)toggle switching screen: means LCD1 and LCD2 swap the contents dynamically

2)Joint Play: this involves LCD1 and LCD2 share same contents

In our framebuffer design we want /dev/fb0 and /dev/fb1 share same physical memory and totally 4 times size of LCD resolution. 2 buffers for each panel to enable double buffers.

we assume we can use this ioctl: ioctl (fbfd, FBIOPUT_VSCREENINFO, finfo) to set the Y-Axis offset dynamically between /dev/fb0 and /dev/fb1 to achieve. but we want to kernel setting for allocating physical memory of that size and sharing between 2 display output channels. also provide more information on the design 

  • Hi,

    I have looped linux kernel experts to comment here.

    Thanks,
    Alex
  • ok. thanks looking forward for the answer, let me know if more clarifications are required
  • Hi,

    3.8 Kernel is not supported currently. Dual display configuration is supported on 3.14/4.4 kernels with DRM. Please refer to below examples for cloning the display or maintaining two independent displays.

    regards,

    Venkat

  • Hi Venkat,
    Thanks for the answer, In Linux Kernel 4.4. what are the menuconfig options to select multiple Display output channels.
    I referred the document, but I still have some queries.
    what exactly is cloning mode, does it mean LCD1 and LCD2 share same contents and does libdrm support the feature?
    how about the LCD toggling functionality as I had mentioned above, any sample implementations
    thanksannamalaithanksAnnamalai
  • hi,
    just some more details, as per the wiki drmclone mode is used for displaying same contents on LCD and HDMI, how about 2 LCD's /dev/fb0 and /dev/fb1. we dont have an HDMI in our design as output
    thanksAnnamalai
  • Hi,

    Multiple display channels are enabled by default in the kernel. There are no
    separate menuconfig options required. You can update the device tree with the
    entries for both the LCD's and run "modetest" to see both the LCD connectors.

    The toggling function and cloning function can be implemented by using
    standard libdrm functions

    - drmModeSetPlane
    - drmModeSetCrtc

    These are standard API's. While we do not have separate example applications,
    display_kms.c:post_vid_buffer() shows how these API's can be used.

    git.ti.com/.../display-kms.c

    regards,
    Venkat
  • Hi,

    clone mode is not dependent on the type of display. You can use it with 2 LCD's as well.

    regards,
    Venkat
  • thanks for your answer, what do you mean by toggling can you please explain what is toggling function?

  • Hi 

    We need some sample application for LCD toggling and Clone mode.

    may not be at source level, but atleast psuedo code that can help explain the source code.

    otherwise, finding difficult to understand the source. 

    thanks

    Annamalai

  • Hi ,

    Execute  viddec3test from omapdrmtest example application  on J6 board .

    You can clone this from git://git.ti.com/glsdk/omapdrmtest.git

    usage: viddec3test -s 4:800x480 -s 16:1280x720 stream.mp4 --fps 30 (connector -id and mode may change)

    This is clone mode , posts the same decoded buffer fb_id , on both the displays to simulate Joint playback.

    I have tested toggling using attached patch on viddec3test. It is just choosing the second instance's display for first instance's decoder buffer.

    You can make it dynamic also.

    From 2b3286d945f3dc69b2c9e4143ae4a3d55f4cfec7 Mon Sep 17 00:00:00 2001
    From: Ramprasad <x0038811@ti.com>
    Date: Wed, 12 Oct 2016 14:29:51 +0530
    Subject: [PATCH] viddec3test: Testing toggle support
    
    Signed-off-by: Ramprasad <x0038811@ti.com>
    ---
     viddec3test.c |   31 +++++++++++++++++++++++++++++--
     1 file changed, 29 insertions(+), 2 deletions(-)
    
    diff --git a/viddec3test.c b/viddec3test.c
    index 984334a..822e09c 100644
    --- a/viddec3test.c
    +++ b/viddec3test.c
    @@ -34,6 +34,9 @@
     /* omap drm device handle */
     struct omap_device *dev = NULL;
     
    +struct display *disp[2] = {0};
    +unsigned int dix = 0;
    +
     struct decoder {
     	struct display *disp;
     	struct demux *demux;
    @@ -60,6 +63,7 @@ struct decoder {
     /* When true, do not actually call VIDDEC3_process. For benchmarking. */
     static int no_process = 0;
     static int inloop = 0;
    +static int toggle = 0;
     
     /* When true, loop at end of playback. */
     static int loop = 0;
    @@ -109,6 +113,20 @@ decoder_close(struct decoder *decoder)
     	}
     }
     
    +struct display *getDisp(struct decoder* decoder, bool toggle)
    +{
    +	if(!toggle)
    +		return decoder->disp;
    +	else{
    +		if(disp[0] == decoder->disp)
    +			return disp[1];
    +
    +		else if(disp[1] == decoder->disp)
    +			return disp[0];
    +
    +	}
    +}
    +
     static struct decoder *
     decoder_open(int argc, char **argv)
     {
    @@ -129,6 +147,8 @@ decoder_open(int argc, char **argv)
     		if (!decoder->disp)
     			goto usage;
     
    +		disp[dix++] = decoder->disp;
    +
     	    /* loop thru args, find input file.. */
     		for (i = 1; i < argc; i++) {
     			int fd;
    @@ -321,6 +341,7 @@ decoder_process(struct decoder *decoder)
     	int i, n;
     	XDAS_Int32 err;
     	int eof = 0; /* end of file flag */
    +	struct display* disp;
     
     	/* demux; in loop mode, we can do two tries at the end of the stream. */
     	for (i = 0; i < 2; i++) {
    @@ -412,8 +433,8 @@ decoder_process(struct decoder *decoder)
     
     			/* get the output buffer and write it to file */
     			buf = (struct buffer *)outArgs->outputID[i];
    -			if(!no_process)
    -				disp_post_vid_buffer(decoder->disp, buf,
    +			disp = getDisp(decoder,toggle);
    +			disp_post_vid_buffer(disp, buf,
     					r->topLeft.x, r->topLeft.y,
     					r->bottomRight.x - r->topLeft.x,
     					r->bottomRight.y - r->topLeft.y);
    @@ -474,6 +495,9 @@ main(int argc, char **argv)
     			loop = 1;
     			argv[i] = NULL;
     
    +		} else if (!strcmp(argv[i], "--toggle")) {
    +			toggle = 1;
    +			argv[i] = NULL;
     		} else if (!strcmp(argv[i], "--no-process")) {
     			no_process = 1;
     			argv[i] = NULL;
    @@ -495,6 +519,9 @@ main(int argc, char **argv)
     
     	if(ndecoders) decoders[ndecoders++] = decoder_open(argc ,&argv[first]);
     
    +	if (ndecoders < 2)
    +		toggle = 0;
    +
     	if (ndecoders > 1) {
     		pthread_t threadIds[8];
     
    -- 
    1.7.9.5
    
    

  • hi, thanks for your answer

    i am new to libdrm, but i understand ioctl and display driver.

    when you have this command for clone mode:"viddec3test -s 4:800x480 -s 16:1280x720 stream.mp4 --fps 30"

    how does it translation to device nodes '/dev/fb0' and '/dev/fb1' are '4' and '16' the connected id's you refer to that translate to device nodes.?what you mean by mode in the command line argument?

  • Hi,
    Fbdev is not used here. It is KMS/DRM which is nothing but replacement for linux fbdev to support features like hot plug, clone, overlay etc and many more features.

    You can refer few PDFs on KMS/DRM on how it models a display device using crtc, encoder, connector and plane.
  • hi,

    thanks for your answer, so that implies /dev/fbx need not be opened for rendering directly. and all rendering is managed by libdrm and DRM driver.  DRM driver exposes the plane (overlay), crtc, connector etc.. to libdrm. what would be the device node for DRM driver that libdrm uses.

    regards

    Annamalai

  • hi Ramprasad, Just wondering if we can use these API to toggle the display -
    drmModeSetPlanedrmModeSetCrtc
    basically we can switch the display dynamically using the above API's: a display has planes, crtc,encoder, connector, and frame buffer id.
    by using the above id, do we map crtc output to a differennt encoder. how else can we achieve the dynamic toggle screen.
    can this API be used 'drmModeSetCrtc' at run time when the video is playing to toggle screen the display,? and what do we need to swap (crtc, encoder or framebuffer id?
    hope my understanding is correctthanksAnnamalai
  • hi, is there a clarity in my question, do you have any comments?
  • Hi,
    Yes, you will have to call drmModeSetPlane() or drmModePageFlip() APIs to submit frame-buffers to display.
    In toggling case, just swapping the fb_ids will happen.

    First go through sample applications here.
    git.ti.com/.../drm-tests
  • ok, can we do this dynamically (call the API by switching the fb id) when the video is running.

  • Yes I have tested toggling dynamically every 10 seconds with my patch earlier shared. It is working properly
    If you have a J6 EVM you can try first running viddec3test
  • Hi Ramprasad
    I understand your patch, but If I am using libdrm directly can you specify the BKM to achieve the result.
    please clarify my understanding.regardsAnnamalai
  • Hi Ramprasad,  

    are there any DRM test applications available. Just would like to test 2 LCD display. what would be the best application to compile and test. also, provide any dependencies if any.

    regards

    Annamalai

  • Hi Ramprasad,

    I would like to compile omapdrmtests, I have downloaded GLSDK, but is there any way to compile omapdrmtest in a stand alone mode?

    git.ti.com/glsdk/omapdrmtest

     

  • hi, could any one reply some one from TI? I would like to compile git.ti.com/glsdk/omapdrmtest , can we compile it as a part of standalone application or only using glsdk, if so how?

  • Hi Annamalai,

    The GLSDK installer only contains the pre-built binaries.
    All the sources and example applications provided with GLSDK can be compiled and modified.

    Please refer to processors.wiki.ti.com/.../DRA7xx_GLSDK_Software_Developers_Guide and you will be able to compile omapdrmtest too.

    If you have already tried this, please let me know if you have a specific question/issue.

    Regards
    Karthik
  • Hi

    as per undersanding GLSDK Installation setup only is provided here processors.wiki.ti.com/.../DRA7xx_GLSDK_Software_Developers_Guide

    along with yocto setup. If my understanding is correct both are same.

    I tried the link and stuck up during yocto compilation (failure in bitbake)
    ./build-core-sdk dra7xx-evm has following failure (I executed in normal user and not in root)

    failuire:

    test@D1292-Ubuntu:/opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers$ ./build-core-sdk.sh dra7xx-evm
    SUCCESS: GCC Linaro tool chain path has been set correctly
    SUCCESS: CCS path has been set correctly
    In which directory do you want to place the downloads for the Yocto build ?(if this directory does not exist it will be created)
    Ensure that complete path is provided.
    [ /opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/downloads ]
    [PSDKLA]>
    [PSDKLA]> Current Directory is /opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers
    [PSDKLA]> PATH is /opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/sources/oe-core/scripts:/opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/sources/bitbake/bin:/opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/sources/oe-core/scripts:/opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/sources/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    [PSDKLA]> Building on D1292-Ubuntu running Linux D1292-Ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    [PSDKLA]> Starting Yocto build at Tue Oct 18 17:17:41 IST 2016
    [PSDKLA]>
    [PSDKLA]> ./oe-layertool-setup.sh -f configs/psdkla/processor-sdk-linux-automotive-03.00.00.03.txt
    /opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers


    cloning repo bitbake

    Fetching origin
    Previous HEAD position was 2585900... fetch2: Safer check for BB_ORIGENV datastore
    Switched to branch '1.30'
    Your branch is up-to-date with 'origin/1.30'.
    Already up-to-date.
    Note: checking out '25859009b710cb35ac8f9ee9eb3a7305f9e13402'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at 2585900... fetch2: Safer check for BB_ORIGENV datastore


    cloning repo meta-glsdk

    Fetching origin
    Switched to branch 'master'
    Your branch is up-to-date with 'origin/master'.
    Already up-to-date.
    Note: checking out 'fa59a61ec4ff277c2a6b4a884841f35f17431319'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at fa59a61... gstreamer1.0-plugins-ducati: Include bug fixes for memory leak


    cloning repo meta-arago

    Fetching origin
    Previous HEAD position was 674d98f... Revert "gstreamer1.0: Switch to GST 1.6.3"
    Switched to branch 'krogoth'
    Your branch is up-to-date with 'origin/krogoth'.
    Already up-to-date.
    Note: checking out '674d98f4997efa2e60f7ce39e6d7f908eaacb999'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at 674d98f... Revert "gstreamer1.0: Switch to GST 1.6.3"


    cloning repo meta-qt5

    Fetching origin
    Previous HEAD position was d715f2c... replace base_contains by bb.utils.contains
    Switched to branch 'krogoth'
    Your branch is up-to-date with 'origin/krogoth'.
    Already up-to-date.
    Note: checking out 'd715f2c1d340fa38f8a9860acc73de5e14a38b75'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at d715f2c... replace base_contains by bb.utils.contains


    cloning repo meta-openembedded

    Fetching origin
    Previous HEAD position was 247b126... Revert "leptonica: add PACAKGECONFIG for openjpeg"
    Switched to branch 'krogoth'
    Your branch is up-to-date with 'origin/krogoth'.
    Already up-to-date.
    Note: checking out '247b1267bbe95719cd4877d2d3cfbaf2a2f4865a'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at 247b126... Revert "leptonica: add PACAKGECONFIG for openjpeg"


    cloning repo meta-ti

    Fetching origin
    Previous HEAD position was a00cd08... linux-ti-staging: add 2 new DRA7 RevC LCD DTBs
    Switched to branch 'krogoth'
    Your branch is up-to-date with 'origin/krogoth'.
    Already up-to-date.
    Note: checking out 'a00cd08b1173400b0afbeaf8891f8fb9c1861ac0'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at a00cd08... linux-ti-staging: add 2 new DRA7 RevC LCD DTBs


    cloning repo meta-linaro

    Fetching origin
    Switched to branch 'krogoth'
    Your branch is up-to-date with 'origin/krogoth'.
    Already up-to-date.
    Note: checking out '85faf6c6824597e7fd9e2d35fc9d8da2e9f90bc7'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at 85faf6c... optee-os: update to 2.1.0 release


    cloning repo oe-core

    Fetching origin
    Previous HEAD position was dd33005... build-appliance-image: Update to krogoth head revision
    Switched to branch 'krogoth'
    Your branch is up-to-date with 'origin/krogoth'.
    Already up-to-date.
    Note: checking out 'dd330056ace289c8a9c5d77b6bb6e860b9f0913e'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b new_branch_name

    HEAD is now at dd33005... build-appliance-image: Update to krogoth head revision


    ################################################################################
    The bblayers.conf configuration file has been created for you with some
    default values. Please verify the contents of your conf/bblayers.conf
    file for correctness.

    NOTE: Any additional entries to this file will be lost if the ./oe-layertool-setup.sh
    script is run again. To add entries permanently to this file
    please add them to the config file used and rerun the
    ./oe-layertool-setup.sh script.



    ################################################################################
    The local.conf configuration file has been created for you with some
    default values. Please verify the contents of your conf/local.conf
    file for correctness.

    By default the number of threads used by the build is set to the number
    of CPUs found on your system.

    NOTE: You will probably want to change the default MACHINE setting in the
    local.conf file to the machine you are trying to build.

    WARNING: Found existing /opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/build/conf/local.conf
    Saving a backup to /opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/build/conf/local.conf.bak


    ################################################################################
    A setenv file has been created for you in the conf directory. Please verify
    The contents of this file. Once you have verified the contents please source
    this file to configure your environment for building:

    . conf/setenv

    You can then start building using the bitbake command. You will likely want
    to set the MACHINE option if you have not done so in your local.conf file.

    For example:
    MACHINE=xxxxx bitbake <target>

    Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-toolchain-sdk
    adt-installer
    meta-ide-support
    [PSDKLA]> cd build
    [PSDKLA]> . conf/setenv
    [PSDKLA]> cp conf/local.conf conf/local.conf.pristine
    [PSDKLA]> MACHINE=dra7xx-evm bitbake tisdk-rootfs-image
    ERROR: No valid toolchain in PATH
    ERROR: Unable to parse TOOLCHAIN_PATH[:=]
    Traceback (most recent call last):
    File "TOOLCHAIN_PATH[:=]", line 1, in <module>
    File "/opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/sources/bitbake/lib/bb/__init__.py", line 104, in fatal:
    mainlogger.critical(''.join(args), extra=kwargs)
    > raise BBHandledException()

    ExpansionError: Failure expanding variable TOOLCHAIN_PATH[:=], expression was ${@bool(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) and (os.path.exists(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) and os.path.dirname(d.getVar('TOOLCHAIN_SYSPATH', d, 1)) or bb.fatal('No valid toolchain in PATH')) or ''} which triggered exception BBHandledException:

    ERROR: Error parsing configuration files
    Traceback (most recent call last):
    File "/opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/sources/bitbake/lib/bb/cookerdata.py", line 258, in CookerDataBuilder.parseBaseConfiguration():
    try:
    > self.parseConfigurationFiles(self.prefiles, self.postfiles)
    except SyntaxError:
    File "/opt/ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03/yocto-layers/sources/bitbake/lib/bb/cookerdata.py", line 318, in CookerDataBuilder.parseConfigurationFiles(prefiles=[], postfiles=[]):
    # Handle any INHERITs and inherit the base class
    > bbclasses = ["base"] + (data.getVar('INHERIT', True) or "").split()
    for bbclass in bbclasses:
    AttributeError: 'NoneType' object has no attribute 'getVar'

    [PSDKLA]>
    [PSDKLA]> Completed Yocto build at Tue Oct 18 17:17:58 IST 2016
  • Hi
    Got away with this error, I am trying to locate source of few tests: (omapdrmtest for video decode+render):
    does the GLSDK download the source for all omapdrmtest located from here:
    git.ti.com/.../omapdrmtest
    i am unable to get the source of these tests pointed in above git, can you help with this?

    regards
  • could you please confirm if the glsdk source contains the following: git.ti.com/.../omapdrmtest

    i am using SDK for linux 4.4, if so what is the path

  • hi
    I am trying to compile this as per GLSDK guide:
    github.com/.../omapdrm-tests

    getting this linker error:
    root@D1292-Ubuntu:/home/omapsdk/omapdrmtest/omapdrm-tests# make
    [LD] db
    /usr/bin/ld: cannot find -ldrm_omap
    collect2: error: ld returned 1 exit status
    make: *** [db] Error 1


    regards
  • I have compiled omapdrmtest in stand-alone with Processor SDK LA v3.0 targetfs. There are few missing header files in targetfs.

    Refer attached file to build omapdrmtest from stand-alone.

    git clone git://git.ti.com/glsdk/omapdrmtest.git
    cd omapdrmtest
    
    export PSDKLA=<PATH for targetfs_SDK3.0>
    export PATH=<PATH for gcc-linaro-arm-linux-gnueabihf-5.3/bin:$PATH
    export PKG_CONFIG_PATH=$PSDKLA/usr/lib/pkgconfig
    export INSTALL_PATH = <Install location>
    export DRM_CFLAGS="-I$PSDKLA/usr/include -I$PSDKLA/usr/include/libdrm/ -I$PSDKLA/usr/include/omap -I$PSDKLA/usr/include/libkms"
    export DRM_LIBS="-L$PSDKLA/usr/lib -L$PSDKLA/lib -lattr -ldrm -ldrm_omap"
    export GBM_CFLAGS=-I$PSDKLA/usr/include/gbm
    export GBM_LIBS="-L$PSDKLA/usr/lib -lgbm"
    export LIBUDEV_CFLAGS=-I$PSDKLA/usr/include
    export LIBUDEV_LIBS="-L$PSDKLA/usr/lib -ludev"
    export DCE_CFLAGS="-I$PSDKLA/usr/include/dce"
    export DCE_LIBS="-L$PSDKLA/usr/lib -ldce -lavutil -lavformat"
    
    $ cd $PSDKLA/usr/lib
    $ cp libudev.so libudev.so.0
    $ cp libz.so libz.so.1 
    
    ./autogen.sh  --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf  --prefix=$INSTALL_PATH --with-sysroot=$PSDKLA
    
    
    1)FFMPEG header files are missing in targetfs. 
      Extract ffmpeg source code from https://www.ffmpeg.org/releases/ffmpeg-3.0.tar.xz
      Copy libavcodec, libavformat and libavutil directories to /usr/include of targetfs_SDK3.0.
      You may still not find one libavutil/avconfig.h. This file is a generated header file ffmpeg is built. So ffmpeg can not be compiled,
     If you see error for libavutil/avconfig.h, create a file avconfig.h in /usr/lib/libavutil with following as its contents
     
    #ifndef AVUTIL_AVCONFIG_H
    #define AVUTIL_AVCONFIG_H
    #define AV_HAVE_BIGENDIAN 0
    #define AV_HAVE_FAST_UNALIGNED 1
    #endif /* AVUTIL_AVCONFIG_H */
    
    
    Create symbolic links libavcodec.so , libavformat.so, libavutil.so and libdce.so in /usr/lib/
     ex: ln -s libavcodec.so.57 libavcodec.so
     
    2) dce directory in /usr/include is missing in targetfs_SDK3.0. Copy targetfs_7_04/usr/include/dce to targetfs_SDK3.0/usr/include
    
    Now you should be able to build with make command.
    
    
    

  • thanks able to proceed further, there is another issue cropping up. I followed the steps you mentioned but still this error crops up:
    the header file is also present in the directory "omap_drm.h":


    make[2]: Entering directory `/home/omapsdk/omapdrmtest/omapdrmtest/util'
    CC libutil_la-display-kms.lo
    In file included from display-kms.c:22:0:
    util.h:29:22: fatal error: omap_drm.h: No such file or directory
    compilation terminated.
    make[2]: *** [libutil_la-display-kms.lo] Error 1
    make[2]: Leaving directory `/home/omapsdk/omapdrmtest/omapdrmtest/util'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/omapsdk/omapdrmtest/omapdrmtest'
    make: *** [all] Error 2
  • looks like there are some autogeneration errors ^M charachters are getting introduced after the export commands:

    /home/test/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ldrm_omap
    /home/test/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ldce
    /home/test/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lavformat
    /home/test/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgbm
    collect2: error: ld returned 1 exit status
    make[2]: *** [fliptest] Error 1
  • Hi Ramprasad

    would you have any idea, I do have libdrm_omap.so, libavformat.so in the lib folders.

     

  • Try make V=1
    it should show all CFLAGS, and LIBS. Check if path is proper.
  • hi. Tried they seem ok. when I dump the makefile output i some time see ^M in the end of files.
    the libs are all placed in the path, would you recommend any other suggestion
  • hi ramprasad
    thanks its working fine i just had to do dos2unix to remove ^M charachters. all is fine thanks