This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How could I make sure the driver work success?

Note: This was originally posted on 3rd November 2011 at http://forums.arm.com

Dear all,

I'm trying to build linux Mali200 driver in arm system.
I build mali.ko and insert it success in linux.
The attachment is log when I insert module.
It always told me "Mali device driver r2p2-03rel0 loaded".

Would you please tell me how could I make sure the driver work success?
Because I try to run the SimpleProject.
It always get the error message "Error: No EGL Display available at src/egl_runtime.c:64"

thanks.

James
  • Note: This was originally posted on 9th November 2011 at http://forums.arm.com

    Hi James,

    the build command and config.h both look OK. I will look into the driver source to check other possible causes of EGL_BAD_ALLOC during eglInitialize().

    Have you checked that the config.h you are editing is the  file being used for compilation? You could check by temporarily adding an error:


    #error "Checking config.h"


    Do you know the framebuffer is working OK? For example, if you do:


    cat /bin/sh > /dev/fb


    do you see random colors appear on the display?

    If mtekvision have supplied the userspace binary library files (lib*.so) are they also able to provide you with a known working driver kernel module (mali.ko)?

    Cheers, Pete
  • Note: This was originally posted on 3rd November 2011 at http://forums.arm.com

    Hi James,

    one more thought - I've just remembered where I had a similar problem. I think if you modify your LD_LIBRARY_PATH to also include the /lib/openvg directory you may find that solves the problem. Can you try that also please?

    Thanks, Pete
  • Note: This was originally posted on 4th November 2011 at http://forums.arm.com

    Hi Pete,

    Thanks for your help.

    The following is the imformation from my target.

    # ls -l /lib/gles20/
    -rwxr-xr-x    1 root     root        118335 Jan  1 00:03 libEGL.so
    -rwxr-xr-x    1 root     root        118335 Jan  1 00:03 libEGL.so.1
    -rwxr-xr-x    1 root     root        118335 Jan  1 00:03 libEGL.so.1.4
    -rwxr-xr-x    1 root     root        217786 Jan  1 00:03 libGLESv2.so
    -rwxr-xr-x    1 root     root        217786 Jan  1 00:03 libGLESv2.so.2
    -rwxr-xr-x    1 root     root        217786 Jan  1 00:03 libGLESv2.so.2.0
    -rwxr-xr-x    1 root     root        705771 Jan  1 00:03 libMali.so
    -rwxr-xr-x    1 root     root       1663196 Jan  1 00:03 libstdc++.so.6


    # ls -l /dev/fb0 /dev/mali /dev/ump
    crw-rw-rw-    1 root     root       29,   0 Oct  4  2011 /dev/fb
    crw-rw----    1 root     root      250,   0 Jan  1 00:11 /dev/mali
    crw-rw----    1 root     root      251,   0 Jan  1 00:01 /dev/ump


    # strings /lib/gles20/libMali.so | grep r2p
    base: BUILD=RELEASE ARCH=arch_011_udd PLATFORM=default_5te TRACE=0 THREAD= GEOM= CORES=MALI200 USING_MALI200=1 TARGET_CORE_REVISION=0x0005 TOPLEVEL_REPO_URL=Linux-r2p0-00dev0 REVISION=Linux-r2p0-00dev0 CHANGED_REVISION=Linux-r2p0-00dev0 REPO_URL=Linux-r2p0-00dev0 BUILD_DATE=Tue Jan  5 15:53:44 KST 2010 CHANGE_DATE=Linux-r2p0-00dev0 TARGET_TOOLCHAIN=arm-linux-gcc HOST_TOOLCHAIN=gcc OPTS_TOOLCHAIN=arm-linux-gcc TARGET_TOOLCHAIN_VERSION=gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)  HOST_TOOLCHAIN_VERSION=gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)  OPTS_TOOLCHAIN_VERSION=gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)  TARGET_SYSTEM=gcc-arm-linux HOST_SYSTEM=gcc-i386-redhat-linux CPPFLAGS= CUSTOMER=internal VARIANT=mali200-r0p5-gles11-gles20-vg-linux HOSTLIB=indirect INSTRUMENTED=FALSE USING_MRI=FALSE MALI_TEST_API= UDD_OS=linux


    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib/gles11:/lib/gles20;/lib/openvg

    Maybe is the version is wrong.
    In your imformation it should match r2p2, but my version is r2p0.
    I think I will try to build mali.ko (r2p0).

    James
  • Note: This was originally posted on 4th November 2011 at http://forums.arm.com

    Hi Pete,

    I download mali driver source which version is r2p0 and build it again.

    ha...the Failed message is changed.

    eglGetError(): 12291 (0x3003)
    Error: Failed to initialize EGL at src/egl_runtime.c:74


    James
  • hello,James

    I meet the same question with you .

    could tell me how you get such lib:

    /lib/gles20/
    libEGL.so         libEGL.so.1.4     libGLESv2.so.2    libMali.so
    libEGL.so.1       libGLESv2.so      libGLESv2.so.2.0  libstdc++.so.6

    when I tranparent the lib , I just use the compiled lib at SDK_PATH/build_arm/lib/arm,but there only are three lib files:

    libEGL.so                    libGLESv1_CM.so                libGLESv2.so

    Could tell me the way where I can get them ?

              Thanks.

              Larry

  • Hi Larry,

    As with most Linux based systems, they would be symlinks to each other.

    E.g. libEGL.so -> libEGL.so.1 -> libEGL.so.1.4

    Please note that the binaries found in the SDK are for linking only. You will need to run it using the binaries on your target hardware, not these.

    Finally, this original thread was from 2013, this discussion was based around Utgard, and that had a monolithic library where EGL, GLESv1 and GLESv2 were symlinks to libMali.so.

    Depending on your target hardware, this may not be the case.

    Kind Regards,

    Michael McGeagh

  • Hi ,Michael

    Thanks for you help .And I know the reason.

    My target board have a CPU exynos 4412 which contain a GPU Mali 400 , and I just find the kernel driver on the Mali Developer Center. But  I couldn't find the user space drivers for OpenGL ES .

    So do you know how to find source code of OpenGL ES  for the Mali 400 .I had find all the Mali Developer Center but couldn't find it .

    Thanks

    Larry

  • Hi Larry,

    The Mali Driver comes in 2 parts, kernel side and userspace side.

    The kernel side is under GPL and freely available to download from our website, as you have already found.

    However the userspace side is proprietary. We do not give the sources publicly to this.

    It is expected that you get your Mali driver from the SoC vendor. In this instance it would be Samsung.

    However please note that a lot of development board companies also provide BSPs with working Mali driver binaries integrated.

    For example, if you were using the HardKernel ODROID X (which has the Exynos 4412), you would obtain the userspace Mali driver from HardKernel.

    I hope that helps clarify things for you.

    Kind Regards

    Michael McGeagh