This guide tries to explain how to cross-compile the OSS Flash player Swfdec for DirectFB.
This procedure is somehow experimental since it uses Swfdec and Swfdec-directfb from their git repositories. These are not stable releases, they were git-cloned the 22/01/08.
It assumes you already have the following packages installed:
- DirectFB-1.0.1
- glib-2.14.4
- atk-1.20.0
- freetype-2.3.5
- fontconfig-2.5.0
- zlib-1.2.3
- pixman from git repository 02/01/08
- cairo from git repository 02/01/08
- pango-1.19.2
- libmad-0.15.1b
- liboil-0.3.12
- libsoup-2.1.13
For a guide on how to compile stables releases of the above packages you can check the GTK+ on DirectFB and Swfdec on DirectFB.
Notice that if your root NFS filesystem is /opt/STM/STLinux-2.2/devkit/sh4/target and you installed all the above packages including Swfdec in /opt/STM/STLinux-2.2/devkit/sh4/target/usr/local, you have to decompress and compile swfdec-directfb inside /opt/STM/STLinux-2.2/devkit/sh4/target/usr/local.
Let’s start with Swfdec
Set the following environment variables:
$ export PREFIX=/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local
$ export LD_LIBRARY_PATH=$PREFIX/lib
$ export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig
$ export COMPILER=sh4-linux-gcc
$ export STRIP=sh4-linux-strip
$ export HOST=sh4-linux
$ export BUILD=i386-linux
Configure:
$ PANGO_CFLAGS="-I$PREFIX/include/pango-1.0
-I$PREFIX/include/glib-2.0
-I$PREFIX/lib/glib-2.0/include"
PANGO_LIBS="-L$PREFIX/lib
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0"
HTTP_CFLAGS="-I$PREFIX/include/libsoup-2.2
-I$PREFIX/include/libxml2
-I$PREFIX/include/glib-2.0
-I$PREFIX/lib/glib-2.0/include"
HTTP_LIBS="-L$PREFIX/lib
-lsoup-2.2 -lxml2 -lglib-2.0"
CC=$COMPILER
./autogen.sh
--build=$BUILD
--host=$HOST
--prefix=$PREFIX
--disable-gstreamer
--disable-ffmpeg
--enable-mad
--with-audio=none
--disable-vivified
--disable-gtk
Edit all Makefiles:
Remove the flag -Werror from the variable GLOBAL_CFLAGS
Edit the Makefile:
Remove the directory test from the variable SUBDIRS
Edit tools/Makefile:
Set the LIBS variable to the following value:
LIBS = -lfontconfig -lpangoft2-1.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -ldirectfb -ldirect -lfusion
Compile and install:
$ make
$ make install
Now, we configure and compile swfdec-directfb:
Configure:
$ SWFDEC_CFLAGS="-D_REENTRANT
-I$PREFIX/include/swfdec-0.5
-I$PREFIX/include/glib-2.0
-I$PREFIX/lib/glib-2.0/include
-I$PREFIX/include/liboil-0.3
-I$PREFIX/include/cairo
-I$PREFIX/include/pango-1.0
-I$PREFIX/include/freetype2
-I$PREFIX/include
-I$PREFIX/include/directfb
-I$PREFIX/include/libpng12
-I$PREFIX/include/pixman-1"
SWFDEC_LIBS="-L$PREFIX/lib
-lswfdec-0.5 -loil-0.3 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0"
CC=$COMPILER
./configure
--build=$BUILD
--host=$HOST
--prefix=$PREFIX
Edit player/Makefile, swfdec-directfb/Makefile and test/Makefile:
Add to the LIBS variable the following value:
LIBS = -lfontconfig
Compile and install:
$ make
$ make install
For executing swfdec-directfb, connect to your board:
$ cd /usr/local/swfdec-directfb/player
$ ./swfdec-directfb-player sample.swf
That’s it.
Hi,
I tried to start X11 on ST 7109 reference board. After loading Frame Buffer drivers for ST7109, I try to start Xserver with “Xfbdev” command I get the following errors:
root@cagatay:~# Xfbdev
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/cagatay:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
FBIOPUT_VSCREENINFO: Invalid argument
Fatal server error:
no screens found
Segmentation fault
I wonder where the problem is. How can I run Xfbdev?
Could you please help me about this issue?
Thanks for your time.
Hi,
I’ve never tried X on this platform because several months ago I read (but I don’t remember where) that X had some problems running in this board. But I do remember that this was for STLinux2.2 and STLinux2.3ear.
However, this error seems to be a configuration issue in the xorg.conf file.
I don’t know what you want to run on X, but if you’re interested in GTK+ or Swfdec you don’t need X, you can do everything with DirectFB. Version 0.5.2 of Swfdec has a backend for DirectFB and according to its main developer it should be difficult to port to the recent 0.8.x series.
Hope this helps.
Regards.