VAR-SOM-MX6 B2QT: Difference between revisions

From Variscite Wiki
No edit summary
(Add docker)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- Set release according to "release" parameter in URL and use RELEASE_B2QT_MORTY_V1.0_VAR-SOM-MX6 as default
<!-- 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}}}} <!--
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release|RELEASE_MORTY_B2QT_V1.0_VAR-SOM-MX6}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_B2QT_MORTY_V1.0_VAR-SOM-MX6}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|{{#var:MACHINE_NAME}} - Boot to QT {{#var:B2QT_BSP_VERSION}} based on Yocto {{#var:YOCTO_NAME}} {{DocImage|category1={{#var:MACHINE_NAME}}|category2=Boot2Qt}} }}__toc__
--> {{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.
}}


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).


=About Boot to Qt=
Release version: '''{{#var:RELEASE_NAME}}'''
|category1=VAR-SOM-MX6
|category2=Yocto
|documentation=
{{OS_Overview_General_Column}}<!--


Boot to Qt is a light-weight, Qt-optimized, full software stack for embedded Linux systems that is installed into the actual target device.
-->{{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 stack can be customized to production with Build-Your-Own-Stack tooling, including proprietary Yocto Project recipes.
|color=green
}}<!--


[[File:B2QTstack.png]]
-->{{SoftBox
 
|title=How-to
The full B2QT documentation is available at [http://doc.qt.io/QtForDeviceCreation Qt for Device Creation] official page.
|content=
 
;Test and use an Interface
=Requirements=
<div style="column-count:2">
 
* [[{{#var:HARDWARE_NAME}} Audio record play|Audio record/play]]
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].
* [[IMX Backlight|Backlight]]
 
* [[IMX Bluetooth|Bluetooth]]
To get started, you need the following:
* {{Varlink|BlueZ5 and A2DP|{{#var:RELEASE_LINK}}|Bluetooth A2DP}}
 
* [[IMX Bluetooth Obex|Bluetooth file transfer]]
* Install the dependencies for the Yocto tools. In Ubuntu, the following packages are required:
* [[IMX BLE|Bluetooth Low Energy]]
sudo apt-get install gawk curl git-core diffstat unzip p7zip texinfo \
* [[{{#var:HARDWARE_NAME}} Camera FSLC|Camera]]
gcc-multilib build-essential chrpath libsdl1.2-dev xterm gperf bison \
* {{Varlink|IMX CAN bus|{{#var:RELEASE_LINK}}|CAN bus}}
g++-multilib
* [[CPU freq and num of cores|CPU freq. and number of cores]]
 
* [[{{#var:HARDWARE_NAME}} DMic|Digital Mic]]
=Setting Up Yocto Build Environment=
* [[{{#var:HARDWARE_NAME}} Dual Displays|Dual Displays: LVDS & HDMI]]
 
* [[{{#var:HARDWARE_NAME}} Ethernet|Ethernet]]
Run the setup script that initializes the Yocto environment. Using Variscite VAR-SOM-MX6 as an example:
* [[{{#var:HARDWARE_NAME}} Eth MAC address|Ethernet MAC address]]
 
* [[{{#var:HARDWARE_NAME}} UART|External UART]]
mkdir ~/var-b2qt
* [[{{#var:HARDWARE_NAME}} GPIO|GPIO]]
cd ~/var-b2qt
* [[U-Boot 4.1.15 features#HDMI auto-detection|HDMI]]
git clone {{#var:B2QT_GIT}} -b {{#var:B2QT_BRANCH}}
* [[{{#var:HARDWARE_NAME}} I2C|I2C]]
cd meta-variscite-boot2qt
* [[{{#var:HARDWARE_NAME}} LVDS Jethro|LVDS]]
./b2qt-init-build-env init --device <target>
* [[DART-MX6 Parallel RGB Display|Parallel RGB display on DART-MX6]]
 
* [[{{#var:HARDWARE_NAME}} PCIE|PCIE]]
b2qt-init-build-env has the following additional command line options:
* {{Varlink|IMX RTC|{{#var:RELEASE_LINK}}|RTC}}
 
* [[{{#var:HARDWARE_NAME}} SATA|SATA]]
* list-devices: show all supported devices that can be used for a Boot to Qt build
* [[{{#var:HARDWARE_NAME}} SPI|SPI]]
* 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>.
* [[Static_IP_Address |Static IP address]]
 
* [[IMX_suspend|Suspend]]
For all command line options, see:
* [[IMX USB Host|USB Host]]
 
* [[{{#var:HARDWARE_NAME}} USB OTG|USB OTG]]
./b2qt-init-build-env help
* [[{{#var:HARDWARE_NAME}} GSTREAM FSLC|Video streaming - Playback/Capture]]
 
* {{Varlink|IMX WDT|{{#var:RELEASE_LINK}}|Watchdog}}
=Building the Image and Toolchain=
* [[{{#var:HARDWARE_NAME}} Wireless LAN|Wireless LAN]]
 
* [[wifi connman |WiFi using connman]]
After the Yocto environment is set up, you need to configure the build environment for your target device:
</div>
 
|color=blue}}}}
MACHINE={{#var:MACHINE_NAME}} source ./setup-environment.sh
{{NONUMBEREDHEADINGS}}
 
The following table lists the MACHINE values for our reference platforms:
 
{| 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.
 
MACHINE={{#var:MACHINE_NAME}} bitbake b2qt-embedded-qt5-image
MACHINE={{#var:MACHINE_NAME}} bitbake meta-toolchain-b2qt-embedded-qt5-sdk
 
The target rootfs image is located in the
 
~/var-b2qt/meta-variscite-boot2qt/build-{{#var:MACHINE_NAME}}/tmp/deploy/images/{{#var:MACHINE_NAME}}/b2qt-embedded-qt5-image-{{#var:MACHINE_NAME}}.img
 
and the new toolchain is in
~/var-b2qt/meta-variscite-boot2qt/build-{{#var:MACHINE_NAME}}/tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-embedded-qt5-sdk-{{#var:MACHINE_NAME}}.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/{{#var:MACHINE_NAME}}/b2qt-embedded-qt5-image-{{#var:MACHINE_NAME}}.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={{#var:MACHINE_NAME}} 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