Différences entre les versions de « DirectFBForRaspbian »
Aller à la navigation
Aller à la recherche
Ligne 55 : | Ligne 55 : | ||
mkdir pkgconfig | mkdir pkgconfig | ||
cd pkgconfig | cd pkgconfig | ||
cat > bcm_host.pc | cat > bcm_host.pc << TILL_END | ||
prefix=/opt/vc | prefix=/opt/vc | ||
exec_prefix=${prefix} | exec_prefix=${prefix} | ||
libdir=${exec_prefix}/lib | libdir=${exec_prefix}/lib | ||
includedir=${prefix}/include | includedir=${prefix}/include | ||
TILL_END | |||
Name: bcm_host | Name: bcm_host | ||
Ligne 66 : | Ligne 67 : | ||
Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm | Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm | ||
Cflags: -I${includedir} -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM | Cflags: -I${includedir} -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM | ||
cat > egl.pc | cat > egl.pc << TILL_END | ||
prefix=/opt/vc | prefix=/opt/vc | ||
exec_prefix=${prefix} | exec_prefix=${prefix} | ||
Ligne 79 : | Ligne 80 : | ||
Libs: -L${libdir} -lEGL | Libs: -L${libdir} -lEGL | ||
Cflags: -I${includedir} | Cflags: -I${includedir} | ||
TILL_END | |||
cat > glesv2.pc | cat > glesv2.pc | ||
Ligne 92 : | Ligne 94 : | ||
Libs: -L${libdir} -lGLESv2 | Libs: -L${libdir} -lGLESv2 | ||
Cflags: -I${includedir} | Cflags: -I${includedir} | ||
TILL_END | |||
cat > gl.pc | |||
cat > gl.pc << TILL_END | |||
prefix=/opt/vc | prefix=/opt/vc | ||
exec_prefix=${prefix} | exec_prefix=${prefix} | ||
Ligne 105 : | Ligne 108 : | ||
Libs: -L${libdir} -lGLESv2 | Libs: -L${libdir} -lGLESv2 | ||
Cflags: -I${includedir} | Cflags: -I${includedir} | ||
TILL_END | |||
sudo cp *.pc /usr/lib/pkgconfig | sudo cp *.pc /usr/lib/pkgconfig |
Version du 7 février 2013 à 11:42
Kernel RPI 3.2.27+
Ajouter le depot suivant (/etc/apt/sources.list.d/directfb.list) :
deb http://www.directfb.org/raspbian/ /
Désinstaller la version 1.2.9 non optimisée de libdirectFB
sudo apt-get remove libdirectfb-1.2.9 ATTENTION: ceci va desinstaller libSDL par dépendance (mais tant mieux), il faudra donc recompiler SDL 1.2.15+ avec libdirectFB
Installer la version beta de libdirectFB 1.7 pour RPI (pas sûr qu'il faille tout)
sudo apt-get update sudo apt-get install libdirectfb-1.7-bin libdirectfb-1.7-system-egl libdirectfb-1.7-gfxdriver-gles2 libdirectfb-1.7-wm-default libdirectfb-1.7-wm-sawman libdirectfb-1.7-dev libdirectfb-1.7
Ajouter ces fichiers (pas sûr que ca serve)
wget http://directfb.org/raspbian/directfbrc wget http://directfb.org/raspbian/fusiondalerc wget http://directfb.org/raspbian/linux-one.ko wget http://directfb.org/raspbian/fusion.ko sudo cp directfbrc fusiondalerc /etc/
TODO : jouer avec la config directfbrc : http://directfb.org/wiki/index.php/Configuring_DirectFB. Par défaut voici les settings :
mode = 800x600 pixelformat = ARGB layer-buffer-mode = backvideo always-indirect linux-input-force linux-input-touch-abs system = egl wm-fullscreen-updates
Enregister les modules dans le noyau (nécessaire ?)
sudo insmod fusion.ko sudo insmod linux-one.ko
Ajouter les permissions
sudo chmod 666 /dev/fusion* /dev/one* /dev/input/* /dev/snd/* /dev/vchiq /dev/tty*
src : http://directfb.org/raspbian/README
Kernel 3.6.11+ / DirectFB 1.7.0
Recompiler le noyau
voir ici avant la branche 3.6.11+ : https://www.logre.eu/wiki/RPiLinuxKernelBuild
Recompiler les modules kernel directFB
voir ici la compilation de modules noyau tiers : https://www.logre.eu/wiki/RPiLinuxKernelBuild
Recompiler directFB
- Créer les fichiers pc
mkdir pkgconfig cd pkgconfig cat > bcm_host.pc << TILL_END prefix=/opt/vc exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include TILL_END Name: bcm_host Description: Broadcom VideoCore host API library Version: 1 Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm Cflags: -I${includedir} -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM
cat > egl.pc << TILL_END prefix=/opt/vc exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: EGL Description: Fake EGL package for RPi Version: 10 Requires: bcm_host Libs: -L${libdir} -lEGL Cflags: -I${includedir} TILL_END
cat > glesv2.pc prefix=/opt/vc exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: GLESv2 Description: Fake GL ES 2 package for RPi Version: 10 Requires: bcm_host Libs: -L${libdir} -lGLESv2 Cflags: -I${includedir} TILL_END
cat > gl.pc << TILL_END prefix=/opt/vc exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: GLESv2 Description: Fake GL ES 2 package for RPi Version: 10 Requires: bcm_host Libs: -L${libdir} -lGLESv2 Cflags: -I${includedir} TILL_END
sudo cp *.pc /usr/lib/pkgconfig
- Récupérer les sources
mkdir directfb cd directfb git clone git://git.directfb.org/git/directfb/core/flux.git git clone git://git.directfb.org/git/directfb/core/DirectFB.git
- Builder Flux (outil de build directFB)
cd flux ./autogen.sh ./configure make sudo make install
- Configurer directFB
cd DirectFB ./autogen.sh ./configure --prefix=/opt/directfb CFLAGS='-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads' LDFLAGS='-L/opt/vc/lib' LIBS='-lEGL -lGLESv2' --disable-x11 --enable-egl --with-gfxdrivers='gles2' --disable-debug --disable-fbdev --disable-devmem --with-inputdrivers='keyboard,linuxinput' --enable-multi --enable-one
- Patcher le code
diff --git a/src/core/CoreDFB_includes.h b/src/core/CoreDFB_includes.h index 50d6b0c..1fc2afe 100644 --- a/src/core/CoreDFB_includes.h +++ b/src/core/CoreDFB_includes.h @@ -469,13 +469,13 @@ CoreSurface_Lookup( CoreDFB *core, if (ret) return (DirectResult) ret; - if (caller != FUSION_ID_MASTER && - surface->object.identity && surface->object.identity != caller && - surface->object.owner && surface->object.owner != caller) - { - dfb_surface_unref( surface ); - return DR_ACCESSDENIED; - } +// if (caller != FUSION_ID_MASTER && +// surface->object.identity && surface->object.identity != caller && +// surface->object.owner && surface->object.owner != caller) +// { +// dfb_surface_unref( surface ); +// return DR_ACCESSDENIED; +// } *ret_surface = surface;
diff --git a/lib/direct/os/linux/glibc/thread.c b/lib/direct/os/linux/glibc/thread.c index 5dbdc3b..71b2d1c 100644 --- a/lib/direct/os/linux/glibc/thread.c +++ b/lib/direct/os/linux/glibc/thread.c @@ -64,6 +64,7 @@ init_once( void ) { /* Create the key for the TSD (thread specific data). */ pthread_key_create( &thread_key, NULL ); + pthread_key_create( &thread_key, NULL ); } /**********************************************************************************************************************/ diff --git a/src/core/core.c b/src/core/core.c index c5836a2..02f441d 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -1809,7 +1809,11 @@ core_tls_destroy( void *arg ) void Core_TLS__init( void ) { + direct_tls_register( &core_tls_key, NULL ); + direct_tls_register( &core_tls_key, NULL ); direct_tls_register( &core_tls_key, core_tls_destroy ); + direct_tls_register( &core_tls_key, NULL ); + direct_tls_register( &core_tls_key, NULL ); } void
- Patcher un makefile
vim systems/egl/Makefile // Dans les CFLAGS enlever les 2 -Werror-implicit-function-declaration
- Builder directFB
make sudo make install
- copier les fichiers pc dans /usr/lib/pkgconfig/
- Note : tout est installé dans /opt/directfb