Différences entre les versions de « DirectFBForRaspbian »

De Wiki LOGre
Aller à la navigation Aller à la recherche
m
m
Ligne 1 : Ligne 1 :
== Kernel RPI 3.2.27+ ==


Ajouter le depot suivant (/etc/apt/sources.list.d/directfb.list) :
Ajouter le depot suivant (/etc/apt/sources.list.d/directfb.list) :
Ligne 35 : Ligne 37 :
  sudo chmod 666 /dev/fusion* /dev/one* /dev/input/* /dev/snd/* /dev/vchiq /dev/tty*
  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 ===
=== Recompiler les modules kernel directFB ===
=== Recompiler directFB ===
* Créer les fichier pc
mkdir pkgconfig
cd pkgconfig
cat > bcm_host.pc
prefix=/opt/vc
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
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
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}
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}
cat > gl.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}
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)


src : http://directfb.org/raspbian/README
cd flux
./autogen.sh
./configure
make
sudo make install
* Builder 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
make
sudo make install
copier les fichiers pc dans /usr/lib/pkgconfig/

Version du 7 février 2013 à 11:32

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

Recompiler les modules kernel directFB

Recompiler directFB

  • Créer les fichier pc
mkdir pkgconfig
cd pkgconfig
cat > bcm_host.pc
prefix=/opt/vc
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

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
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}
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}

cat > gl.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}
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 

  • Builder 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

make
sudo make install
copier les fichiers pc dans /usr/lib/pkgconfig/