On 11 March 2015 at 08:32, Scott Bambrough <scott.bambrough@linaro.org> wrote:
ANDROID
---------------------------------
HiSilicon has provided the following files to Linaro for Android:

android/32bit: gralloc.hi6210sft.so, libGLES_mali.so, libion.so
android/64bit: gralloc.hi6210sft.so, libGLES_mali.so, libion.so

The library "libion.so" is needed for Android L. HiSilicon has some vendor specific interfaces in "gralloc.hi6210sft.so", and the provided implementation of "libion.so" will use those interfaces.

/media/scottb/linaro/hikey/android/device/linaro/hikey/device.mk
Need to add a appropriate PRODUCT_COPY_FILES macro to this makefile.

#Copy Graphics binaries
PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
$(LOCAL_PATH)/mali/64bit/libGLES_mali.so:system/lib64/egl/libGLES_mali.so\
$(LOCAL_PATH)/mali/64bit/gralloc.hi6210sft.so:system/lib64/gralloc.hi6210sft.so\
$(LOCAL_PATH)/mali/64bit/libion.so:system/lib64/libion.so \
$(LOCAL_PATH)/mali/32bit/libGLES_mali.so:system/lib/egl/libGLES_mali.so \
$(LOCAL_PATH)/mali/32bit/gralloc.hi6210sft.so:system/lib/gralloc.hi6210sft.so \
$(LOCAL_PATH)/mali/32bit/libion.so:system/lib/libion.so)

I suspect a set of symlinks like those described for X below are required in /system/lib64 and /system/lib.  Not entirely sure how to get these setup.

To do:
  1. Obtain MALI kernel GPU driver from Guillaume Tucker.
I see a hikey-mali branch with the Mali driver. Will the same driver work with Android without any changes ? 
  1. Obtain kernel ION driver from HiSilicon
 What is the status with this one ?

LINUX/X11
---------------------------------

HiSilicon has provided the following files to Linaro for Linux/X11:

x11/32bit: none
x11/64bit: libMali.so (untested)

To install the 64bit library (libMali.so)
  1. Create the file /etc/ld.so.conf.d/arm64-linux-gnu_EGL.conf.  This file should contain the single line: /usr/lib/arm64-linux-gnu/mali-egl
  2. Install libMali.so to /usr/lib/arm64-linux-gnu/mali-egl, root:root, 644
  3. Create the following symlinks in /usr/lib/arm64-linux-gnu/mali-egl
    • libEGL.so -> libEGL.so.1.0.0
    • libEGL.so.1 -> libEGL.so.1.4
    • libEGL.so.1.4 -> libMali.so
    • libGLESv1_CM.so -> libGLESv1_CM.so.1
    • libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1.0
    • libGLESv1_CM.so.1.1.0 -> libMali.so
    • libGLESv2.so -> libGLESv2.so.2.0.0
    • libGLESv2.so.2 -> libGLESv2.so.2.0.0
    • libGLESv2.so.2.0.0 -> libMali.so
  4. Install an xf86 driver for X.org that will work with the frame buffer.
We currently cannot support multiarch for ARM 32-bit code, as we will be able to in Android.  For that we need  a 32bit driver for Linux/X11 from HiSilicon.

To install a 32bit library (libMali.so)
  1. Create the file /etc/ld.so.conf.d/arm-linux-gnu_EGL.conf.  This file should contain the single line: /usr/lib/arm-linux-gnu/mali-egl
  2. Install libMali.so to /usr/lib/arm-linux-gnu/mali-egl, root:root, 644
  3. Create the following symlinks in /usr/lib/arm64-linux-gnu/mali-egl
    • libEGL.so -> libEGL.so.1.0.0
    • libEGL.so.1 -> libEGL.so.1.4
    • libEGL.so.1.4 -> libMali.so
    • libGLESv1_CM.so -> libGLESv1_CM.so.1
    • libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1.0
    • libGLESv1_CM.so.1.1.0 -> libMali.so
    • libGLESv2.so -> libGLESv2.so.2.0.0
    • libGLESv2.so.2 -> libGLESv2.so.2.0.0
    • libGLESv2.so.2.0.0 -> libMali.so

To do:

  1. Obtain MALI kernel GPU driver from Guillaume Tucker.
  2. Obtain 32bit libMali.so for Linux/X11 from HiSilicon.
  3. DRM kernel display driver.
    • To implement and test X11 needed ioctl interfaces.
    • To integrate some mali private ioctl interfaces, such as dma_buf fb.
  4. DRM userspace work.  Need a DRM enabled xf86 driver for X.org. 
  5. Fathi to package the Mali libs and create the symlinks required on installation.

If I have missed anything or got anything wrong, please feel free to provide additions/corrections.

Regards,

Scott

--
Scott Bambrough
Technical Director, Member Services
Linaro