Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61962

Self-built Qt version is not detected as Boot to Qt, and hence no "Boot2Qt" devices can be used with it, only "Generic Linux Device"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.9
    • Device Creation
    • None

    Description

      I am building Qt 5.9 for a Nitrogen 6 iMX6 device using the following script:

      #! /bin/bash
      
      qtSdkDir=/home/mitch/dev/qt-unified
      qtSourceDir=/home/mitch/dev/qt5.9
      qtBuildDir=/home/mitch/dev/qt5.9-n6-debug
      qtHostPrefix=$qtBuildDir/hostbin
      devicePrefix=/usr/local/qt5.9
      deviceName=nitrogen6x
      deviceMkspec=linux-imx6-g++
      sysrootDir=$qtSdkDir/5.9.1/Boot2Qt/$deviceName/toolchain/sysroots
      armSysrootDir=$sysrootDir/cortexa9hf-neon-poky-linux-gnueabi
      crossCompile=$sysrootDir/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
      
      set -e
      
      echo "qtSdkDir=$qtSdkDir"
      echo "qtSourceDir=$qtSourceDir"
      echo "qtBuildDir=$qtBuildDir"
      echo "devicePrefix=$devicePrefix"
      echo "sysrootDir=$sysrootDir"
      echo "armSysrootDir=$armSysrootDir"
      echo "hostprefix=$qtHostPrefix"
      
      echo "\n"
      
      echo "About to remove contents of $qtBuildDir"
      rm -rf $qtBuildDir/*
      
      echo "About to cd into build dir $qtBuildDir"
      cd $qtBuildDir
      
      echo "About to configure Qt build"
      $qtSourceDir/configure -v -commercial -confirm-license -debug -prefix $devicePrefix -hostprefix $qtHostPrefix -extprefix $armSysrootDir/$devicePrefix -device $deviceMkspec -device-option CROSS_COMPILE=$crossCompile -sysroot $armSysrootDir -nomake tests -nomake examples -no-pch -opengl es2
      
      echo "About to run make"
      make -j 8
      
      echo "About to run make install"
      make install
      

      I add this build as a Qt version like so:

      However, when creating a kit based on the Qt version I just added, I'm unable to select the auto-generated device that Creator creates for me using the 5.9.1 SDK kit for the iMX6. It was suggested to me that I should check the warnings for the kit, and indeed it says "Device type is not supported by Qt version.":

      Another suggestion was to try to use a generic linux device instead of the auto-generated one:

      This allowed me to deploy to the device and run the application, but I don't actually see the application running, even though I can interact with it. Here's the output using the Qt Quick Application template that comes with Creator:

      QML debugging is enabled. Only use this in a safe environment.
      QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
      QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
       If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
      Unable to query physical screen size, defaulting to 100 dpi.
      To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
      qml: Clicked on background. Text: "Enter some text..."
      

      I was then suggested to change the QtVersion.Type in ~/.config/QtProject/qtcreator/qtversion.xml, which originally looked like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE QtCreatorQtVersions>
      <!-- Written by QtCreator 4.3.0, 2017-07-14T12:58:41. -->
      <qtcreator>
       <data>
        <variable>QtVersion.0</variable>
        <valuemap type="QVariantMap">
         <value type="int" key="Id">3</value>
         <value type="QString" key="Name">Qt %{Qt:Version} (qt5-dev-debug)</value>
         <value type="QString" key="QMakePath">/home/mitch/dev/qt5-dev-debug/qtbase/bin/qmake</value>
         <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
         <value type="bool" key="isAutodetected">false</value>
        </valuemap>
       </data>
       <data>
        <variable>QtVersion.1</variable>
        <valuemap type="QVariantMap">
         <value type="int" key="Id">5</value>
         <value type="QString" key="Name">Qt %{Qt:Version} (qt5.9-debug)</value>
         <value type="QString" key="QMakePath">/home/mitch/dev/qt5.9-debug/qtbase/bin/qmake</value>
         <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
         <value type="bool" key="isAutodetected">false</value>
        </valuemap>
       </data>
       <data>
        <variable>QtVersion.2</variable>
        <valuemap type="QVariantMap">
         <value type="int" key="Id">8</value>
         <value type="QString" key="Name">Qt %{Qt:Version} (qt5.10-isle-debug)</value>
         <value type="QString" key="QMakePath">/home/mitch/dev/qt5.10-isle-debug/qtbase/bin/qmake</value>
         <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
         <value type="bool" key="isAutodetected">false</value>
        </valuemap>
       </data>
       <data>
        <variable>QtVersion.3</variable>
        <valuemap type="QVariantMap">
         <value type="int" key="Id">9</value>
         <value type="QString" key="Name">Qt %{Qt:Version} GCC 64bit</value>
         <value type="QString" key="QMakePath">/home/mitch/dev/qt-unified/5.9.1/gcc_64/bin/qmake</value>
         <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
         <value type="QString" key="autodetectionSource">SDK.qt.591.gcc_64</value>
         <value type="bool" key="isAutodetected">true</value>
        </valuemap>
       </data>
       <data>
        <variable>QtVersion.4</variable>
        <valuemap type="QVariantMap">
         <value type="int" key="Id">10</value>
         <value type="QString" key="Name">Boot2Qt %{Qt:Version} Boundary Devices i.MX6</value>
         <value type="QString" key="QMakePath">/home/mitch/dev/qt-unified/5.9.1/Boot2Qt/nitrogen6x/toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/qmake</value>
         <value type="QString" key="QtVersion.Type">Qdb.EmbeddedLinuxQt</value>
         <value type="QString" key="autodetectionSource">SDK.qt.embedded.b2qt.591.yocto.nitrogen6x.qt</value>
         <value type="bool" key="isAutodetected">true</value>
        </valuemap>
       </data>
       <data>
        <variable>QtVersion.5</variable>
        <valuemap type="QVariantMap">
         <value type="int" key="Id">11</value>
         <value type="QString" key="Name">Qt %{Qt:Version} (qt5.9-for-n6-debug)</value>
         <value type="QString" key="QMakePath">/home/mitch/dev/qt5.9-n6-debug/hostbin/bin/qmake</value>
         <value type="QString" key="QtVersion.Type">RemoteLinux.EmbeddedLinuxQt</value>
         <value type="bool" key="isAutodetected">false</value>
        </valuemap>
       </data>
       <data>
        <variable>Version</variable>
        <value type="int">1</value>
       </data>
      </qtcreator>
      

      I replaced

         <value type="QString" key="QtVersion.Type">RemoteLinux.EmbeddedLinuxQt</value>
      

      with

         <value type="QString" key="QtVersion.Type">Qdb.EmbeddedLinuxQt</value>
      

      and I was able to use the auto-generated device and see my application running.

      Just to summarise why I think this is a P2:

      • Bad first impression for customers trying to build their own Boot to Qt version
      • The workaround (Generic Linux Device) that users are most likely to try (if they know about it) does not result in the application being visible.

      Attachments

        1. auto-generated-device.png
          188 kB
          Mitch Curtis
        2. custom kit - boot to qt device (doesn't work).png
          175 kB
          Mitch Curtis
        3. custom kit - generic linux device (does work).png
          195 kB
          Mitch Curtis
        4. n6 qt version.png
          246 kB
          Mitch Curtis
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sapiippo Samuli Piippo
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes