Version 9 (modified by 5 years ago) ( diff ) | ,
---|
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 image containing various demos:
- glmark2 - an OpenGL 2.0 and ES2.0 benchmark:
- kmscube - a demonstration program showing how to drive bare meta graphics - - gstreamer - a multimedia framework/library
- Qt5 Cinematic Experience - a simple Qt5 app showing fog and particles
- https://github.com/rzr/qt5-cinematic-experience (webpage)
- https://www.youtube.com/watch?v=kBNelaiCJZg (youtube video)
Building the demo image
Recommended hardware
- Ventana board with HDMI output
- 1080p HDMI monitor (edit /root/ventana.json to change the resolution)
- Mini HDMI cable to HDMI (for connecting the board and monitor together)
- Power cables
Building
Procedure:
# clone buildroot git clone https://github.com/buildroot/buildroot.git cd buildroot # fetch and apply patches wget http://trac.gateworks.com/zip-attachment/wiki/buildroot/ -O patches.zip unzip patches.zip git am *.patch # build the gwventana-qt5 image make distclean make imx6-gwventana-qt5_defconfig make ls output/images/
The patch adds the following:
- board/gateworks/ventana/rootfs_overlay/etc/profile.d/qt.sh - set Qt env vars
- board/gateworks/ventana/rootfs_overlay/root/ventana.json - Qt screen config for LVDS disabled and 1080p HDMI (modify /root/ventana.json to your needs)
- configs/imx6-gwventana-qt5_defconfig - defconfig for qt5
- configs/imx6-gwventana_defconfig - defconfig for console image
You can use the following filesystem images:
- output/images/rootfs.ubi for 2K page size flash geometries (256MB flash or newer 2GiB flash parts)
- if you are looking for a ubi image suitable for 4K page size flash geometries (the Micron 2GiB part) change the following via menuconfig:
BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x3e000 BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1000 BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=8192 BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x40000 BR2_TARGET_ROOTFS_UBI_SUBSIZE=0
- if you are looking for a ubi image suitable for 4K page size flash geometries (the Micron 2GiB part) change the following via menuconfig:
- output/images/rootfs.tar - refer to this page to create a bootable block storage device using the created tarball
- output/images/sdcard.img - disk image suitable for copying to a removalbe block storage device (see linux/blockdev)
Running the Demos
Login as "root"
Example Demos:
- glmark2 - an OpenGL 2.0 and ES2.0 benchmark:
glmark2-es2-drm
- kmscube - a demonstration program showing how to drive bare meta graphics via DRM/KMS/GMB and EGL:
kmscube -D /dev/dri/card1
- gstreamer:
gst-launch-1.0 videotestsrc ! kmssink
- Qt5 applications:
/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.