wiki:buildroot/qt

Version 1 (modified by Cale Collins, 4 years ago) ( diff )

first draft

Introduction to QT in Buildroot

An embedded solution may require a custom graphical interface. Buildroot and QT makes for an efficient lightweight solution.

This guide will walk you through the necessary steps to create a bootable media containing Buildroot and the QT5 Cinematic Experience. With little adaptation this information can be used to create file systems which support a gamut of QT applications.

Building the demo

Recommended hardware

  • GW54xx
  • HDMI monitor
  • Mini HDMI cable to HDMI (for connecting the board and monitor together)
  • MicroSD card
  • Power cables
  • Ethernet

Optionally a different board or video periperhal can be used, this will require adapting the instructions below appropreately.

Creating Buildroot tarball

Clone buildroot:

git clone https://github.com/buildroot/buildroot.git

Apply the patch attached to this page:

git am 0001-add-Gateworks-Ventana-Qt5-Cinematic-Experience-demo-.patch

This config file will create a build config which enables the necessary QT components, the demo we will be testing, a custom kernel version of 5.4.0, and GW54xx deivce trees, among other things. Make adaptations as necessary for the hardware you have on hand and which ever kernel version you find most appropriate, though you will want to use one with hardware acceleration support. The other file that will be created by the patch will appear in the /root directory and will be used for configuring QT once in userspace.

Compiling:

Ensure your build is clean.

make distclean

Load the config created by the patch.

make imx6-gwventana-gt5_defconfig

Build buildroot.

make

Verify the output file is present.

ls output/images/rootfs.tar

Follow the instructions on this page to create a bootable block storage device using the created tarball.

Running the Demo

Login as "root"

Export EGLFS video mode settings:

export QT_QPA_EGLFS_KMS_CONFIG=/root/ventana.json
export QT_QPA_EGLFS_ALWAYS_SET_MODE=1

Execute the demo:

/usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience

Conclusion

This concludes how to build and install the QT5 Cinematic Experience demo in buildroot. Using "make menuconfig" many different QT applications can be build into buildroot, enjoy experimenting with these various packages.

Note: See TracWiki for help on using the wiki.