IMX8/Nitrogen8M/Yocto/Building Yocto: Difference between revisions
m (Dchaverri moved page IMX8/Nitrogen8M/Building Yocto to IMX8/Nitrogen8M/Yocto/Building Yocto) |
mNo edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{IMX8/Head}}</noinclude> | <noinclude>{{IMX8/Head|previous=Nitrogen8M/Yocto|next=Nitrogen8M/Yocto/Installing an Image|metakeywords=carrier,carrier board,base board,SOM,System on Module,Boundary Devices,Nitrogen8M,Yocto Dependencies,configuration,Building,building yocto}}</noinclude> | ||
__TOC__ | __TOC__ | ||
Line 5: | Line 5: | ||
Nitrogen8M is supported by Yocto Thud. | Nitrogen8M is supported by Yocto Thud. | ||
=Dependencies= | ==Dependencies== | ||
Before running Yocto, install its dependencies with the following command. | Before running Yocto, install its dependencies with the following command. | ||
Line 19: | Line 19: | ||
'''NOTE:''' If you have some dependency errors, this could be the reason: [https://developer.ridgerun.com/wiki/index.php?title=Fix_broken_APT_after_JetPack_installation Broken APT due to ARM64 packages] | '''NOTE:''' If you have some dependency errors, this could be the reason: [https://developer.ridgerun.com/wiki/index.php?title=Fix_broken_APT_after_JetPack_installation Broken APT due to ARM64 packages] | ||
=Setting up Repo tool= | ==Setting up Repo tool== | ||
Yocto's meta-layers are configured through '''repo''' tool, install it as follows. | Yocto's meta-layers are configured through '''repo''' tool, install it as follows. | ||
Line 29: | Line 29: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=Getting Source Code= | ==Getting Source Code== | ||
The repo tool requires a repository as argument to download files, set Yocto as follows. | The repo tool requires a repository as an argument to download files, set Yocto as follows. | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
mkdir fsl-community-bsp | mkdir fsl-community-bsp | ||
cd fsl-community-bsp | cd fsl-community-bsp | ||
BRANCH= | BRANCH=thud | ||
repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b $BRANCH | repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b $BRANCH | ||
repo sync | repo sync | ||
Line 43: | Line 43: | ||
Actually (November 2018), the manifest file will set the host machine with Yocto Thud. | Actually (November 2018), the manifest file will set the host machine with Yocto Thud. | ||
=Configuration= | ==Configuration== | ||
Set host's environment variables and create default configuration files by running setup-environment script. | Set host's environment variables and create default configuration files by running setup-environment script. | ||
Actually (November | Actually (November 2018) '''only Wayland''' distro is supported. | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
Line 52: | Line 52: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
In the first run, DISTRO and MACHINE variables are stored in your default configuration files. | |||
In the second (or more) run with the same BUILD_DIR, the environment variables will be loaded from your previous configuration files. | |||
In other words, running the previous instructions again with other DISTRO and MACHINE will not change your DISTRO and MACHINE from your default configuration files. | In other words, running the previous instructions again with other DISTRO and MACHINE will not change your DISTRO and MACHINE from your default configuration files. | ||
If you need to change environment variables from a previous run, you '''must modify''' your default files at '''BUILD_DIR/conf'''. | If you need to change environment variables from a previous run, you '''must modify''' your default files at '''BUILD_DIR/conf'''. | ||
=Building= | ==Building== | ||
Keep in mind that the building can be configured with arguments, check the following tabla for more details. | Keep in mind that the building can be configured with arguments, check the following tabla for more details. | ||
Line 102: | Line 102: | ||
Other available images: | Other available images: | ||
#core-image-minimal | #core-image-minimal | ||
#core-image-full-cmdline | |||
#fsl-image-multimedia | #fsl-image-multimedia | ||
#fsl-image- | #fsl-image-multimedia-full | ||
#fsl-image- | #fsl-image-machine-test | ||
The images will be stored under the directory: '''<BUILD_DIR>/tmp/deploy/images/ | The images will be stored under the directory: '''<BUILD_DIR>/tmp/deploy/images/nitrogen8m''' | ||
<noinclude>{{IMX8/Foot|Nitrogen8M/ | <noinclude>{{IMX8/Foot|Nitrogen8M/Yocto|Nitrogen8M/Yocto/Installing an Image}}</noinclude> |
Latest revision as of 17:15, 9 March 2023
Nitrogen8M is supported by Yocto Thud.
Dependencies
Before running Yocto, install its dependencies with the following command.
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential \ chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping \ libsdl1.2-dev xterm autoconf libtool libglib2.0-dev python-git sed cvs subversion coreutils \ texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev \ libglu1-mesa-dev mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv \ libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev
NOTE: If you have some dependency errors, this could be the reason: Broken APT due to ARM64 packages
Setting up Repo tool
Yocto's meta-layers are configured through repo tool, install it as follows.
mkdir ~/bin curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo export PATH=~/bin:$PATH
Getting Source Code
The repo tool requires a repository as an argument to download files, set Yocto as follows.
mkdir fsl-community-bsp cd fsl-community-bsp BRANCH=thud repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b $BRANCH repo sync
This will download the latest manifest file for the most recent supported Yocto version. Actually (November 2018), the manifest file will set the host machine with Yocto Thud.
Configuration
Set host's environment variables and create default configuration files by running setup-environment script. Actually (November 2018) only Wayland distro is supported.
BUILD_DIR=build DISTRO=fslc-wayland MACHINE=nitrogen8m source setup-environment $BUILD_DIR
In the first run, DISTRO and MACHINE variables are stored in your default configuration files. In the second (or more) run with the same BUILD_DIR, the environment variables will be loaded from your previous configuration files. In other words, running the previous instructions again with other DISTRO and MACHINE will not change your DISTRO and MACHINE from your default configuration files. If you need to change environment variables from a previous run, you must modify your default files at BUILD_DIR/conf.
Building
Keep in mind that the building can be configured with arguments, check the following tabla for more details.
Option | Description |
---|---|
-c <task> | Execute specific task for the image or recipe. Some examples: fetch, compile, clean, cleansstate, package. |
-f | Force execution. |
-v | Verbose mode. |
-DDD | Enable debug information. |
-s | Show recipe version. |
-g <recipe> | Show dependency tree for the recipe. |
-c listtasks <image_or_recipe> | Show the tasks associated with a recipe or image. |
-k | keep running if an error appears. |
--help | Detailed help information. |
In order to build your image, run the next command:
IMAGE=fsl-image-multimedia-full OPTION=-k bitbake $IMAGE $OPTION
Other available images:
- core-image-minimal
- core-image-full-cmdline
- fsl-image-multimedia
- fsl-image-multimedia-full
- fsl-image-machine-test
The images will be stored under the directory: <BUILD_DIR>/tmp/deploy/images/nitrogen8m