I am working on a project which need porting Android-7.0 on embedded platforms. I know the key to porting: implement specific HW drivers and corresponding HALs. When deal with the mali-400 GPU, I should transplant the GPU driver, OpenGL ES libs and UMP(Unified memory provider), but I only want to use software rendering which do not need a real GPU for simplicity.
I set some propertise in init.rc which forcing Android to load the libGLES_android.so:
setprop ro.kernel.qemu 1
setprop ro.kernel.qemu.gles 0
It works! but the system failed in choosing a suitable EGLconfig, and restart surfaceflinger. Logs are as follow:
I/SurfaceFlinger( 1056): SurfaceFlinger is starting
I/SurfaceFlinger( 1056): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL ( 1056): Emulator without GPU support detected. Fallback to software renderer.
D/libEGL ( 1056): loaded /system/lib64/egl/libGLES_android.so
W/gralloc ( 1056): page flipping not supported (yres_virtual=1080, requested=2160)
I/gralloc ( 1056): using (fd=11)
I/gralloc ( 1056): id = simple
I/gralloc ( 1056): xres = 1920 px
I/gralloc ( 1056): yres = 1080 px
I/gralloc ( 1056): xres_virtual = 1920 px
I/gralloc ( 1056): yres_virtual = 1080 px
I/gralloc ( 1056): bpp = 32
I/gralloc ( 1056): r = 16:8
I/gralloc ( 1056): g = 8:8
I/gralloc ( 1056): b = 0:8
I/gralloc ( 1056): width = 305 mm (159.568100 dpi)
I/gralloc ( 1056): height = 171 mm (159.895081 dpi)
I/gralloc ( 1056): refresh rate = 60.00 Hz
W/hwcomposer( 1056): hwcomposer module not found
W/SurfaceFlinger( 1056): no suitable EGLConfig found, trying a simpler query
E/SurfaceFlinger( 1056): no suitable EGLConfig found,giving up
Hwcomposer module seems not must. My questions are:
- The method to use software rendering is right?
- Why can't a suitable EGLConfig be found? It seems that I cannot control the procedure of choosing one.
- What can I do, to turn on hardware rendering based on a real GPU?