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.

  • Resolved

Linux/PROCESSOR-SDK-AM335X: Adding SGX on base arago file system.

Expert 1160 points

Replies: 9

Views: 3551

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi,

I am working with Processor SDK 3.4.

I want a small system but it has to have a 3D accelerator support.

Using the big File system it has way too many things that I do not need.

Using the base file system, I cannot find rc.pvr in the init folder. It looks like its not part of the small file system.

What would be the procedure of adding it?

Is it through menuconfig of the linux and then building.

Or is it a separate package that has to be compiled and then installed on the target?

Kind regards,

Ugnius

  • Hi Ugmius,

    The Processor SDK Linux provides Filesystem Images that contain programs, scripts, Linux user-space components that abstract various hardware accelerators available in the SoC. The Filesystem can be fully assembled via Yocto.

    processors.wiki.ti.com/.../Processor_SDK_Linux_Filesystem
    processors.wiki.ti.com/.../Processor_SDK_Building_The_SDK

    Regards,
    Pavel



  • In reply to Pavel Botev:

    Hi Pavel,

    Thanks for your response. Trying to use the Building the SDK steps it looks like the base SDK if I were to take it without modifications has everything included.

    And then using DISTRO_FEATURES_remove I can remove features from it before fetching.

    Is there a list of removes that would give me a bare base, and I can choose which removes to not use to keep required features?

    Or is there an option that would make it into a bare base version, and I could use commands to add features?

    The example has:

    DISTRO_FEATURES_remove = "wayland"

    "wayland" looks like a keyword that removes this module from SDK.

    Is there documentation describing all the possible options?

    Kind regards,

    Ugnius

  • In reply to Ugnius Subacius:

    Ugnius,

    I can find only two more wikis related to filesystem customization:

    processors.wiki.ti.com/.../Customization
    processors.wiki.ti.com/.../Sitara_Linux_Training:_Getting_Started_with_Openembedded

    For more info you should check Yocto documentation.

    There is also option to add graphics in bare metal filesystem, instead of removing unused features from full filesystem:

    e2e.ti.com/.../594535


    Regards,
    Pavel



  • In reply to Pavel Botev:

    Thanks Pavel,

    Yes, ideally I would like to add 3D support to bare system.
    I will check the resources you provided.

    Kind regards,
    Ugnius
  • In reply to Ugnius Subacius:

    It looks like sgx driver is available from sdk/board-support/extra-drivers/

    I can build it from the root of SDK with make ti-sgx-ddk-km

    When I try to install it to the file system however, it complains about uncnown symbols:

    INSTALL /home/tisdk_3304/board-support/extra-drivers/ti-sgx-ddk-km-1.14.3699939/eurasia_km/eurasiacon/binary2_omap_linux_release/target/kbuild/bc_example.ko
    INSTALL /home/tisdk_3304/board-support/extra-drivers/ti-sgx-ddk-km-1.14.3699939/eurasia_km/eurasiacon/binary2_omap_linux_release/target/kbuild/pvrsrvkm.ko
    DEPMOD 4.4.41-g968d071ce9
    depmod: WARNING: /home/tisdk_3304/targetNFS/lib/modules/4.4.41-g968d071ce9/kernel/fs/configfs/configfs.ko needs unknown symbol rt_down_read
    depmod: WARNING: /home/tisdk_3304/targetNFS/lib/modules/4.4.41-g968d071ce9/kernel/fs/configfs/configfs.ko needs unknown symbol _mutex_lock
    depmod: WARNING: /home/tisdk_3304/targetNFS/lib/modules/4.4.41-g968d071ce9/kernel/fs/configfs/configfs.ko needs unknown symbol rt_spin_unlock
    depmod: WARNING: /home/tisdk_3304/targetNFS/lib/modules/4.4.41-g968d071ce9/kernel/fs/configfs/configfs.ko needs unknown symbol rt_spin_lock

    it has a lot of these warnings.
    Does this mean it actually fails writing?

    The sdk I am using is RT version.
    Thus my kernel version is 4.4.41-rt50-g968d071ce9
    I had to remove rt50 name bit from the file system for it to access the correct location.
    Are these warnings caused by the fact that I am using RT linux version?
  • In reply to Ugnius Subacius:

    Ugnius,

    Do you use linux kernel and sgx driver from the same TI PSDK? Which AM335x TI PSDK you are using finally and exactly?

    Make sure that the module (sgx driver) is built against the current loaded kernel. See also if the below e2e threads will be in help:

    e2e.ti.com/.../562953
    e2e.ti.com/.../483575
    e2e.ti.com/.../480383

    Regards,
    Pavel



  • In reply to Pavel Botev:

    Hi,

    I built it on one machine and then moved it to another one using my own git repo.
    It looks like my first machine had normal version installed, and the second one had RT version installed.
    Basically I checked out normal SDK linux files onto RT version SDK. Thats why installing SGX triggered version mismatch errors.

    Using RT SDK alone I managed to build and install modules into my file system.

    Is installing module automatically sets up the driver or do I have to do anything on the target side before I can use the driver?

    The application I am trying to run cannot find libEGL.so.
    Is it part of the SGX driver?

    The error is: Error: libEGL.so: cannot open shared object file: No such file or directory.

    Kind regards,
    Ugnius
  • In reply to Ugnius Subacius:

    Ugnius,

    Ugnius Subacius
    Is installing module automatically sets up the driver or do I have to do anything on the target side before I can use the driver?

    Once successfully installed, ti-sgx-ddk-km (pvrsrvkm.ko) driver should be ready for use. See below wiki page for details:

    Ugnius Subacius
    The application I am trying to run cannot find libEGL.so.
    Is it part of the SGX driver?

    I can find such file in PSDK linux-devkit

    {PSDK}/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib



  • In reply to Pavel Botev:

    Hi Pavel,

    I tried copying the library files that my application require from {PSDK}/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib to my target /usr/lib/ folder.

    However in the end it still fails to load them properly:


    INFO [0.398]:Initia[ 157.407413] PVR_K:(Error): BridgedDispatchKM: Driver initialisation not completed yet.
    lize plugin: [greio (4.2.1.21580)] []

    PVR:(Error): Couldn't load WS module libpvrws_WAYLAND.so [0, ]
    PVR:(Error): PVRSRVBridgeCall: Failed to access device. Function ID:3223086849 (strerror returns no value.). [0, ]
    PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]
    WARN [0.418]:eglInitialize: failed. eglGetError returned 3003

    I will try to use bitbake to compile missing packages and then install them

    I did it for ti-sgx-ddk-um.
    But it still needs:
    wayland, libdrm-omap1 and libgbm2

    Will try to get them from bitbake.

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.