Wednesday, March 31, 2010

ELDK on mini2440

The Embedded Linux Development Kit (ELDK) includes the GNU cross development tools, such as the compilers, binutils, gdb, etc.support different Target architecture including arm.

Download link
http://www.denx.de/wiki/DULG/ELDKAvailability


Creating enviroment on host PC.
linuxhost > mkdir eldk
linuxhost > mkdir install_mount
linuxhost > cd eldk/
linuxhost/eldk > su
linuxhost/eldk # mount -o loop,exec ../arm-2007-01-21.iso ../install_mount/
linuxhost/eldk # exit


linuxhost/eldk > ls ../install_mount/
. arm ELDK_FIXOWNER etc install RPMS tools
.. common ELDK_MAKEDEV icons README.html sys version


linuxhost/eldk > ../install_mount/install arm
linuxhost/eldk > chmod u+x eldk_init

now unmount the ISO image as root

linuxhost/eldk > ./eldk_init arm
export these variable to environment,or include them as part of .bashrc file.
ARCH=arm
CROSS_COMPILE=arm-linux-
DEPMOD=/opt/eldk/usr/bin/depmod.pl
PATH=/opt/eldk/usr/bin:/opt/eldk/bin


Using ELDK for mini2440

compiling the Kernel...
Error found while compiling the kernel
kernel/bounds.c:1: error: invalid ABI option: -mabi=aapcs-linux
Fix is to un select Kernel Features ---> [ ] Use the ARM EABI to compile the kernel
Now do make in kernel source,the kernel is successfully build on ELDK.

Building the Root file system
untar the root_qtopia.tar.gz which is available on CD.
cd root_qtopia
rm bin sbin lib usr -rf
cp /opt/ELDK/arm/lib . rf

BusyBox combines tiny versions of many common UNIX utilities into a single small executable,I have used busybox-1.16.0 for my filesystem.
compilation is very straightforward. make menuconfig,
In BusyBox Settings -->Build Options , use 'arm-linux-' as cross compiler prefix.
In Installation Options-> , update the BusyBox Installation prefix
busybos build will create 'bin','sbin','usr' folders in its installation folder.
copy these folders to root_qtopia/
cp /{bin,sbin,usr} root_qtopia/ -rf

now yaffs2 image for root_qtopia and upload it to mini2440 board.

mkyaffs2image root_qtopia rootfs.img

Thursday, March 25, 2010

QT Media Player on mini2440

To run the media player example in QT we require cross-compile Gstreamer as back-end
cross compiling gstreamer was made comparatively easy for me,thanks to Mr. Felipe Contreras blog.

This is the link to his blog.

For my board mini2440 I cross compiled the following source and installed in "/opt/gst" in my root filesystem.
  • glib
  • gstreamer
  • liboil
  • gst-plugin-base
  • gst-plugin-good
  • gst-plugin-ugly

Now you cross compile QT4.6 with phonon enabled,and linking the gstreamer library.

export PKG_CONFIG_PATH=/opt/gst/lib/pkgconfig

./configure -prefix /opt/qt-4.6/build -debug -shared -fast -pch -no-qt3support -qt-sql-sqlite -no-libtiff -no-libmng -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -no-openssl -nomake examples -nomake demos -nomake tools -optimized-qmake -no-nis -no-opengl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-xkb -no-feature-CURSOR -no-sm -no-xinerama -no-xshape -webkit -no-separate-debug-info -xplatform qws/linux-arm-g++ -embedded arm -depths 16 -no-qvfb -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb -no-mouse-qvfb -qt-kbd-tty -confirm-license -qt-mouse-tslib -phonon -I /opt/gst/lib/glib-2.0/include -I /opt/gst/include/glib-2.0 -I /opt/gst/include/gstreamer-0.10/gst -L /opt/gst/lib -L /opt/gst/lib/gstreamer-0.10 -force-pkg-config -v


After doing 'make install' the libraries are installed on '/opt/qt-4.6/build'

create '/opt/qt-4.6/build' in mini2440 filesystem copy QT related libraries.
create '/opt/gst/lib' in mini2440 copy the contents of the '/opt/gst/lib' on PC to mini2440 filesystem's '/opt/gst/lib'

once this is done cross compile the QT MediaPlayer example in QT Source tree, and copy it on the board and run it.


please don't forget to update the 'LD_LIBRARY_PATH' in the environment variable.


export LD_LIBRARY_PATH=$QTDIR/lib:/opt/gst/lib

Please see my previous blog on crosscompiling QT for mini2440 board for details.