Qt 4.8.3 on IFI framebuffer with LNT touch screen

Ready to write or knowing how it was done

The aim of these instructions is to show how to get the precompiled Qt demo from DENX ELDK 5.3 running on the IFI framebuffer and the LNT touch screen as fast as possible. A socrates-qte.tgz tarball ready to write to an SD-card is available for download. See the section "Write the SD card" to see how to use the script. Also be sure to read the section "Using the image" on infos how to recalibrate or rotate the display.

The instructions on this page show how it was generated.

System setup

In order to cencentrate on the important parts, we will only compile a separate kernel (also with the ELDK 5.3 toolchain) but not use ELDK/Yocto to compile the root-filesystem from sources. Instead we will use the Qt ELDK root filesystem as a stepping stone.

Development host

For the purpose of concentrating on the project specifics, these instructions will require a "correctly setup GNU/Linux developmenthost" with ELDK installed and the SD card generating script from the EBV Linux centric workshops available.

The Ubuntu 12.04 virtual machine used for those EBV Linux centric trainings fulfills these requirements and can be used without any problems. If you have your own setup, you may have to adjust a path setting here and there.

Preparing the SD card generation phase

Assembling all the pieces for the final SD card image can be done very transparently with the script used in the EBV workshops. This script is kept very simple for instructional purpuses and does not aim to be a full-featured tool.

As a starting point we will use the tar archive from the EBV workshops. Note that we will swap in a new kernel, FPGA image and root filesystem, effectively changing most of what is included, but it is still a nice self-contained set to start from.

As the script uses hardcoded file names for the individual components,we will simply copy the whole content and modify it to be specific for this demo.

ELDK Cross-Toolchain

To speed up GNU/Linux development, DENX provides pre-compiled toolchains and root filesystems that can be used out of the box without the complexity of the full Yocto flow. For this project we will use ELDK version 5.3 for the armv7a-hf architecture.

When the ELDK toolchain and the eldk-switch utility is installed like described on the DENX Website, we can easily setup our shell to use the cross compiler. This is a prerequisite for the kernel compilation.

Kernel

The kernel part is currently located on the DENX git server. In orderto transfer only the minimal amount of required data, we assume that a git Linux clone already exists at /opt/socfpga/git/linux. If you don't have this, then you should clone one before the next step. Recommended is the mainline repository from Linus (git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux). So now let's add the DENX repo to this existing clone:

Starting the demo from the Qt root file system

The Qt demo will not start automatically, but it is a simple matter of creating a correct configuration, calibrating the touch screen once and start the demo. So let's start with creating the configuration file:

Thats it. We now have rebuilt the contents of the tarball linked tof rom the top of this page.

Recalibrating the display

As can be seen, the script above actually checks for the existence of the calibration data and calls a calibration otherwise.So in order to force a recalibration, just login on the serial console and do a

Rotating the display by 180 degrees

Actually the script in the provided tarball is a little bit more complex to acoommodate early units that have the displays mounted "the wrong way round". The script checks for the existence of a simple file in /etc, so to activate the feature, do this:

Things that should be improved

In this setup we carve out the framebuffer memory in a manual process.We specify its position at the end of the available RAM and use a linux command line parameter to reserve this from being used in Linux.A short script in U-Boot is used to configure the FPGA framebuffer according to this manual allocation. This can of course also be improved.