Personal tools

B2QT Build Release

From Variscite Wiki

Jump to: navigation, search

DART-6UL - Boot to Qt 5.9.3 based on Yocto Morty



1 About Boot to Qt

Boot to Qt is a light-weight, Qt-optimized, full software stack for embedded Linux systems that is installed into the actual target device.

The stack can be customized to production with Build-Your-Own-Stack tooling, including proprietary Yocto Project recipes.

B2QTstack.png

The full B2Qt documentation is available at Qt for Device Creation official page.

2 Requirements

You should be familiar with the Yocto tools and the concept of recipes. For more information, see Yocto Project documentation.

To get started, you need the following:

  • Install the dependencies for the Yocto tools. In Ubuntu, the following packages are required:
sudo apt-get install gawk curl git-core diffstat unzip p7zip texinfo \
gcc-multilib build-essential chrpath libsdl1.2-dev xterm gperf bison \
g++-multilib

3 Setting Up Yocto Build Environment

Run the setup script that initializes the Yocto environment.

mkdir ~/var-b2qt
cd ~/var-b2qt
git clone https://github.com/varigit/meta-variscite-boot2qt.git -b morty-var01
cd meta-variscite-boot2qt
./b2qt-init-build-env init --device imx6ul-var-dart

b2qt-init-build-env has the following additional command line options:

  • list-devices: show all supported devices that can be used for a Boot to Qt build
  • mirror: create a local mirror of the yocto repositories. This enables you to use the same repository downloads for multiple build environments, when initializing with init --reference <mirror path>.

For all command line options, see:

./b2qt-init-build-env help

4 Building the Image and Toolchain

After the Yocto environment is set up, you need to configure the build environment for your target device:

MACHINE=imx6ul-var-dart source ./setup-environment.sh

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.

MACHINE=imx6ul-var-dart bitbake b2qt-embedded-qt5-image
MACHINE=imx6ul-var-dart bitbake meta-toolchain-b2qt-embedded-qt5-sdk

The target rootfs image is located in the

~/var-b2qt/meta-variscite-boot2qt/build-imx6ul-var-dart/tmp/deploy/images/imx6ul-var-dart/b2qt-embedded-qt5-image-imx6ul-var-dart.img

and the new toolchain is in

~/var-b2qt/meta-variscite-boot2qt/build-imx6ul-var-dart/tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-embedded-qt5-sdk-imx6ul-var-dart.sh

5 Flashing the SD card image

Plug the SD card into your Linux HOST PC, run "dmesg|tail" and see which device is added (i.e. /dev/sdX or /dev/mmcblkX)

$ sudo umount /dev/sdX*
$ sudo dd if=tmp/deploy/images/imx6ul-var-dart/b2qt-embedded-qt5-image-imx6ul-var-dart.img of=/dev/sdX bs=1M && sync

Replace /dev/sdX with your actual device name, e.g. /dev/sdb

6 Creating an extended SD card

Variscite provides the var-create-yocto-sdcard.sh script which creates our NAND/eMMC recovery SD card. The script copies the NAND/eMMC flash burning scripts and relevant binaries for your convenience.
Later, you will be able to follow Yocto Recovery SD card guide to burn your images to NAND flash or eMMC.

Plug the SD card into your Linux HOST PC, run "dmesg|tail" and see which device is added (i.e. /dev/sdX or /dev/mmcblkX)

$ cd ~/var-b2qt/meta-variscite-boot2qt
$ sudo MACHINE=imx6ul-var-dart sources/meta-variscite-fslc/scripts/var_mk_yocto_sdcard/var-create-yocto-sdcard.sh /dev/sdX

Replace /dev/sdX with your actual device name, e.g. /dev/sdb