Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| software:linux:yocto:recipes [2022-09-27 08:43] – Urs Graf | software:linux:yocto:recipes [2023-06-13 10:19] (aktuell) – Urs Graf | ||
|---|---|---|---|
| Zeile 11: | Zeile 11: | ||
| Another example is libraries being split into '' | Another example is libraries being split into '' | ||
| - | ===== Life Cycle of a Recipe | + | ===== Tasks ===== |
| Each recipe undergoes multiple stages while being built: | Each recipe undergoes multiple stages while being built: | ||
| Zeile 24: | Zeile 24: | ||
| | package_qa | do_package_qa | perform sanity checks on package | | | package_qa | do_package_qa | perform sanity checks on package | | ||
| - | *: it seems '' | + | *: it seems that '' |
| Each of the listed functions is called when building the package, or can explicitly be invoked using | Each of the listed functions is called when building the package, or can explicitly be invoked using | ||
| Zeile 37: | Zeile 37: | ||
| ===== Anatomy of a Recipe ===== | ===== Anatomy of a Recipe ===== | ||
| - | In essence, a recipe needs provide 4 things: | + | In essence, a recipe needs to provide 4 things: |
| - | * where is source (code) | + | * where is the source (code) |
| * how to build it | * how to build it | ||
| * how/where to install it (in the image) | * how/where to install it (in the image) | ||
| Zeile 51: | Zeile 51: | ||
| Almost all recipes need some source code or other source from which to build the software. | Almost all recipes need some source code or other source from which to build the software. | ||
| In bitbake this step is called '' | In bitbake this step is called '' | ||
| - | Sources are specified by setting the '' | + | Sources are specified by setting the '' |
| For example, setting '' | For example, setting '' | ||
| There is a variety of fetchers available for downloading files from the internet or cloning git repositories and more. | There is a variety of fetchers available for downloading files from the internet or cloning git repositories and more. | ||
| - | Each has their own requirements and options, which can be found [[ https:// | + | Each has their own requirements and options, which can be found [[ https:// |
| < | < | ||
| Zeile 104: | Zeile 104: | ||
| </ | </ | ||
| - | For makefile based projects, see [[ https://www.yoctoproject.org/ | + | For makefile based projects, see [[ https://docs.yoctoproject.org/ |
| ==== Appending a Function ==== | ==== Appending a Function ==== | ||
| - | Sometimes it is necessary to perform extra steps for a particular | + | Sometimes it is necessary to perform extra steps for a particular |
| - | This can be achieved by appending custom commands to a function. | + | |
| - | The syntax for this is | + | |
| < | < | ||
| Zeile 129: | Zeile 127: | ||
| '' | '' | ||
| - | All destination paths must be relative to it to end up in the right place to be packaged (this is unique to do_install, the other functions should not need to acces '' | + | All destination paths must be relative to it to end up in the right place to be packaged (this is unique to do_install, the other functions should not need to access |
| ===== Creating a Recipe using devtool ===== | ===== Creating a Recipe using devtool ===== | ||
| [[ .:devtool ]] is a command line utility that comes with [[ .: | yocto ]] that can be used to facilitate development. | [[ .:devtool ]] is a command line utility that comes with [[ .: | yocto ]] that can be used to facilitate development. | ||
| - | One of the things it can be used for is semi-automatically creating recipes; using the following command: | + | One of the things it can be used for is semi-automatically creating recipes using the following command: |
| < | < | ||
| Zeile 155: | Zeile 153: | ||
| Manual creation of recipes may be required when [[ .:devtool | devtool ]] fails to automatically create one. | Manual creation of recipes may be required when [[ .:devtool | devtool ]] fails to automatically create one. | ||
| - | |||
| - | ==== < | ||
| === Adding a Recipe to the Layer === | === Adding a Recipe to the Layer === | ||
| - | As configured above, | + | '' |
| - | of '' | + | |
| < | < | ||
| DESCRIPTION = " | DESCRIPTION = " | ||
| - | SECTION = "ntb" | + | SECTION = "ost" |
| DEPENDS = "" | DEPENDS = "" | ||
| Zeile 181: | Zeile 176: | ||
| </ | </ | ||
| - | '' | + | '' |
| To add the new recipe to the build edit '' | To add the new recipe to the build edit '' | ||
| Zeile 207: | Zeile 202: | ||
| ==== Adding a kernel module ==== | ==== Adding a kernel module ==== | ||
| - | This part is an extension of the previous and assumes the '' | + | This part is an extension of the previous and assumes the '' |
| - | Create a new directory '' | + | Create a new directory '' |
| < | < | ||
| DESCRIPTION = "FPGA Loader Kernel Module" | DESCRIPTION = "FPGA Loader Kernel Module" | ||
| - | SECTION = "ntb" | + | SECTION = "ost" |
| DEPENDS = "" | DEPENDS = "" | ||