Porting Android to Embedded Platforms with Software Rendering

I am working on a project that needs to port Android 7.0 to embedded platforms. I know the key to porting: inject specific HW drivers and corresponding HALs. When working with a mali-400 GPU, I have to transplant the GPU driver, OpenGL ES and UMP (Unified Memory System Provider) libraries, but I just want to use software rendering, which does not require a real GPU for simplicity.

I have set some properties in init.rc that make Android load libGLES_android.so:

setprop ro.kernel.qemu 1

setprop ro.kernel.qemu.gles 0

It works! but the system was unable to select the appropriate EGLconfig and restart the surface filter. The logs look like this:

I/SurfaceFlinger( 1056): SurfaceFlinger is starting
I/SurfaceFlinger( 1056): SurfaceFlinger 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

      

The Hwcomposer module seems to be optional. My questions:

  • Can I use a software rendering method?
  • Why can't I find a suitable EGLConfig file? It seems that I have no control over the selection procedure.
  • What should I do to enable hardware rendering based on real GPU?
+3


source to share


1 answer


Android no longer supports software-only rendering; real GPU implementation and OpenGL ES is a tough requirement.



0


source







All Articles