Difference between revisions of "UCM-iMX8M-Mini: Yocto Linux: Building UCM-iMX8M-Mini Yocto images"

From Compulab Mediawiki
Jump to: navigation, search
Line 3: Line 3:
 
The purpose of this article is to show how to get Yocto Image with support for the UCM-iMX8M-Mini System-on-Module.
 
The purpose of this article is to show how to get Yocto Image with support for the UCM-iMX8M-Mini System-on-Module.
  
 +
= Host System Requirements =
 +
To ensure optimal Yocto build speed and performance, it is recommended to use a host system with at least 4 CPU cores, 16GB RAM, and 500GB of free disk space.<br>
 +
In addition, the system should have the option to open a large number of files simultaneously, preferably up to 4096 or higher. <br>
 
[https://www.yoctoproject.org/docs/ Learn more about Yocto]
 
[https://www.yoctoproject.org/docs/ Learn more about Yocto]
  
= Yocto Environment Setup =
+
= Docker Host for Yocto Build Environment =
Yocto host requirements are listed [https://www.yoctoproject.org/docs/3.0/brief-yoctoprojectqs/brief-yoctoprojectqs.html on the Yocto official site]
+
There are often compatibility issues between different Linux distributions and the dependencies required for Yocto compilation.<br>
Linux Distributions to be used on a host are listed [https://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#detailed-supported-distros ibid]
+
In order to avoid such issues and simplify the host machine configuration process, Compulab recommends using a pre-configured Docker environment.<br>
 
+
Please follow the instructions outlined in [https://github.com/compulab-yokneam/yocker Setting up Yocto Build Docker Environment].
In order to get NXP Yocto BSP building environment please issue the following commands. More detailed instructions can be found at [https://source.codeaurora.org/external/imx/imx-manifest/tree/README?h=imx-linux-zeus the NXP readme file]
 
<pre>repo init -u https://source.codeaurora.org/external/imx/imx-manifest  -b imx-linux-hardknott -m imx-5.10.35-2.0.0.xml
 
wget --directory-prefix .repo/manifests https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx8mm/rel_imx_5.10.35_2.0.0-stable/scripts/imx-5.10.35_2.0.0_compulab.xml
 
repo init -m imx-5.10.35_2.0.0_compulab.xml
 
repo sync
 
</pre>
 
The Compulab meta-layer consists of {{filename|meta-compulab}} directory, that provides support for UCM-iMX8M-Mini and other Compulab i.MX based machines and contains recipes for U-boot and Linux kernel.
 
 
 
= Image Building =
 
This section provides information about building UCM-iMX8M-Mini images.
 
 
 
==Create Build Environment==
 
:* Issue '''Compulab''' Setup Script:
 
<pre>export MACHINE=ucm-imx8m-mini
 
MACHINE=ucm-imx8m-mini DISTRO=fsl-imx-xwayland  source ./compulab-setup-env -b build-xwayland
 
</pre>
 
You will be asked regarding options of the image you are configuring.
 
 
 
== Building the Images ==
 
The Yocto Project build uses the {{parameter|bitbake}} command.
 
 
 
* To build a Compulab image with GUI use the command below:
 
<pre>bitbake -k compulab-ucm-imx8m-mini</pre>
 
* To build a minimal Linux image use the command below:
 
<pre>bitbake -k core-image-full-cmdline</pre>
 
 
 
* To re-build only the Linux kernel use the command below:
 
<pre>source setup-environment build-xwayland
 
bitbake -c cleansstate linux-imx
 
bitbake -k linux-imx
 
</pre>
 
* To re-build only the u-boot bootloader and boot image use the command below:
 
<pre>source setup-environment build-xwayland
 
bitbake -c cleansstate imx-boot u-boot-imx
 
bitbake -k imx-boot u-boot-imx
 
</pre>
 
 
 
==Installation==
 
The resulting images are located in the build directory: build-xwayland/tmp/deploy/images/${MACHINE}
 
{|class="wikitable"
 
|ucm-imx8m-mini.wic.bz2
 
|complete SD card image
 
|-
 
|ucm-imx8m-mini.tar.bz2
 
|root FS tree
 
|-
 
|imx-boot-ucm-imx8m-mini-sd.bin-flash_evk
 
|boot loader binary
 
|-
 
|Image
 
|kernel binary
 
|-
 
|modules-ucm-imx8m-mini.tgz
 
|kernel modules tree
 
|-
 
|ucm-imx8m-mini.dtb
 
|device tree binary
 
|}
 
  
 +
= Building Yocto Images =
 +
Set up the Yocto build environment and build the image as detailed in the [https://github.com/compulab-yokneam/meta-bsp-imx8mm/tree/rel_imx_5.10.35_2.0.0-stable/README.md Building UCM-iMX8M-Mini Yocto Linux Image] guide.
 +
<br>
 +
<br>
  
 
To deploy the built image follow the [[UCM-iMX8M-Mini:_Yocto_Linux:_Manual_Installation:_SD_card|SD card installation instructions]]
 
To deploy the built image follow the [[UCM-iMX8M-Mini:_Yocto_Linux:_Manual_Installation:_SD_card|SD card installation instructions]]
  
 +
<!--
 
=Building previous versions of UCM-iMX8M-Mini Yocto=
 
=Building previous versions of UCM-iMX8M-Mini Yocto=
  
Line 78: Line 28:
 
* [[Building_UCM-iMX8M-Mini_Yocto_Linux_images_r1.2|Building UCM-iMX8M-Mini Yocto r1.2]]
 
* [[Building_UCM-iMX8M-Mini_Yocto_Linux_images_r1.2|Building UCM-iMX8M-Mini Yocto r1.2]]
 
* [[Building_UCM-iMX8M-Mini_Yocto_Linux_images_r1.1|Building UCM-iMX8M-Mini Yocto r1.1]]
 
* [[Building_UCM-iMX8M-Mini_Yocto_Linux_images_r1.1|Building UCM-iMX8M-Mini Yocto r1.1]]
 
+
-->
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:Yocto]]
 
[[Category:Yocto]]
 
[[Category:UCM-iMX8M-Mini]]
 
[[Category:UCM-iMX8M-Mini]]

Revision as of 07:54, 4 June 2023

Overview

The Yocto Project is an open-source collaboration focused on embedded Linux development.
The purpose of this article is to show how to get Yocto Image with support for the UCM-iMX8M-Mini System-on-Module.

Host System Requirements

To ensure optimal Yocto build speed and performance, it is recommended to use a host system with at least 4 CPU cores, 16GB RAM, and 500GB of free disk space.
In addition, the system should have the option to open a large number of files simultaneously, preferably up to 4096 or higher.
Learn more about Yocto

Docker Host for Yocto Build Environment

There are often compatibility issues between different Linux distributions and the dependencies required for Yocto compilation.
In order to avoid such issues and simplify the host machine configuration process, Compulab recommends using a pre-configured Docker environment.
Please follow the instructions outlined in Setting up Yocto Build Docker Environment.

Building Yocto Images

Set up the Yocto build environment and build the image as detailed in the Building UCM-iMX8M-Mini Yocto Linux Image guide.

To deploy the built image follow the SD card installation instructions