armstonea9r2 Qt5 examples

      armstonea9r2 Qt5 examples

      Hello

      I am working with a armstonea9r2.

      I connected a HDMI monitor to armstonea9r2 HDMI port, and a mouse to armstonea9r2 USB host.
      Setting in uboot

      Source Code

      1. run .console_display

      I can see starting kernel messages in HDMI monitor.
      Logged as root, using

      Source Code

      1. cat /dev/input/mice

      moving the mouse I can see characters on the console.

      To tell the armstonea9r2 the display to use, I modified armstonea9r2dl.dts this way:

      Source Code

      1. /*
      2. * Set the display configuration:
      3. *
      4. * - If you have no display, set both settings to DISPLAY_NONE.
      5. * - If you have one display, set MXCFB0 to one of the display types above
      6. * and leave MXCFB1 at DISPLAY_NONE.
      7. * - If you have two displays, set both settings to a display type from above.
      8. * You have to use different types for the two displays.
      9. *
      10. * The first display will also get a video overlay, so MXCFB0 will use /dev/fb0
      11. * and /dev/fb1 and MXCFB1 will use /dev/fb2.
      12. */
      13. /* #define CONFIG_ARMSTONEA9R2_MXCFB0 DISPLAY_LVDS0 */
      14. #define CONFIG_ARMSTONEA9R2_MXCFB0 DISPLAY_HDMI /* roberto */
      15. #define CONFIG_ARMSTONEA9R2_MXCFB1 DISPLAY_NONE
      16. /* i.MX6 Solo and DualLite only have one IPU, do not change */
      17. #define CONFIG_ARMSTONEA9R2_USE_ONE_IPU
      18. /* Configure HDMI settings here (ignored if HDMI is not used) */
      19. #define CONFIG_ARMSTONEA9R2_HDMI_BPP 24
      20. #define CONFIG_ARMSTONEA9R2_HDMI_PIX_FMT "RGB24"
      21. /* #define CONFIG_ARMSTONEA9R2_HDMI_MODE_STR "1920x1080M@60" */
      22. #define CONFIG_ARMSTONEA9R2_HDMI_MODE_STR "1366x768M@60" /* roberto */


      I also commented the line

      Source Code

      1. //#define CONFIG_ARMSTONEA9R2_CAPTOUCH_MXT224 /* roberto */

      because I do not have capacitive touch.

      I compiled fsimx6_qt5_defconfig, with the succesful result in /output/images

      Source Code

      1. rvelazquez@Fedora23 images]$ pwd
      2. /home/rvelazquez/fsimx6-V3.0/build-dir/buildroot-2016.05-fsimx6-V3.0/output/images
      3. [rvelazquez@Fedora23 images]$ ls
      4. armstonea9dl.dtb armstonea9q.dtb armstonea9r2dl.dtb armstonea9r2q.dtb efusa9dl.dtb efusa9q.dtb rootfs.ext2 rootfs.ext4 rootfs.ubifs uImage


      I updated to the NAND armstonea9r2 the device tree armstonea9r2dl.dtb, and the kernel uImage.
      The file system rootfs.ext is loaded succesfully by NFS, read write enabled.

      Logged as root.
      I execute the analogclok example supplied, getting error:

      Source Code

      1. # pwd
      2. /usr/lib/qt/examples/gui/analogclock
      3. # ls
      4. analogclock* analogclock.pro main.cpp
      5. # ./analogclock -qws
      6. QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
      7. If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
      8. Unable to query physical screen size, defaulting to 100 dpi.
      9. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
      10. EGL Error : Could not create the egl surface: error = 0x3003
      11. Aborted
      12. # ./analogclock
      13. QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
      14. If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
      15. Unable to query physical screen size, defaulting to 100 dpi.
      16. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
      17. EGL Error : Could not create the egl surface: error = 0x3003
      18. Aborted


      I created a kit in Qt creator using your toolchain (please see Qt Armstonea9r2 kit.PNG). I compiles correctly. However when the application is executed (logged as root) I get the same error.

      Source Code

      1. # pwd
      2. /root/TestQt
      3. # ls
      4. TestQt*
      5. # ./TestQt
      6. QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
      7. If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
      8. Unable to query physical screen size, defaulting to 100 dpi.
      9. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
      10. EGL Error : Could not create the egl surface: error = 0x3003
      11. Aborted


      Thank you for your help.

      Regards.
      Images
      • Qt Armstonea9r2 kit.PNG

        118.96 kB, 1,214×624, viewed 258 times
      Can you do the following test. Remove all qt5 related packages in Buildroot's output/build directory and call "make" again.

      Source Code

      1. rm -rf output/build/qt5*
      2. make


      This should rebuild all Qt packages. I have the suspicion that there is some dependency missing in Buildroot and then some parts of Qt are built before the EGL support is fully compiled and available. Then some EGL parts are missing in the Qt binaries. When I did this the last time, I got a considerably larger root filesystem with many more examples than before. I thought this was an error on my PC, that it crashed in some build during the night, but maybe this is a reproducible problem that hits everybody.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Hello

      Using Armstonea9r2, fsimx6-V3.0, fsimx6_qt5_defconfig, armstonea9r2dl.dts modified to control HDMI monitor.

      This is what I did

      Source Code

      1. make fsimx6_qt5_defconfig
      2. make menuconfig # enable gdb host python
      3. rm -rf output/build/qt5*
      4. make clean
      5. make busybox-menuconfig # enable fdisk. If it is done before make clean, then fdisk does not appear in rootfs
      6. make


      This time I did not update armstonea9r2dl.dtb neither uImage to NAND flash, I did the first time. rootfs.ext4 is loaded by NFS correctly.

      I did not compile anything by Qt Creator qmake armstonea9r2, I just executed one of the examples already on the armstonea9r2, I connected by serial debug port console ttymxc3.

      It did not work.

      See please snapshot attached, I could not copy-paste from putty.

      Thank you indeed.

      Regards
      Images
      • 001 Qt5 EGLFS error.PNG

        29.92 kB, 708×490, viewed 247 times
      OK, this was a complete rebuild. This will lead to the same situation as before. What I meant was just recompiling qt5. So no "make clean" after removing the output/build/qt5* directories ("make clean" removes output/build completely anyway, so there would be no point in removing some directories in a separate step before this).

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Hello

      I did not work.

      This is what I did:

      Source Code

      1. make fsimx6_qt5_defconfig
      2. make menuconfig # enable gdb host python
      3. rm -rf output/build/qt5*
      4. make busybox-menuconfig # enable fdisk. If it is done before make clean, then fdisk does not appear in rootfs
      5. make


      I noticed than rootfs.ubifs increased from 105Mb (my previous make) to 166Mb.

      I set some environment variables. I logged ssh as root.

      This is the cpature:

      Source Code

      1. # pwd
      2. /usr/lib/qt/examples/widgets/tutorials/gettingStarted/gsQt/part1
      3. # whoami
      4. root
      5. # uname -a
      6. Linux fsimx6 4.1.15-F+S #2 SMP PREEMPT Thu Jan 5 19:04:50 CET 2017 armv7l GNU/Linux
      7. # printenv | grep QT*
      8. QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
      9. OLDPWD=/usr/lib/qt/examples/widgets/tutorials/gettingStarted/gsQt
      10. QT_QPA_EGLFS_PHYSICAL_HEIGHT=500
      11. QT_QPA_EGLFS_PHYSICAL_WIDTH=1000
      12. PWD=/usr/lib/qt/examples/widgets/tutorials/gettingStarted/gsQt/part1
      13. # ls -la
      14. drwxr-xr-x 2 root root 1024 Jan 12 20:11 ./
      15. drwxr-xr-x 7 root root 1024 Jan 12 19:50 ../
      16. -rw-r--r-- 1 root root 2120 Mar 3 2016 main.cpp
      17. -rwxr-xr-x 1 root root 4028 Jan 12 20:11 part1*
      18. -rw-r--r-- 1 root root 147 Mar 3 2016 part1.pro
      19. # ./part1
      20. EGL Error : Could not create the egl surface: error = 0x3003
      21. Aborted
      22. # ./part1 -platform eglfs
      23. EGL Error : Could not create the egl surface: error = 0x3003
      24. Aborted


      Googling
      eglfs unable to query physical screen size defaulting to 100 dpi
      , there are a lot of issues on this topic. I did not try any of them, I before would like to know your advise, please.

      Thank you.

      Kind regards.
      It is still not what I meant. After your step 5, now issue steps 3 and 5 again. When there are some problems in the compilation sequence, then recompiling the whole thing from scratch does not help much. You have to compile only those parts again, that were compiled too early in the previous run.

      Let's give an example. Let's assume that the configuration step during the build process of some Qt example checks if there is EGL available. But what if EGL is compiled *after* this Qt example? Then the Qt example will be compiled without EGL support. Later in the whole build process, also the EGL part will be compiled. But the Qt example remains without EGL support because it is already finished.

      Now if you remove all Qt packages again (and only them), then EGL is already there when the Qt example is compiled again. So now it will be built with EGL support.

      Of course this should not happen. The compilation sequence should be set up in a way that EGL is always compiled before Qt. This is done by adding the EGL package as a dependency to Qt. This means telling the build process: "before Qt can be compiled, you must have done EGL first". Sometimes this can be easily detected. If a package fails to build because another package is missing, then this dependency is pretty obvious. However sometimes the situation is not as clear as in this example. If a package still builds fine, but only a feature is missing, then this dependency is not as clearly visible as before. So you first have to detect that there is something missing, and then you have to find out what you have to do to get the compilation sequence right. This is what may happen in our case and what I'm trying to find out by giving you these instructions. Qt builds fine, but it is is not configured and compiled correctly because at the time of Qt configuration some other package(s) are not built yet.

      By the way the messages about the unknown physical screen size do not lead to problems. The examples should work nonetheless. If you like you can set some environment variables with the dimensions of your display to get rid of these messages.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Hello

      This what I did:

      Source Code

      1. make clean
      2. make fsimx6_qt5_defconfig
      3. make menuconfig # enable gdb host python
      4. make busybox-menuconfig # enable fdisk. If it is done before make clean, then fdisk does not appear in rootfs
      5. make
      6. rm -rf output/build/qt5*
      7. make


      This time I updated just genetared armstonea9r2dl.dtb and uImage to NAND flash, rootfs.ext4 loaded by NFS.

      It did not work. Again eglfs error = 0x3003.

      Source Code

      1. # pwd
      2. /usr/lib/qt/examples/widgets/tutorials/gettingStarted/gsQt/part1
      3. # date
      4. Fri Jan 13 20:23:40 UTC 2017
      5. # pwd
      6. /usr/lib/qt/examples/widgets/tutorials/gettingStarted/gsQt/part1
      7. # whoami
      8. root
      9. # ls part1 -la
      10. -rwxr-xr-x 1 root root 4028 Jan 13 18:32 part1*
      11. # uname -a
      12. Linux fsimx6 4.1.15-F+S #2 SMP PREEMPT Fri Jan 13 18:29:34 CET 2017 armv7l GNU/Linux
      13. # ./part1
      14. QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
      15. If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
      16. Unable to query physical screen size, defaulting to 100 dpi.
      17. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
      18. EGL Error : Could not create the egl surface: error = 0x3003
      19. Aborted


      Thank you for your help.

      Regards.
      Hello,
      Have you tried other examples as well?
      There are lots of examples that comes with the QT Example Package. Of course we couldn't test every example, so it might be that some are not working but others do.
      For example I checked some widget examples in /usr/lib/qt/examples/ that worked fine:

      - widgets/animation/animatedtiled
      - widgets/painting/composition
      - widgets/painting/deform
      - widgets/painting/pathstroke

      Are they working in your configuration or is the result the same?

      Best Regards
      Your F&S Support Team.
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Hello

      I did again

      Source Code

      1. make clean
      2. make fsimx6_qt5_defconfig
      3. make menuconfig # enable gdb host python
      4. make busybox-menuconfig # enable fdisk. If it is done before make clean, then fdisk does not appear in rootfs
      5. make
      6. rm -rf output/build/qt5*
      7. make


      I tested all the examples you mentioned, all of them resulted the
      EGL Error : Could not create the egl surface: error = 0x3003
      , for example animatedtiles:

      Source Code

      1. # date
      2. Sat Jan 21 17:36:25 UTC 2017
      3. # pwd
      4. /usr/lib/qt/examples/widgets/animation/animatedtiles
      5. # uname -a
      6. Linux fsimx6 4.1.15-F+S #2 SMP PREEMPT Fri Jan 13 18:29:34 CET 2017 armv7l GNU/Linux
      7. # whoami
      8. root
      9. # ./animatedtiles
      10. QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
      11. If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
      12. Unable to query physical screen size, defaulting to 100 dpi.
      13. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
      14. EGL Error : Could not create the egl surface: error = 0x3003
      15. Aborted


      I can see kernnel messages on the HDMI monitor (run .console_display in uboot).

      In my host I have found two armstonea9r2dl.dts identical, see please "020 armstonea9r2dl dts checked identical by kdiff3.PNG". I modified the "/home/rvelazquez/fsimx6-V3.0/build-dir/linux-fsimx6/arch/arm/boot/dts/armstonea9r2dl.dts" to tell HDMI display. I attach my armstonea9r2dl.dts file.

      The armstonea9r2dl.dtb updated to NAND flash FDT part when I tested the examples was the one located in "/home/rvelazquez/fsimx6-V3.0/build-dir/buildroot-2016.05-fsimx6-V3.0/output/images/armstonea9r2dl.dtb", see please "021 output images armstonea9r2dl dtb updated to nand flash FDT part.PNG".

      Thank you for your help indeed.

      Kind regards
      Images
      • 020 armstonea9r2dl dts cheked identical by kdiff3.PNG

        22.64 kB, 1,126×209, viewed 200 times
      • 021 output images armstonea9r2dl dtb updated to nand flash FDT part.PNG

        21.35 kB, 1,108×165, viewed 198 times
      Files
      Hello

      I tested this:

      - Load by NFS the rootfs.ext4 generated by making fsimx6_std_defcong.
      - armstonea9r2dl.dtb with HDMI display updated to NAND flash FDT part. armstonea9r2dl.dtb generated by making fsimx6_qt5_defconfig (+phyton support gdb).
      - uImage updated to NAND flash Kernel part. uImage generated by making fsimx6_qt5_defconfig (+phyton support gdb).

      The default GUI X-Window desktop matchbox is shown correctly on HDMI monitor, mouse works correctly.

      Any problem with my armstonea9r2dl.dts or armstonea9r2dl.dtb can be ruled out.

      Regards.
      Hellow

      I captured configure stage when making qt5base.
      This is what I did:

      Source Code

      1. make clean
      2. make fsimx6_qt5_defconfig
      3. make menuconfig # enable gdb host python
      4. make
      5. make qt5base-dirclean
      6. make qt5base # Ctrl+C when configure stage is done


      Please see "qt5base configure stage.txt" attached.
      In case you notice something wrong, please let me know.

      Thank you.

      Regards.
      Files

      rvelazquez wrote:


      - Load by NFS the rootfs.ext4 generated by making fsimx6_std_defcong.

      Please tell me that this is *not* what you are doing. I hope you will download (or make available by NFS) the rootfs.ext4 generated by fsimx6_qt5_defconfig.

      The default GUI X-Window desktop matchbox is shown correctly on HDMI monitor, mouse works correctly.

      Arrgh, no, if you use the qt5 rootfs, you will *not* see this screen. When using Qt5, you will not have X11 available. The image will stay blank until you start a Qt application.

      I think we have found the "problem". Please use the qt5 rootfs. And also please use the fsimx6_qt5_defconfig from release fsimx6_V3.0, not an older one.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Hello

      Sorry for the missunderstanding.

      I can confirm you:
      "EGL Error : Could not create the egl surface: error = 0x3003" happens to me using fsimx6_qt5_defconfig (+phyton gdb support, +fdisk busybox enable), rootfs.ext4 loaded by NFS.

      What I tested (I came out with the idea to rule out a possible bad armstonea9r2.dtb):
      fsimx6_std_defconfig rootfs.ext4 loaded by NFS.
      armstonea9r2dl.dtb display to HDMI, updated to NAND flash. Generated when make fsimx6_qt5_defconfig(+phyton gdb support, +fdisk busybox enable).
      uImage updated to NAND flash. Generated when make fsimx6_qt5_defconfig(+phyton gdb support, +fdisk busybox enable).
      As a result of this test, default GUI X-Window desktop matchbox is correctly shown on HDMI monitor.

      Thank you.

      Kind regards.
      Hello

      I have been using Armstonea9r2, fsimx6-V3.0 all the time.

      If you agree, you could send me please your fsimx6_qt5_defconfig rootfs.ext4, compiled on your own host machine.

      My host machine is:

      Source Code

      1. [rvelazquez@Fedora23 ~]$ uname -a
      2. Linux Fedora23 4.8.13-100.fc23.x86_64 #1 SMP Fri Dec 9 14:51:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

      From a previous post, I think you use Fedora21.

      I would load your fsimx6_qt5_defconfig rootfs.ext4 by NFS, I would test qt examples. If it worked, I would install Fedora21, I would start from scratch.

      I am sending to support@fs-net.de a mail from my account, you could use wetransfer.com/ to send me rootfs.ext4.

      Thank you.

      Regards.
      Hello,

      Using Fedora 23 is no problem. Fedora 21 is just our recommendation (as we are using it right now) and in Fedora 24+ the (host-)compiler is in a version that's too new. But 23 is fine too.
      Of course you can also use other distributions like Mint, Ubuntu etc. but in our documentation we had to choose one Distri to explane and so this is Fedora now.
      In propably all distributions you'll have to install additional packages. What you need for Fedora is explained in our documentation.

      Have you tried other exmples too, as questioned in a post before? What is the behavior?

      fs-support_PH wrote:

      Hello,
      Have you tried other examples as well?
      There are lots of examples that comes with the QT Example Package. Of course we couldn't test every example, so it might be that some are not working but others do.
      For example I checked some widget examples in /usr/lib/qt/examples/ that worked fine:

      - widgets/animation/animatedtiled
      - widgets/painting/composition
      - widgets/painting/deform
      - widgets/painting/pathstroke

      Are they working in your configuration or is the result the same?



      Best Regards
      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      Post was edited 2 times, last by “fs-support_PH” ().

      Yes your are write. Sorry I think I missed that.

      Right now I'm compiling a qt5 rootfs.
      I will do a test when it's done and see if I can reproduce your errors.

      Best Regards
      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      One thing that I forgot. Some things only work if you set the BPP value for the framebuffer to 32 bits. In the future this will be the case in all our device trees, but in the previous releases we had them set to other depths. So please check the BPP value and try 32 if it is not already set.

      If this does not work, then we will try here again. Unfortunately I can not keep all my images here, this would take too much hard disk space. So I'd have to compile the Qt5 buildroot here again if we do not get it running on your machine.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Hello

      It worked !!

      This is what I did:

      Source Code

      1. # whoami
      2. root
      3. # uname -a
      4. Linux fsimx6 4.1.15-F+S #2 SMP PREEMPT Fri Jan 13 18:29:34 CET 2017 armv7l GNU/Linux
      5. # fbset -s
      6. mode "1280x720-60"
      7. # D: 74.250 MHz, H: 45.000 kHz, V: 60.000 Hz
      8. geometry 1280 720 1280 720 24
      9. timings 13468 220 110 20 5 40 5
      10. accel false
      11. rgba 8/16,8/8,8/0,0/0
      12. endmode
      13. # fbset -depth 32
      14. # fbset -s
      15. mode "1280x720-60"
      16. # D: 74.250 MHz, H: 45.000 kHz, V: 60.000 Hz
      17. geometry 1280 720 1280 720 32
      18. timings 13468 220 110 20 5 40 5
      19. accel false
      20. rgba 8/16,8/8,8/0,8/24
      21. endmode
      22. # ./animatedtiles


      I tested all examples you suggested on Yesterday 7:56am post, and others. Worked fine.

      Good job !!

      Thank you indeed.

      Regards.