RidgeRun Yocto Developer Guide/Yocto Main Concepts: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
 
Line 10: Line 10:
== Yocto Environment ==
== Yocto Environment ==


As mentioned before, Yocto Project is a conjunction of diferent components. The main idea of those components is to provide the user a set of tools and metada able to create a customized Linux based system. The main parts are described on the diagram below:  
As mentioned before, Yocto Project is a conjunction of diferent components. The main idea of those components is to provide the user with a set of tools and metadata that enables the creation of a customized Linux based system. The main parts are described in the diagram below:  


[[File:Yocto diagram.png|450px|thumb|center|Yocto componets diagram|alt=Yocto layers diagram]]
[[File:Yocto diagram.png|450px|thumb|center|Yocto components diagram|alt=Yocto layers diagram]]


== Concepts ==
== Concepts ==
To create a Yocto project there are several concepts the user must understand first before start developing on your platforms.
To create a Yocto project there are several concepts the user must understand first before they start developing on their platforms.


=== What is OpenEmbedded? ===
=== What is OpenEmbedded? ===


OpenEmbedded is a build system based on "Poky" which works as a task executor for the system. OpenEmbedded essentially have two components:  
OpenEmbedded is a build system based on "Poky" which works as a task executor for the system. OpenEmbedded essentially has two components:  


==== BitBake ====
==== BitBake ====
BitBake is a task execution engine that works through recipe interpreting the metadata to decide, run and execute the tasks. BitBake one the most important components of the Yocto Project, so it required an external maintenance from Yocto Project. There is a completely user manual about BitBake available [https://docs.yoctoproject.org/bitbake/2.8/bitbake-user-manual/bitbake-user-manual-intro.html#introduction BitBake User Manual]
BitBake is a task execution engine that works through recipes, interpreting the metadata to decide, run and execute the tasks. BitBake is one of the most important components of the Yocto Project, so it requires external maintenance from the Yocto Project. There is a comprehensive user manual about BitBake available here: [https://docs.yoctoproject.org/bitbake/2.8/bitbake-user-manual/bitbake-user-manual-intro.html#introduction BitBake User Manual]


==== OpenEmbedded-Core ====
==== OpenEmbedded-Core ====
Line 53: Line 53:
=== What is Metadata? ===
=== What is Metadata? ===


Metadata is the most basic data able to provide information about other data. The metadata is formed by instructions, definitions of values and modifications building files such as: configuration files, recipes, classes, etc. Here you can see a simple example of metadata describing a dummy Linux Kernel on the system:
Metadata is the most basic data able to provide information about other data. The metadata is formed by instructions, definitions of values and modifications to building files such as: configuration files, recipes, classes, etc. Here you can see a simple example of metadata describing a dummy Linux Kernel on the system:
<syntaxhighlight line lang=bash>
<syntaxhighlight line lang=bash>
SUMMARY = "Dummy Linux kernel"
SUMMARY = "Dummy Linux kernel"
Line 63: Line 63:


=== What is a recipe? ===
=== What is a recipe? ===
Recipes one of the most important parts of BitBake, which are files with the extension .bb. A recipe represents the most basic metadata file providing: descriptive information, dependencies, sources code fetching route, patches, configuration and compiling source code.  
Recipes are one of the most important parts of BitBake, they are files with the .bb extension. A recipe represents the most basic metadata providing: descriptive information, dependencies, fetching rules, patches, configuration and compilation instructions.  


Here you can see an example:
Here you can see an example:
Line 78: Line 78:


=== What is a Meta Layer? ===
=== What is a Meta Layer? ===
A Meta-Layer is a group of recipes, which are usually organized by categories depending on its functionality. The meta-layers follow the syntax '''meta-<layername>'''. On Poky project you can find the following meta-layers:
A Meta-Layer is a group of recipes, which are usually organized by categories depending on their functionality. The meta-layers follow the syntax '''meta-<layername>'''. In Poky, you can find the following meta-layers:
<syntaxhighlight line lang=bash>
<syntaxhighlight line lang=bash>
tree ~/yocto-test/poky/ -L 1 | grep meta
tree ~/yocto-test/poky/ -L 1 | grep meta