Embedded Linux on the Freescale i.mx6 Sabre SD (Yocto, QT 5.3)
Recently I evaluated Yocto for the Freescale i.mx6 processor. I received a tremendous amount of information from the Open Source community and I want to gracefully contribute back the condensed information to the community.
This WiKi article shows how to build a QT 5.3 enabled Yocto Embedded Linux image containing the cinematicexperience demo for the i.mx6 processor. Verified on a clean Ubuntu 14.04 LTS installation on June 28th, 2014.
Build Yocto image with meta_qt5 layer
Steps taken from https://community.freescale.com/docs/DOC-1616
sudo apt-get install gawk wget git-core diffstat unzip texinfo build-essential chrpath libsdl1.2-dev xterm curl
(This is one long command line)
Setup development Environment
git config –global user.email “[email protected]”
git config –global user.name “Your Name”
Further steps taken from https://github.com/Freescale/fsl-community-bsp-platform
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b master-next
(Or use another branch than master like daisy. You will need the commit “qtmultimedia: Drop i.MX6 support”.)
As described in https://github.com/meta-qt5
git clone -b master-next https://github.com/meta-qt5/meta-qt5.git
(Or use another branch than master like daisy)
Again following https://github.com/Freescale/fsl-community-bsp-platform
source ./setup-environment build
cp local.conf local.conf.bup
Enter the following configuration (adapt it to your needs). Set your EVM in the MACHINE variable. E.g. imx6sdsabresd for a i.mx6 dual lite sabre sd … Set the QT packages to use in the IMAGE_INSTALL_append variable (might be more/different in your case, we use packages for the OpenGL cinematicexperience demo). The DISTRO_FEATURES_remove entry enforces a framebuffer-only mode without x. Add ssh-server-openssh to EXTRA_IMAGE_FEATURES and openssh-sftp-server to IMAGE_INSTALL_append for QtCreator (optional)
MACHINE = ‘imx6qsabresd’
EXTRA_IMAGE_FEATURES = “debug-tweaks ssh-server-openssh”
IMAGE_INSTALL_append = “qtbase qtbase-fonts qtbase-plugins qtbase-examples cinematicexperience openssh-sftp-server”
DISTRO_FEATURES_remove = “x11 wayland”
Add the following packages to the Yocto build:
Now (from the ‘build’ folder) start building the Yocto image:
The name fsl-image-multimedia refers to the type of image to build, there are several alternatives, e.g. fsl-image-multimedia-full would also contain gstreamer motion picture acceleration. Unfortunately an official meta-toolchain package, which would build an installable developer-toolchain, is not available for QT5.
After a while (1.5h on a recent PC, 4 times longer on a Windows VM) you should see “… and all succeeded” and can flash an SD-Card that will then contain as well the U-Boot, as also the kernel and the root file system (short: everything you need). Insert the EVMs SD-Card to the PC. Call ‘dmesg’ to find out it’s device name. E.g. it could be something like ‘/dev/sdd’. Be careful ! Also your harddisk has a name like ‘/dev/sd#’ and you can wipe out your entire harddisk if you do a mistake here ! Replace /dev/sd# in the line below by the device name of your SD-Card you found out using dmesg.
sudo dd if=build/tmp/deploy/images/imx6qsabresd/fsl-image-multimedia-full-imx6qsabresd.sdcard of=/dev/sd#
(The name will vary depending on your MACHINE setting. E.g. imx6dlsabresd for an i.mx6 dual lite Sabre SD.)
How to execute cinematicexperience can be seen in the article Dual display operation on a Freescale i.mx6 Linux device.
Note: Currently the cinematicexperience demo has to be patched. This might no longer be necessary when you read this. If you see the error ‘Type MainView unavailable’ execute on a target console:
sed -i ‘s/onText/textON/g’ Switch.qml SettingsView.qml
sed -i ‘s/offText/textOFF/g’ Switch.qml SettingsView.qml
Editing target files can only be a test off course. About extending Yocto: How to improve (contribute to) an Open Source Yocto receipe