Qt Embedded on i.MX53
Zur Navigation springen
Zur Suche springen
This page contains instructions how to set up
- Qt Embedded (running natively on the Linux frame buffer, but without OpenGL support)
- Qt/X11 (running on X11 server, with OpenGL support)
for Bluetechnix i.MX53 modules.
Software versions
- Bluetechnix Linux BSP release 1.4
- based on Freescale Linux Board Support Package
- Qt Embedded 4.6.0
- LTIB will handle the download
See the Software User Manual how to install LTIB (i.e., Freescale and Bluetechnix Linux packages), if you have not done so yet.
Instructions
Host packages
- We need to install some additional host packages.
sudo apt-get -y install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev sudo apt-get -y install libdbus-glib-1-dev liborbit2-dev intltool sudo apt-get -y install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool sudo apt-get -y install uuid-dev liblzo2-dev sudo apt-get -y install tcl dpkg sudo apt-get -y install libx11-dev libpng-dev libjpeg-dev libxext-dev x11proto-xext-dev qt3-dev-tools-embedded libxtst-dev sudo apt-get -y install bison flex libqt4-dev libqt4-opengl-dev libphonon-dev libicu-dev libsqlite3-dev libxext-dev libxrender-dev gperf libfontconfig1-dev libphonon-dev g++
Multimedia Codec Libraries
- Download the i.MX53 hardware codecs package from the Freescale website (open the Codecs and other Algorithms menu).
IMX_MMCODECS_11.05.tar.gz
- Unpack it and copy the following files to /opt/freescale/pkgs/:
IMX_MMCODECS_11.05/Ltib Files/fsl-mm-codeclib-2.0.1.tar.gz IMX_MMCODECS_11.05/Ltib Files/gst-fsl-plugin-2.0.1.tar.gz
- Extract the file
IMX_MMCODECS_11.05/Ltib Files/ltib_spec_patch_base_on_11.05.01.zip
- Copy the resulting files to (Important: If you are using BSP release 1.6 or newer, don't copy the gst-fsl-plugin.spec file.)
ltib/dist/lfs-5.1/fsl-mm
LTIB configuration (Qt Embedded)
- In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
- Go to
Package list --->
- Select the following packages:
[*] amd-gpu-bin-mx51 [*] libz160-bin Freescale Multimedia Plugins/Codecs ---> [*] fsl-mm-codec-libs [*] gstreamer-fsl-plugins [*] fontconfig [*] freetype [*] gstreamer [*] gstreamer-plugins-base [*] gstreamer-plugins-good [*] gstreamer-plugins-bad [*] gstreamer-plugins-ugly [*] Liberation fonts [*] libjpeg [*] libpng [*] liboil [*] libxml2 [*] mysql Qt ---> Qt (...) ---> (X) Qt Embedded [*] Phonon [*] zlib
- Exit from LTIB and save your new configuration (you will be asked).
- LTIB will build Qt Embedded now.
LTIB configuration (Qt X11)
NOTE: We have marked differences to Qt Embedded configuration in green.
- In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
- Go to
Package list --->
- Select the following packages:
[*] amd-gpu-x11-bin-mx51 [*] libz160-bin Freescale Multimedia Plugins/Codecs ---> [*] fsl-mm-codec-libs [*] gstreamer-fsl-plugins [*] fontconfig [*] freetype [*] gstreamer [*] gstreamer-plugins-base [*] gstreamer-plugins-good [*] gstreamer-plugins-bad [*] gstreamer-plugins-ugly [*] Liberation fonts [*] libjpeg [*] libpng [*] liboil [*] libxml2 [*] mysql X11 ---> Install X11 ---> (X) X.Org 7.5 X11 libraries and packages ---> [*] libICE [*] libSM [*] zlib
- Exit from LTIB and save your new configuration (you will be asked).
- LTIB will build Qt for X11 now.
Error handling
The following errors were observed, here is how to handle them:
- LTIB cannot download the qt package.
- Download the file from here: https://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.0.tar.gz
- and save it to /opt/freescale/pkgs/
- ubinize complains that there is not enough space in the UBIFS partition.
- If you do not plan to set up the NAND flash with Qt Embedded, you can ignore this error. But if you plan, edit the file
bin/ubifs_ubinize_tmpl.ini
- Change the parameter
vol_size
- You also have to change the NAND flash's rootfs partition's size in the Linux kernel code. Open the platform file for the module you have:
rpm/BUILD/linux/arch/arm/mach-mx5/mx53_qseven.c rpm/BUILD/linux/arch/arm/mach-mx5/cmimx53.c
- and increase the size of the nand.rootfs partition (given in bytes):
static struct mtd_partition nand_flash_partitions[] = {
[...]
.name = "nand.rootfs",
.offset = MTDPART_OFS_APPEND,
.size = 256 * 1024 * 1024},
[...]
};
Start Qt Embedded
- Bring Qt Embedded to the target module
- by rebooting (if you mount the root file system via NFS from your host machine) or
- by setting up a new SD card (using the setup_sdcard.sh script).
- After booting Linux on the MX53 module, set Qt's font path:
export QT_QWS_FONTDIR=/usr/lib/fonts/
- Pathstroke demo application
cd /usr/local/Trolltech/demos/pathstroke/ ./pathstroke -qws
- Fluid Launcher demo
cd /usr/local/Trolltech/demos/embedded/fluidlauncher ./fluidlauncher -qws
- LTIB installs a whole host of demos and examples which you may browse through:
/usr/local/Trolltech
Start Qt/X11
- Bring Qt/X11 to the target module
- by rebooting (if you mount the root file system via NFS from your host machine) or
- by setting up a new SD card (using the setup_sdcard.sh script).
- After booting Linux on the MX53 module, start the X-server (assuming you have a keyboard connected as /dev/input/event2):
export DISPLAY=:0.0 Xfbdev -mouse mouse,,device=/dev/input/mice -keybd keyboard,,/dev/input/event2 &
- Pathstroke demo application
cd /usr/local/Trolltech/demos/pathstroke/ ./pathstroke -qws
- LTIB installs a whole host of demos and examples which you may browse through:
/usr/local/Trolltech
OpenGL comparison
The pathstroke demo application features the Use OpenGL button which lets us easily switch on/off using OpenGL from the MX53 internal GPU.
Here is a short comparison we did with a CM-i.MX53-C-C-Q24S1024F4N2048 running in a DEV-i.MX53 development board, using default HDMI output of 1280x720 pixels, frame buffer color format RGB565.
fbset output:
mode "1280x720-60" # D: 74.505 MHz, H: 44.774 kHz, V: 59.859 Hz geometry 1280 720 1280 2160 16 timings 13422 192 64 3 20 128 5 accel false rgba 5/11,6/5,5/0,0/0 endmode
Data:
OpenGL | DEV-i.MX53 power consumption @12V | Total CPU usage | Xfbdev (X-server) CPU usage | Pathstroke CPU usage | FPS |
---|---|---|---|---|---|
disabled | 0.43A | 100% | 92% | 8% | 10-15 |
enabled | 0.42A | 58% | 17% | 41% | 25 |