Sunday, November 13, 2011
Qt4 Embedded allows to run Qt applications directly in Linux Framebuffer, bypassing X Windows completely. This is especially important during embedded development, because it allows to save a lot of memory and start up time.
Qt4 has a rich set of examples directly embedded into Qt sources. Below is a few samples of how it looks like:
First, you need to install QEMU. For Windows, the easiest way is to download zipped executables, which I shared here: Qemu-windows-0151. For Linux it's usually apt-get install qemu-system.
Then, we need to build Angstrom image. For those unpatient, I shared a prebuilt image here: angstrom-qt4-embedded. Angstrom has online image builder available here: Angstrom Image Builder. You need to pick console image and download it. The small trick is that you need to download kernel image yourself (from here: kernel-image-188.8.131.52_2.6.37-r4.6_qemuarm.ipk) and unpack it using ar -x kernel-image.ipk command. This is because online image builder doesn't include kernel image for some reason. However this step is not required if you download the image I shared.
Next, you need to start QEMU using kernel image and prebuilt angstrom image. The command looks like this:
qemu-system-arm -M versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64 -kernel zImage-184.108.40.206 -hda disk.img -append "root=/dev/sda2 rw"
For convenience, I prepared run script, which does that.
Next, you need to login as root and install qt4-embedded using command: opkg install qt4-embedded. This can be again skipped if you use the image I prepared.
In order to run demos, you need to use this command:
It looks like this:
Posted by Rafal Rusin at 3:01 AM