GBM is an minimalist API which provides a mechanism for allocating buffers for graphics rendering tied to Mesa. GBM is intended to be used as a native platform for EGL on drm. The handle it creates can be used to initialize EGL and to create render target buffers.
EGL/GBM does not support Pbuffers and Pixmaps.
Off-screen surface should be created by invocation of eglCreateWindowSurface and it would be always off-screen since GBM does not provide window management.
If you want to move it to the display you would need to use kernel KMS API.
There is a simple example of application using DRM, GBM and EGL for initialization and cleanup of graphics state.
assert( eglBindAPI( EGL_OPENGL_API ) == EGL_TRUE );
int fd = open("/dev/dri/card0", O_RDWR);
struct gbm_device * gbm = gbm_create_device( fd );
struct gbm_surface * gbm_surf = gbm_surface_create( gbm, 256, 256, GBM_FORMAT_XRGB8888, GBM_BO_USE_RENDERING);
EGLDisplay dpy = eglGetPlatformDisplayEXT( EGL_PLATFORM_GBM_MESA, gbm, NULL );
eglInitialize( dpy , NULL , NULL );
assert( eglGetConfigs( dpy , &config , 1 , &n_of_configs ) == EGL_TRUE );
EGLSurface srf = eglCreatePlatformWindowSurfaceEXT( dpy, config, gbm_surf, NULL );
assert( srf != EGL_NO_SURFACE );
EGLContext ctx = eglCreateContext( dpy , config , EGL_NO_CONTEXT , NULL );
assert( ctx != EGL_NO_CONTEXT );
assert( eglMakeCurrent( dpy , srf , srf , ctx ) == EGL_TRUE );
eglDestroySurface( dpy , srf );
eglDestroyContext( dpy , ctx );
eglTerminate( dpy );
gbm_device_destroy( gbm );
close( fd );
This post is intended to sum up basic steps to produce own bootable image for Android 5.1 on x86_64 system.
$ mkdir android-x86
$ cd android-x86
$ repo init -u git://gitscm.sf.net/gitroot/android-x86/manifest -b lollipop-x86
$ repo sync -c
In the end of synchronization you would have Android tree with all necessary packages needed to build Android 5.1.
To prepare build environment you would need to do:
Now if you want to construct bootable iso image you would need to run:
make -j4 iso_img TARGET_PRODUCT=android_x86_64
-j4 could be replaced with relevant number of CPUs on your system.
By this post we are starting new company blog regarding Android OS specific tricks.
The first theme is related to network configuration.
Android 4+ static network configuration
First of all set the IP for device and GW:
ifconfig DEV [IP] netmask [NETMASK]
route add default gw [GATEWAY] dev DEV
Next DNS settings:
setprop net.eth0.dns1 18.104.22.168
setprop net.eth0.dns2 22.214.171.124
Android 5+ specifics
To be able to reach any external network resource you would need:
ip rule add from all lookup main
This the first introduction public materials regarding SeVirt.
In the middle of February we have completed the first step of our Product development stage 1.
As a result we are able to run SeVirt on one of popular Smartphone by ASUS.
Please find related video at our YouTube channel.
The project step by step growing.
Virtual HW is considered as the main reasonable goal of the second product development stage.
In the end of this stage we want to provide native user experience avoiding all known disadvantages of secure virtualization usage.
One of our goals is to make project introduction at Embedded Linux Conference, we are planning to give a nice demo and share our filling of SeVirt future.
POC stage of the project is done. We have working platform with a simple vendor HW migration strategy. During implementation we got many problems as from HW as from SW and now we've big baggage of knowledge as Lessons learnt.
Nevertheless I'd consider that POC stage was a real success of our small team.
Now I'd like to announce first product development stage. We have defined one of high-end smartphones as a main goal of this stage. More details about HW platform, software stack improve and other we are going to publish every 2 weeks.
If you have any questions about platform or would like to get access to our demo materials please do not hesitate to contact to me. Also you could find our project development plan at What is SeVirt? page.
Today I'd like to announce that we have finally completed implementation of POC. It works and gives expected results.
We are in time and executing in accordance with roadmap.
The official introduction and platform operation screenshots coming soon...