Creating Raspberry Pi 3 image using Boot2Qt project

Boot2Qt is a special meta repository for Yocto project supporting by The Qt company. The open source version is available since Qt 5.7 was released and can be found at:
                    https://code.qt.io/cgit/yocto/meta-boot2qt.git/

In this small article I will show how to build a SD image for Raspberry Pi on Ubuntu 18.04 in several simple steps.

1. Install the dependencies for the Yocto tools. In Ubuntu, the following packages are required:

        $ sudo apt-get install gawk curl git-core git-lfs diffstat unzip p7zip-full textinfo \
            gcc-multilib build-essential chrpath libstdl1.2-dev xterm gperf bison g++-multilib

2. Go to your home directory

        $ cd  /home/your_home_dir

3. Clone an open source branch of meta-boot2qt project:

        $ git clone git://code.qt.io/yocto/meta-boot2qt.git meta-boot2qt.rpi3

4. Checkout the required tag version

       $ cd /home/your_home_dir/meta-boot2qt.rpi3

   Get a list of the tags

       $ git tag

   Choose a version 5.12.3

       $ git checkout tags/v5.12.3 -b v5.12.3  

 5. Create a build directory:

       $ mkdir /home/your_home_dir/build.rpi3
       $ cd /home/your_home_dir/build.rpi3

6. Initialize the Yocto repositories for chosen device (rasberrypi3):

       $  ../meta-boot2qt.rpi3/b2qt-init-build-env init –device raspberrypi3

7. At this point, we have everything we need to start a build.

   export global “MACHINE” variable
       $ export MACHINE=raspberrypi3

   and create build configuration
       $ source ./setup-environment.sh

8. Yocto recipes for Boot to Qt for embedded Linux have two main targets to build: the target image, and the external toolchain that can be used with Qt Creator for building Qt applications.
And, physical http://downtownsault.org/news/ buy generic cialis and psychological side effects of these drugs. Erectile Dysfunction condition in man is the inability of a generic viagra online person to maintain erection of the penis by preventing the penis muscles to relax. About 40% of cases of potency disorders are witnessed in normally healthy men, not suffering from PAH (pulmonary arterial hypertension) downtownsault.org order cialis no prescription does have a few side effects. All these ingredients are now available in herbal formulas such as VigRx Oil , which is not a chemical-laden drug. viagra online mastercard
        $ bitbake b2qt-embedded-qt5-image
        $ bitbake meta-toolchain-b2qt-embedded-qt5-sdk

You will find your SD card image “b2qt-embedded-qt5-image-raspberrypi3-yyyymmddhhmmss.rootfs.rpi-sdimg” in directory
/home/your_home_dir/build.rpi3/build-raspberrypi3/tmp/deploy/images/raspberrypi3/

and SDK self-extracted archive “b2qt-x86_64-meta-toolchain-b2qt-embedded-qt5-sdk-raspberrypi3.sh” in directory
/home/your_home_dir/build-raspberrypi3/tmp/deploy/sdk

Note: the part of image name “yyyymmddhhmmss” contains time stamp of creating the image. For example, I have “b2qt-embedded-qt5-image-raspberrypi3-20190515124717.rootfs.rpi-sdimg” file.

Flashing an image to SD card

Before flashing the image, from the command line call “lsblk” command. Note down the available devices. Now insert your SD card into your computer and call “lsblk” command again. We will use new device as output later. To flash the image to SD card I use “dd” command:

$sudo dd bs=1M if=b2qt-embedded-qt5-image-raspberrypi3-yyyymmddhhmmss.rootfs.rpi-sdimg of=/dev/sdd status=progress

Make sure you use the right output device. In my example, it is /dev /sdd.

Booting the image

On boot, qtlauncher service starts an official Qt demo application (see a picture below)

 

You can communicate with the board either via ssh (root@IP.Address) or by using a serial console. In case of the last option you need to append to “/boot/config.txt” file the next row:
                                    enable_uart=1

References:

 1. Qt 5.7 for Device Creation
 https://blog.qt.io/blog/2016/06/16/qt-5-7-for-device-creation/

2. Building Your Own Embedded Linux Image
 http://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html