Jump to: navigation, search

Clutter on Wayland

Do not read this. This is random notes.

These are the instructions I used for compiling clutter on BeagleBone Black using an Angstrom V2013.06 Image.


glib git clone git://git.gnome.org/glib ./autogen.sh --prefix=/usr make make install

Gnome Common: wget http://ftp.gnome.org/pub/GNOME/sources/gnome-common/3.10/gnome-common-3.10.0.tar.xz tar -vxf gnome-common-3.10.0.tar.xz ./autogen.sh --prefix=/usr make make install

Pygobject - git
Introspection - https://github.com/Guacamayo/meta-gir
Clutter -
Cogl
Weston 1.3.1
Wayland 1.3.0
KMS DRM

pycairo >= 1.2


Mesa software implementation of EGL and GLES2: Compile options:

 --disable-gallium-egl
 --with-gallium-drivers=swrast
 --with-dri-drivers=nouveau
 --enable-gbm
 --enable-gallium-gbm
 --enable-shared-glapi
 --disable-dri3

Pacages to install:

 opkg install libglapi0 libgl-mesa libgbm1 libgles1-mesa libgles2-mesa libwayland-egl1 mesa-driver-swrast

The egl_dri2.so will be built in to the libEGL.so library and must be specfied as an environment variable:

 export EGL_DRIVER=egl_dri2
 export GBM_BACKEND=gbm_dri


Links: https://github.com/clutter-project
https://docs.google.com/viewer?url=http%3A%2F%2Fjkridner.s3.amazonaws.com%2Fesc%2FESC-341_Dompe.pdf
http://people.freedesktop.org/~ajax/dri-explanation.txt
http://virtuousgeek.org/blog/index.php/jbarnes/2011/10/31/writing_stanalone_programs_with_egl_and_


During statup of Mesa, this is what happens:

 eglinfo.c:main() <- app
 -> eglapi.c:eglInitialize()
   -> eglapi.c:eglInitialize() 
     -> egldriver.c_eglMatchDriver()
       -> egldriver.c_eglMatchAndInitialize
         -> egldriver.c:_eglAddDrivers()
           -> egldriver.c:_eglAddUserDriver() 
           Gets name of driver form env EGL_DRIVER and calls
           -> egldriver.c:_eglAddModule()
           This add the module to the array. 
     -> egldriver.c_eglMatchDriver()
       ->egldriver.c: drv->API.Initialize()
       ->egl_dri2.c: dri2_initialize()
         Depending on platform this will call dri2_initialize_{x11|wayland|drm|android}
         ->platform_drm: dri2_initialize_drm()
           -> gbm.c: gbm_create_device()
             -> backend.c: _gbm_create_device()
                ->backend.c  load_backend();
                ->backend.c: create_device() (This is defined in the struct at the bottom of gbm_dri.c)
                ->gbm_dri.c: dri_device_create()
                  ->gbm_dri: dri_screen_create()
                    ->gbm_dri.c: dri_load_driver()
                      
                      Looks for tilcdc_dri.so
                      This file does not exist. 
                      Apparently the name comes 
                      from the DRM driver in the kernel. 
                      https://groups.google.com/forum/#!msg/pandaboard/jrF6FTEzL1k/TUH2SheUE5cJ
             
         



gbm_dri.c:

The kernel modules were compiled against a beagleboard 3.12 kernel. Compiler was ?

Compile the SGX kernel modules.

- Enable SGX in device tree overlay: am33xx.dtsi
- Remember to update the device tree blob. 
- Patch the core/reset.c in the Beagle
- Rewrite the pvrsrvkm.ko to have no preprocessor directives. 
- Make it compatible with DT instead of loading twice (?)

.. Gettting bus error after a message on memory stats.


Debugging tips:

 /etc/init.d/rc2.pvr start
 cat /sys/kernel/debug/clk/clk_summary
 /usr/src/eglinfo/eglinfo
ls -al /sys/devices/ocp.3/56000000.sgx/
 /opt/gfxlibraries/gfx_dbg_es8.x/services_test
 /opt/gfxlibraries/gfx_dbg_es8.x/xeglinfo