VAR-SOM-MX6 B2QT: Difference between revisions

From Variscite Wiki
(Add docker)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
=About Boot to Qt=
<!-- Set release according to "release" parameter in URL and use RELEASE_MORTY_B2QT_V1.0_VAR-SOM-MX6 as default
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release|RELEASE_MORTY_B2QT_V1.0_VAR-SOM-MX6}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{SoftwareEx
|title=VAR-SOM-MX6 B2Qt {{#var:B2QT_NAME}}
|image=Qt_logo.png
|description=
B2Qt project is a framework for creating a Linux distributions for embedded devices. Its layering mechanism makes it easy to add Linux to new target devices highly customized for a particular platform; it can include custom start-up scripts, software packages built with a high degree of optimization for a particular architecture, and different user interfaces from full Gnome desktop to a simple a serial console.
{{#if:{{#var:FSLC_BSP_VERSION}}|This release is based on [http://freescale.github.io/ Freescale/NXP Community BSP] layer for Yocto framework.
|Freescale/NXP i.MX joined the Yocto Project community providing a release based on the Yocto Project framework.
}}


Boot to Qt is a light-weight, Qt-optimized, full software stack for embedded Linux systems that is installed into the actual target device.
Variscite extends this layer to support its i.MX6 System On Module products: VAR-SOM-MX6, VAR-SOM-SOLO/DUAL and DART-MX6 (all of which are under the VAR-SOM-MX6 category of this wiki).  


The stack can be customized to production with Build-Your-Own-Stack tooling, including proprietary Yocto Project recipes.
Release version: '''{{#var:RELEASE_NAME}}'''
|category1=VAR-SOM-MX6
|category2=Yocto
|documentation=
{{OS_Overview_General_Column}}<!--


[[File:B2QTstack.png]]
-->{{SoftBox
|title=Build
|content=
;Build B2Qt, Linux and U-Boot
* {{Varlink|{{#var:HARDWARE_NAME}}_Release_Notes|{{#var:RELEASE_LINK}}|Release Notes}}
* [[Yocto_Development_Environment|Setting a Development Environment]]
* {{Varlink|B2QT_Build_Release|{{#var:RELEASE_LINK}}|'''Build B2Qt from source code'''}}
* [[Yocto Common Errors|B2Qt common build errors]]
* {{Varlink|Yocto Customizing U-Boot|{{#var:RELEASE_LINK}}|Customizing U-Boot}}
* {{Varlink|Yocto Customizing the Linux kernel|{{#var:RELEASE_LINK}}|Customizing the Linux kernel}}
* {{Varlink|Yocto Toolchain installation|{{#var:RELEASE_LINK}}|Toolchain installation for out of B2Qt builds}}
* {{Varlink|Yocto Build U-Boot|{{#var:RELEASE_LINK}}|Build U-Boot from source code}}
* {{Varlink|Yocto Build Linux|{{#var:RELEASE_LINK}}|Build the Linux kernel from source code}}
* {{Varlink|Yocto NAND Flash Burning|{{#var:RELEASE_LINK}}|Burning B2Qt binaries to NAND flash/eMMC via SD card}}
* {{Varlink|Yocto Flash From Net|{{#var:RELEASE_LINK}}|Burning B2Qt binaries to NAND flash/eMMC via Ethernet}}
* {{Varlink|Yocto U-Boot 4.1.15 features#Flashing NAND using U-Boot |{{#var:RELEASE_LINK}}|Burning B2Qt binaries to NAND flash from U-Boot}}
* {{Varlink|Yocto U-Boot 4.1.15 features |{{#var:RELEASE_LINK}}|U-Boot features}}
* {{Varlink|Adding yocto packages|{{#var:RELEASE_LINK}}|Adding packages to B2Qt}}
* [[Yocto_Linux_logo|Replace the Linux logo]]
* {{Varlink|High Assurance Boot |{{#var:RELEASE_LINK}}|Secure Boot / High Assurance Boot (HAB)}}
{{#ifeq: {{#var:U-BOOT_BRANCH}} | imx_v2015.04_4.1.15_1.1.0_ga_var03 |* [https://variwiki.com/index.php?title=imx_usb_loader&release=RELEASE_ROCKO_V1.0_{{#var:HARDWARE_NAME}} Booting from USB using the imx_usb_loader utility]|* {{Varlink|imx_usb_loader |{{#var:RELEASE_LINK}}|Booting from USB using the imx_usb_loader utility}}}}
{{#ifeq: {{#var:YOCTO_SUPPORT_DOCKER}} | yes |* {{Varlink|Docker Guide |{{#var:RELEASE_LINK}}|Docker Guide}} | }}


The full B2QT documentation is available at [http://doc.qt.io/QtForDeviceCreation Qt for Device Creation] official page.
|color=green
}}<!--


=Requirements=
-->{{SoftBox
 
|title=How-to
You should be familiar with the Yocto tools and the concept of recipes. For more information, see Yocto Project [https://www.yoctoproject.org/documentation/current documentation].
|content=
 
;Test and use an Interface
To get started, you need the following:
<div style="column-count:2">
 
* [[{{#var:HARDWARE_NAME}} Audio record play|Audio record/play]]
* Install the dependencies for the Yocto tools. In Ubuntu, the following packages are required:
* [[IMX Backlight|Backlight]]
sudo apt-get install gawk curl git-core diffstat unzip p7zip texinfo \
* [[IMX Bluetooth|Bluetooth]]
gcc-multilib build-essential chrpath libsdl1.2-dev xterm gperf bison \
* {{Varlink|BlueZ5 and A2DP|{{#var:RELEASE_LINK}}|Bluetooth A2DP}}
g++-multilib
* [[IMX Bluetooth Obex|Bluetooth file transfer]]
 
* [[IMX BLE|Bluetooth Low Energy]]
=Setting Up Yocto Build Environment=
* [[{{#var:HARDWARE_NAME}} Camera FSLC|Camera]]
 
* {{Varlink|IMX CAN bus|{{#var:RELEASE_LINK}}|CAN bus}}
Run the setup script that initializes the Yocto environment. Using Variscite VAR-SOM-MX6 as an example:
* [[CPU freq and num of cores|CPU freq. and number of cores]]
 
* [[{{#var:HARDWARE_NAME}} DMic|Digital Mic]]
mkdir ~/var-b2qt
* [[{{#var:HARDWARE_NAME}} Dual Displays|Dual Displays: LVDS & HDMI]]
cd ~/var-b2qt
* [[{{#var:HARDWARE_NAME}} Ethernet|Ethernet]]
git clone https://github.com/varigit/meta-variscite-boot2qt -b morty-var01
* [[{{#var:HARDWARE_NAME}} Eth MAC address|Ethernet MAC address]]
cd meta-variscite-boot2qt
* [[{{#var:HARDWARE_NAME}} UART|External UART]]
./b2qt-init-build-env init --device var-som-mx6
* [[{{#var:HARDWARE_NAME}} GPIO|GPIO]]
 
* [[U-Boot 4.1.15 features#HDMI auto-detection|HDMI]]
b2qt-init-build-env has the following additional command line options:
* [[{{#var:HARDWARE_NAME}} I2C|I2C]]
 
* [[{{#var:HARDWARE_NAME}} LVDS Jethro|LVDS]]
* list-devices: show all supported devices that can be used for a Boot to Qt build
* [[DART-MX6 Parallel RGB Display|Parallel RGB display on DART-MX6]]
* 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>.
* [[{{#var:HARDWARE_NAME}} PCIE|PCIE]]
 
* {{Varlink|IMX RTC|{{#var:RELEASE_LINK}}|RTC}}
For all command line options, see:
* [[{{#var:HARDWARE_NAME}} SATA|SATA]]
 
* [[{{#var:HARDWARE_NAME}} SPI|SPI]]
./b2qt-init-build-env help
* [[Static_IP_Address |Static IP address]]
 
* [[IMX_suspend|Suspend]]
=Building the Image and Toolchain=
* [[IMX USB Host|USB Host]]
 
* [[{{#var:HARDWARE_NAME}} USB OTG|USB OTG]]
After the Yocto environment is set up, you need to configure the build environment for your target device:
* [[{{#var:HARDWARE_NAME}} GSTREAM FSLC|Video streaming - Playback/Capture]]
 
* {{Varlink|IMX WDT|{{#var:RELEASE_LINK}}|Watchdog}}
export MACHINE=var-som-mx6
* [[{{#var:HARDWARE_NAME}} Wireless LAN|Wireless LAN]]
source ./setup-environment.sh
* [[wifi connman |WiFi using connman]]
 
</div>
The following table lists the MACHINE values for our reference platforms:
|color=blue}}}}
 
{{NONUMBEREDHEADINGS}}
{| class="wikitable"
|-
! scope="col" | SoMs & boards
! scope="col" | target
|-
| VAR-SOM-SOLO/DUAL/MX6, DART-MX6 and related board configurations
| var-som-mx6
|-
| DART-6UL and related board configurations
| imx6ul-var-dart
|-
| VAR-SOM-MX7 and related board configurations
| imx7-var-som
|-
|}
 
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.
 
bitbake b2qt-embedded-qt5-image
bitbake meta-toolchain-b2qt-embedded-qt5-sdk
 
The target rootfs image is located in the
 
~/var-b2qt/meta-variscite-boot2qt/build-<target>/tmp/deploy/images/<target>/b2qt-embedded-qt5-image-<target>.img
 
and the new toolchain is in
~/var-b2qt/meta-variscite-boot2qt/build-<target>/tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-embedded-qt5-sdk-<target>.sh
 
=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/<target>/b2qt-embedded-qt5-image-<target>.img of=/dev/sdX bs=1M && sync
Replace /dev/sdX with your actual device name, e.g. /dev/sdb
 
=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.<br>
Later, you will be able to follow either the more automatic {{Varlink2|Yocto Recovery SD card|{{#var:RELEASE_LINK}}}} guide to burn your images to NAND flash or eMMC.<br><br>
 
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=<target> 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

Latest revision as of 20:56, 10 February 2022

VAR-SOM-MX6 B2Qt Morty

B2Qt project is a framework for creating a Linux distributions for embedded devices. Its layering mechanism makes it easy to add Linux to new target devices highly customized for a particular platform; it can include custom start-up scripts, software packages built with a high degree of optimization for a particular architecture, and different user interfaces from full Gnome desktop to a simple a serial console. Freescale/NXP i.MX joined the Yocto Project community providing a release based on the Yocto Project framework.

Variscite extends this layer to support its i.MX6 System On Module products: VAR-SOM-MX6, VAR-SOM-SOLO/DUAL and DART-MX6 (all of which are under the VAR-SOM-MX6 category of this wiki).

Release version: morty-b2qt-4.1.15-mx6-v1.0