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/AM3354: Porting 3D GPU drivers

Part Number: AM3354


Tool/software: Linux

Champs,

Need an advice for an unusual SW configuration. My customer has number of AM335x based products they started with years ago and continue to expand. SW-wise they started with an early Android (4.4 KitKat) and continue to use it till today updating only Linux kernel when needed. They are fairly proficient in doing this. Now, for their latest product they are upgrading to kernel 4.14 using ti-android-linux-4.14.y branch as a base and things seem to work except for the 3D graphics acceleration. I would imagine that the 3D graphics support in the android-linux kernel is for the AM57x/AM6x families which have SGX544 GPU. Probably this is why it isnt working on the AM335x? Or may be you could think of other reasons?

What I am thinking here is that they need to validate our Linux  4.14 SDK distro first to make sure graphics work as expected and then (probably) port the graphics support from the 4.14. Linux SDK kernel to the Android-linux 4.14 kernel. Questions I have are:

1. Does this sounds like a good way forward under the circumstances? 

2. If yes - would you be able to give high-level guide to porting the drivers from Linux SDK tree to Android-linux tree? 

thanks

Michael

  • Some progress so far: Standard 4.14 based Linux SDK comes up and works fine on the customer's test platform consisting of BeagelBoneBlack with a display attached. 

    When they try and incorporate it into their Android build they see errors complaining of missing libraries (libdrm, libgbm) such as below

    ---

    I/SurfaceFlinger( 1320): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...

    E/libEGL  ( 1320): load_driver(/system/lib/egl/libGLES_CM.so):

    dlopen failed: could not load library "libgbm.so.2" needed by "libGLES_CM.so"; caused by library "libgbm.so.2" not found

    ---

    Question: Should standard Linux SDK libraries work with Android? If not - what's missing and how it can be accomplished?

    thanks

    Michael

  • further progress:

    it would appear that the Linux SDK libraries are built with the build options that are not compatible with Android. An attempt to use Linux libraries with libraries generated the following error:

    ---

    I/SurfaceFlinger( 1320): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...

    E/libEGL  ( 1320): load_driver(/system/lib/egl/libGLES_CM.so): dlopen failed: could not load library "libdrm.so.2" needed by "libGLES_CM.so"; caused by empty/missing DT_HASH in "libdrm.so.2" (built with --hash-style=gnu?)

    ---

    Question: is there a way to get the required libraries without full Yocto build? If Yocto build is the only way - which recipes need to change and how in order to build Android compatible libraries?

    thanks

    Michael

  • Hi Michael,

    Sorry for the delay in my response. I am out of office with limited access to network. Let me assign this ticket to another engineer. Hope he will get time to analyze this  ticket and respond to you soon. 

    Regards,

    Manisha

  • Hello Michael,

    Based on the following thread, TI no longer supports Android on AM335x. Also, based on the following page, Witekio is another third-party that could provide expertise on AM335x platform.

    Regards,
    Krunal

  • Krunal,

    It is well understood that Android on AM335x is not supported. Customer is seeking advice on what recipes need to be modified in order to rebuild 3D graphics support software in standard Linux SDK Yocto build. once they know how to rebuild it they will be able to make changes required for the libraries to work under Android. 

    regards,

    Michael

  • Hello Michael,

    Based on my discussion with our experts, DDK packages for Linux and Android are different. Android graphics/display architecture uses components such as gralloc and hardwre composer hal (HWC) that are not found in Linux. If something works on Linux SDK with Linux DDK, just switching to Android Kernel will not be enough. 

    Also, I am wondering if you could please explain why the customer wants to use an older Android pastry with a newer Kernel version. 

    Regards,
    Krunal 

  • Hi Krunal,

    the main reason for upgrading the kernel is that the device drivers for the new designs are only available on newer kernel but the newer Android versions are too heavy for AM335x. Project timelines do not permit processor's upgrade, besides they standardized on AM335x across multiple product lines, so there are business considerations here as well.

    the big question is: is it at all possible to make 4.4 ANdroid graphics to work with the 4.14 kernel and what would be the way forward if one were to attempt it? We have Yocto build setup, should be able to build required components as needed.

    thanks fin advance or your guidance

    Michael

  • Hi Michael,

    As discussed internally, we do not support Android on AM335x and it is recommended to reach out to Witekio for support. I will be closing the ticket and if you have more questions, please feel free to open the ticket in the future.

    Regards,
    Krunal