Changes between Version 3 and Version 4 of buildroot/qt


Ignore:
Timestamp:
11/06/2019 01:01:00 AM (5 years ago)
Author:
Tim Harvey
Comment:

general cleanup; update patch; add additional demo instructions and image options

Legend:

Unmodified
Added
Removed
Modified
  • buildroot/qt

    v3 v4  
    1 = Introduction to QT in Buildroot
     1= Introduction to Qt in Buildroot
    22
    3 An embedded solution may require a custom graphical interface.  Buildroot and QT makes for an efficient lightweight solution.
     3An embedded solution may require a custom graphical interface. Buildroot and Qt makes for an efficient lightweight solution.
    44
    5 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. 
     5This guide will walk you through the necessary steps to create a bootable image containing various demos:
     6- glmark2 - an OpenGL 2.0 and ES2.0 benchmark:
     7- kmscube - a demonstration program showing how to drive bare meta graphics - - gstreamer - a multimedia framework/library
     8- Qt5 Cinematic Experience - a simple Qt5 app showing fog and particles
     9 - https://github.com/rzr/qt5-cinematic-experience (webpage)
     10 - https://www.youtube.com/watch?v=kBNelaiCJZg (youtube video)
    611
    7 - https://github.com/rzr/qt5-cinematic-experience (webpage)
    8 - https://www.youtube.com/watch?v=kBNelaiCJZg (youtube video)
    9 
    10 = Building the demo
     12= Building the demo image
    1113
    1214== Recommended hardware
    1315
    14 - GW54xx
    15 - HDMI monitor
     16- Ventana board with HDMI output
     17- 1080p HDMI monitor (edit /root/ventana.json to change the resolution)
    1618- Mini HDMI cable to HDMI (for connecting the board and monitor together)
    17 - MicroSD card
    1819- Power cables
    19 - Ethernet
    2020
    21 ** Optionally a different board or video periperhal can be used, this will require adapting the instructions below appropreately. **
    2221
    23 == Creating Buildroot tarball
    24 
    25 Clone buildroot:
    26 
     22== Building
     23Procedure:
    2724{{{#!bash
     25# clone buildroot
    2826git clone https://github.com/buildroot/buildroot.git
     27# fetch and apply patch that adds ventana defconfig files
     28wget http://trac.gateworks.com/raw-attachment/wiki/buildroot/qt/0001-add-support-for-Gateworks-Ventana-defconfig-qt5-defc.patch
     29git am .patch
     30# build the gwventana-qt5 image
     31make distclean
     32make imx6-gwventana-qt5_defconfig
     33make
     34ls output/images/
    2935}}}
    3036
    31 Download and apply the [http://trac.gateworks.com/attachment/wiki/buildroot/QT/0001-add-Gateworks-Ventana-Qt5-Cinematic-Experience-demo-.patch patch] which is attached to this page:
     37The patch adds the following:
     38 * board/gateworks/ventana/rootfs_overlay/etc/profile.d/qt.sh - set Qt env vars
     39 * board/gateworks/ventana/rootfs_overlay/root/ventana.json - Qt screen config for LVDS disabled and 1080p HDMI (modify /root/ventana.json to your needs)
     40 * configs/imx6-gwventana-qt5_defconfig - defconfig for qt5
     41 * configs/imx6-gwventana_defconfig - defconfig for console image
    3242
    33 {{{#!bash
    34 git am 0001-add-Gateworks-Ventana-Qt5-Cinematic-Experience-demo-.patch
    35 }}}
     43You can use the following filesystem images:
     44 * output/images/rootfs.ubi for 2K page size flash geometries (256MB flash or newer 2GiB flash parts)
     45 * output/images/rootfs.tar - refer to [wiki:/linux/blockdev this page] to create a bootable block storage device using the created tarball
     46 * output/images/sdcard.img - disk image suitable for copying to a removalbe block storage device (see [wiki:/linux/blockdev])
    3647
    37 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. 
    3848
    39 ** Compiling:
    40 
    41 Ensure your build is clean.
    42 {{{#!bash
    43 make distclean
    44 }}}
    45 
    46 Load the config created by the patch.
    47 {{{#!bash
    48 make imx6-gwventana-gt5_defconfig
    49 }}}
    50 
    51 Build buildroot.
    52 {{{#!bash
    53 make
    54 }}}
    55 
    56 Verify the output file is present.
    57 
    58 {{{#!bash
    59 ls output/images/rootfs.tar
    60 }}}
    61 
    62 Follow the instructions on [wiki:/linux/blockdev this page] to create a bootable block storage device using the created tarball.
    63 
    64 = Running the Demo
     49= Running the Demos
    6550
    6651Login as "root"
    6752
    68 Export EGLFS video mode settings:
    69 
     53Example Demos:
     54- glmark2 - an OpenGL 2.0 and ES2.0 benchmark:
    7055{{{#!bash
    71 export QT_QPA_EGLFS_KMS_CONFIG=/root/ventana.json
    72 export QT_QPA_EGLFS_ALWAYS_SET_MODE=1
     56glmark2-es2-drm
    7357}}}
    74 
    75 Execute the demo:
     58- kmscube - a demonstration program showing how to drive bare meta graphics via DRM/KMS/GMB and EGL:
     59{{{#!bash
     60kmscube -D /dev/dri/card1
     61}}}
     62- gstreamer:
     63{{{#!bash
     64gst-launch-1.0 videotestsrc ! kmssink
     65}}}
     66- Qt5 applications:
    7667{{{#!bash
    7768/usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience
    7869}}}
     70
     71
    7972= Conclusion
    80 
    81 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. 
     73This 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.