Personal tools

VisionSOM imx-meta-somlabs: Difference between revisions

From SomLabs Wiki

Jump to: navigation, search
No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{PageHeader|VisionSOM imx-meta-somlabs layer for NXP Yocto}} __toc__
{{PageHeader|VisionSOM imx-meta-somlabs layer for iMX Yocto Zeus}} __toc__


This tutorial explains how to build the Yocto zeus system for the VisionSOM modules. The Yocto system uses the following kernel and u-boot repositories:
This tutorial explains how to build the Yocto zeus system for the VisionSOM modules. The Yocto system uses the following kernel and u-boot repositories:


* kernel (5.4.24): https://github.com/SoMLabs/somlabs-linux-imx/tree/somlabs_imx_5.4.24_2.1.0
* kernel (5.4.47): https://github.com/SoMLabs/somlabs-linux-imx/tree/somlabs_imx_5.4.47_2.2.0
* u-boot (2019.04): https://github.com/SoMLabs/somlabs-uboot-imx/tree/somlabs-lf-5.4.y_v2019.04
* u-boot (2020.04): https://github.com/SoMLabs/somlabs-uboot-imx/tree/somlabs-imx_v2020.04_5.4.47_2.2.0


== Introduction ==
== Introduction ==


Meta-somlabs is a layer providing the VisionSOM-6ULL module and VisionCB-6ULL-STD carrier board hardware support for Yocto-based NXP Linux system.
Meta-somlabs is a layer providing the VisionSOM-6ULL with VisionCB-6ULL-STD carrier board and VisionSOM-8MM with VisionCB-8M boards hardware support for Yocto-based NXP Linux system.


== Host system prerequisites ==
== Host system prerequisites ==


This tutorial was prepared for the Ubuntu 18.04.5 LTS host operating system. The following packages need to be installed before the building process:
This tutorial was prepared for the Ubuntu 18.04.5 LTS host operating system. All of the files required for system image compilation may require up to 120 GB of the disk space. The SDK build requires additional 25 GB (145 GB in total).
 
The following packages need to be installed before the building process:


<pre>
<pre>
sudo apt-get install repo gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools
sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools
</pre>
</pre>


Line 23: Line 25:
git config --global user.email "you@example.com"
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global user.name "Your Name"
</pre>
A new repo tool version is also required. It may be downloaded directly from the project site. The repo binary needs to be available in the system PATH variable and have the execution privilege:
<pre>
wget https://storage.googleapis.com/git-repo-downloads/repo
sudo mv repo /usr/bin/repo
sudo chmod a+x /usr/bin/repo
</pre>
</pre>


== System image ==
== System image ==


This layer should be used in order to build the fsl-image-validation-imx image. It includes the SoMLabs demo application using the GTK and GStreamer libraries.
This layer should be used in order to build the imx-image-multimedia image. It includes the SoMLabs demo application using the GTK and GStreamer libraries.


== Building the system image ==
== Building the system image ==
Line 40: Line 50:
mkdir imx-yocto-bsp
mkdir imx-yocto-bsp
cd imx-yocto-bsp
cd imx-yocto-bsp
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.3-2.0.0.xml
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.47-2.2.0.xml
repo sync
repo sync
cd sources
cd sources
git clone -b zeus https://github.com/SoMLabs/imx-meta-somlabs.git meta-somlabs
git clone -b zeus https://github.com/SoMLabs/imx-meta-somlabs.git meta-somlabs
cd ../
</pre>
</pre>


The following lines need to be added to the imx-yocto-bsp/imx-setup-release.sh file in order to add the meta-somlabs layer to build and enable the commercial license in build:
The following lines need to be added at the end of the imx-yocto-bsp/imx-setup-release.sh file in order to add the meta-somlabs layer to build and enable the commercial license in build (for example with nano editor: ''nano imx-setup-release.sh''):


<pre>
<pre>
Line 55: Line 66:
System building may be configured for one of the available machine configurations:
System building may be configured for one of the available machine configurations:


* visioncb-6ull-std-emmc-btwifi - VisionCB-6ULL-STD board with eMMC and wireless modem VisionSOM-6ULL version
* visioncb-6ull-std - VisionCB-6ULL-STD board with VisionSOM-6ULL modules
* visioncb-6ull-std-emmc - VisionCB-6ULL-STD board with eMMC VisionSOM-6ULL version
* visionsom-8mm-cb - VisionCB-8M board family with VisionSOM-8Mmini modules
* visioncb-6ull-std-sd-btwifi - VisionCB-6ULL-STD board with SD-card and wireless modem VisionSOM-6ULL version
* visioncb-6ull-std-sd - VisionCB-6ULL-STD board with SD-card VisionSOM-6ULL version
* visionsom-8mm-cb-std - VisionCB-8M-STD board with SD-card and wireless modem VisionSOM-8MM version


System building may be started by the following commands:
System building may be started by the following commands (the first one needs to be called from the ''imx-yocto-bsp'' directory):


<pre>
<pre>
DISTRO=fsl-imx-wayland MACHINE=<SELECTED_MACHINE> source imx-setup-release.sh -b <BUILD_DIRECTORY>
DISTRO=fsl-imx-wayland MACHINE=<SELECTED_MACHINE> source imx-setup-release.sh -b <BUILD_DIRECTORY>
bitbake fsl-image-validation-imx
bitbake imx-image-multimedia
</pre>
</pre>


The system image is located in the fsl-image-validation-imx-<SELECTED_MACHINE>.sdcard.bz2 file in the tmp/deploy/images/<SELECTED_MACHINE> directory. It should be extracted and installed on a SD-card:
The system image is located in the imx-image-multimedia-<SELECTED_MACHINE>.wic.bz2 file in the tmp/deploy/images/<SELECTED_MACHINE> directory. It should be extracted and installed on a SD-card:


<pre>
<pre>
bunzip2 -dkf fsl-image-validation-imx-<SELECTED_MACHINE>.sdcard.bz2  
bunzip2 -dkf imx-image-multimedia-<SELECTED_MACHINE>.wic.bz2  
sudo dd if=fsl-image-validation-imx-<SELECTED_MACHINE>.sdcard of=/dev/sdX bs=1M
sudo dd if=imx-image-multimedia-<SELECTED_MACHINE>.wic of=/dev/sdX bs=1M
</pre>
</pre>



Latest revision as of 10:03, 19 November 2021

VisionSOM imx-meta-somlabs layer for iMX Yocto Zeus


This tutorial explains how to build the Yocto zeus system for the VisionSOM modules. The Yocto system uses the following kernel and u-boot repositories:

Introduction

Meta-somlabs is a layer providing the VisionSOM-6ULL with VisionCB-6ULL-STD carrier board and VisionSOM-8MM with VisionCB-8M boards hardware support for Yocto-based NXP Linux system.

Host system prerequisites

This tutorial was prepared for the Ubuntu 18.04.5 LTS host operating system. All of the files required for system image compilation may require up to 120 GB of the disk space. The SDK build requires additional 25 GB (145 GB in total).

The following packages need to be installed before the building process:

sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools

The source code will be obtained using git, so it needs to be configured by setting the user name and email with correctly set values:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

A new repo tool version is also required. It may be downloaded directly from the project site. The repo binary needs to be available in the system PATH variable and have the execution privilege:

wget https://storage.googleapis.com/git-repo-downloads/repo
sudo mv repo /usr/bin/repo
sudo chmod a+x /usr/bin/repo

System image

This layer should be used in order to build the imx-image-multimedia image. It includes the SoMLabs demo application using the GTK and GStreamer libraries.

Building the system image

The general description of the building process is described in the iMX Yocto Project User's Guide document:

https://www.nxp.com/docs/en/user-guide/IMXLXYOCTOUG.pdf

The summary of required steps including the meta-somlabs layer is shown below:

mkdir imx-yocto-bsp
cd imx-yocto-bsp
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.47-2.2.0.xml
repo sync
cd sources
git clone -b zeus https://github.com/SoMLabs/imx-meta-somlabs.git meta-somlabs
cd ../

The following lines need to be added at the end of the imx-yocto-bsp/imx-setup-release.sh file in order to add the meta-somlabs layer to build and enable the commercial license in build (for example with nano editor: nano imx-setup-release.sh):

echo "BBLAYERS += \"\${BSPDIR}/sources/meta-somlabs\"" >> $BUILD_DIR/conf/bblayers.conf
echo "LICENSE_FLAGS_WHITELIST = \"commercial\"" >> $BUILD_DIR/conf/local.conf

System building may be configured for one of the available machine configurations:

  • visioncb-6ull-std - VisionCB-6ULL-STD board with VisionSOM-6ULL modules
  • visionsom-8mm-cb - VisionCB-8M board family with VisionSOM-8Mmini modules

System building may be started by the following commands (the first one needs to be called from the imx-yocto-bsp directory):

DISTRO=fsl-imx-wayland MACHINE=<SELECTED_MACHINE> source imx-setup-release.sh -b <BUILD_DIRECTORY>
bitbake imx-image-multimedia

The system image is located in the imx-image-multimedia-<SELECTED_MACHINE>.wic.bz2 file in the tmp/deploy/images/<SELECTED_MACHINE> directory. It should be extracted and installed on a SD-card:

bunzip2 -dkf imx-image-multimedia-<SELECTED_MACHINE>.wic.bz2 
sudo dd if=imx-image-multimedia-<SELECTED_MACHINE>.wic of=/dev/sdX bs=1M

The instruction for the eMMC memory image installation may be found on the following wiki pages: