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.

Linux/AM5718: Compiling modetest source code

Part Number: AM5718


Tool/software: Linux

Hi all,

 i have downloaded drm example source codes (including modetest ) as mentioned in this link.(https://wiki.linaro.org/xinliang/libdrm/modetest) .

  • Hello,

    I am sorry but what is the question here? If it is how to download and compile the modetest demo, you could do this by following this guide:
    software-dl.ti.com/.../Overview_Building_the_SDK.html
    For omapdrm demos the last step must be MACHINE=am57xx-evm bitbake omapdrmtest instead of MACHINE=am57xx-evm bitbake arago-base-tisdk-image. For modetest demo you must build libdrm(MACHINE=am57xx-evm bitbake libdrm).
    When the building is finished you could find it here:
    /tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/libdrm/x.x.xx-r0.arago1/libdrm-x.x.xx/tests/modetest

    Just for information you could run modetest by following this guide:
    software-dl.ti.com/.../Foundational_Components_Graphics.html
    There is no need to build it, it already exists in the rootfs.

    BR
    Margarita
  • sorry,
    We would like to compile the downloaded source code using ARM cross compiler(arm-linux-gnueabihf-). Also we have tested available kmscube application with SDK. We have downloaded kmscube source code inorder to add few modification. Please help us with recompiling and test procedure for all the example source code.

    Regards,
    Noufal P
  • Hello,

    The right way is described in the previous answer, same is for kmscube.
    In the guide above you will find chapter how to re-compile the code when you make changes and how to install it also. Please refer all the chapters.

    BR
    Margarita

  • Hi,

    thank you for your reply. Am following same and facing some error, while executing following command,

    " MACHINE=am57xx-evm bitbake arago-base-tisdk-image " mentioned in section "1.2.2.2. Build Steps".

    WARNING: libarchive-native-3.3.2-r0 do_fetch: Failed to fetch URL http://libarchive.org/downloads/libarchive-3.3.2.tar.gz, attempting MIRRORS if available
    ERROR: libarchive-native-3.3.2-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/opt/Noufal/hal_spm2/tisdk/sources/oe-core/scripts/native-intercept:/opt/Noufal/hal_spm2/tisdk/sources/oe-core/scripts:/opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/recipe-sysroot-native/usr/bin:/opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/recipe-sysroot-native/usr/sbin:/opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/recipe-sysroot-native/usr/bin:/opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/recipe-sysroot-native/sbin:/opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/recipe-sysroot-native/bin:${DEF_TOOLCHAIN_PATH}/bin:/opt/Noufal/hal_spm2/tisdk/sources/bitbake/bin:/opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/hosttools"; export HOME="/home/ubuntu"; /usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /opt/Noufal/hal_spm2/tisdk/downloads 'http://libarchive.org/downloads/libarchive-3.3.2.tar.gz' --progress=dot -v failed with exit code 8, output:
    --2018-11-29 09:15:55--  http://libarchive.org/downloads/libarchive-3.3.2.tar.gz
    Resolving libarchive.org (libarchive.org)... 54.230.71.28, 54.230.71.40, 54.230.71.121, ...
    Connecting to libarchive.org (libarchive.org)|54.230.71.28|:80... connected.
    HTTP request sent, awaiting response... 403 Forbidden
    2018-11-29 09:15:57 ERROR 403: Forbidden.
    
    
    ERROR: libarchive-native-3.3.2-r0 do_fetch: Fetcher failure for URL: 'http://libarchive.org/downloads/libarchive-3.3.2.tar.gz'. Unable to fetch URL from any source.
    ERROR: libarchive-native-3.3.2-r0 do_fetch: Function failed: base_do_fetch
    ERROR: Logfile of failure stored in: /opt/Noufal/hal_spm2/tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/temp/log.do_fetch.2988
    ERROR: Task (virtual:native:/opt/Noufal/hal_spm2/tisdk/sources/oe-core/meta/recipes-extended/libarchive/libarchive_3.3.2.bb:do_fetch) failed with exit code '1'
    Waiting for 1 running tasks to finish:
    

    Error observed is attached as file(error_bitbake)

    Regards

    Noufal P

  • Hello,

    First of all you must execute this line MACHINE=am57xx-evm bitbake libdrm instead of MACHINE=am57xx-evm bitbake arago-base-tisdk-image . There is no need to build the full filesystem since you could build only libdrm(at least you will save a lot of time).
    Second you must execute the steps from 1.2.2.1. Prerequisites (One-time setup) chapter. If you are behind proxy follow this:
    wiki.yoctoproject.org/.../Working_Behind_a_Network_Proxy

    BR
    Margarita
  • Hi,

    1. Even if we follow same procedure as mentioned above, facing same issue, given below.
    2. Also i tried the command-- MACHINE=am57xx-evm bitbake libdrm. Same observation has been made.

    ----Error starts here----
    ERROR: libarchive-native-3.3.2-r0 do_fetch: Fetcher failure for URL: 'libarchive.org/.../libarchive-3.3.2.tar.gz'. Unable to fetch URL from any source.
    ERROR: libarchive-native-3.3.2-r0 do_fetch: Function failed: base_do_fetch
    ERROR: Logfile of failure stored in: /tisdk/build/arago-tmp-external-linaro-toolchain/work/x86_64-linux/libarchive-native/3.3.2-r0/temp/log.do_fetch.2491
    ERROR: Task (virtual:native:/KMS_MODE/tisdk/sources/oe-core/meta/recipes-extended/libarchive/libarchive_3.3.2.bb:do_fetch) failed with exit code '1'

    Regards,
    Noufal

  • Hello,

    You could try to download it manually from here:
    libarchive.org/.../libarchive-3.3.2.tar.gz
    cp this to <tisdk>/downloads and execute touch command.

    touch <tisdk>/downloads/libarchive-3.3.2.tar.gz.done

    BR
    Margarita
  • Hello,

    Please if this answers your question click the "This resolved my issue" button.
    Thank you!

    BR
    Margarita
  • Thanks for the inputs. we got the source codes for example. We are trying to rebuild the example. will update if any issues in rebuilding.

    Regards,

    Noufal P

  • Hi,

    We have followed the same procedure to build libdrm example source code. we got the source code for modetest and kmscube at mentioned path. Now we have to recompile modetest and kmscube source code only. Can you please help us with this.


    Regards,
    Noufal P
  • Hello,

    Please check these chapter "Forced Re-compilation" and "Installing Package" in this guide:
    software-dl.ti.com/.../Overview_Building_the_SDK.html

    In your case will be:
    MACHINE=am57xx-evm bitbake kmscube --force -c compile
    and
    MACHINE=am57xx-evm bitbake libdrm --force -c compile

    BR
    Margarita
  • Hi,
    Thanks for the quick reply. Using above procedure, we are able to compile successfully. But we are confused with the application image generated.
    which folder it will be copied/generated?

    Regards,
    Noufal P
  • Hello,

    /home/mms/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/libdrm/x.x.x0-r0.arago1/build/tests/modetest/.libs

    Check in the path above. .libs is a hidden folder so please press ctrl+h. There you could find modetest. I would recommend you to add some print to verify that you are using the modified by you demo.

    BR
    Margarita
  • Hi,

    Thank you for your support. we got the updated images.

    Regards,
    Noufal P
  • Hi Madam,

    we have got the modetest source code at <root>/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/libdrm/2.4.83-r0.arago2/libdrm-2.4.83/tests/. But here we are no seeing any source code for kmscube. We found one file at <root>/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/omapdrmtest/1.0.0-r27/git/util/display-kmscube.c. But if we modify anything and compile the source code, we are getting kmscube executables but we are not seeing any changes in the application. If this is not the proper source code, can u please help me with the proper source code for kmscube.

    Thanks and Regards
    Noufal P
  • Hello,

    This is not the correct source. This is for omapdrmtest not for kmscube demo.
    This is what you must execute:
    MACHINE=am57xx-evm bitbake kmscube
    This is the correct path to kmscube source code:
    /tisdk/build/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/kmscube/1.0.0-r7.tisdk0/git

    This is the command to recompile:
    MACHINE=am57xx-evm bitbake kmscube --force -c compile

    BR
    Margarita