Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
software:linux:yocto:setup [2021-10-27 17:30] – Urs Graf | software:linux:yocto:setup [2024-04-23 13:06] (aktuell) – Moritz Lammerich | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
===== Supported Operating Systems ===== | ===== Supported Operating Systems ===== | ||
- | [[ https://www.yoctoproject.org/docs/3.0/ | + | [[ https://docs.yoctoproject.org/ |
- | * 50 Gbytes of free disk space | ||
- | | + | |
+ | * At least 90 Gbytes of free disk space, though much more will help to run multiple builds and increase performance by reusing build artifacts. | ||
+ | |||
+ | * At least 8 Gbytes of RAM, though a modern modern build host with as much RAM and as many CPU cores as possible is strongly recommended to maximize build performance. | ||
+ | |||
+ | | ||
* Git 1.8.3.1 or greater | * Git 1.8.3.1 or greater | ||
- | * tar 1.27 or greater | + | * tar 1.28 or greater |
+ | |||
+ | * Python 3.8.0 or greater. | ||
+ | |||
+ | * gcc 8.0 or greater. | ||
+ | |||
+ | * GNU make 4.0 or greater | ||
- | * Python 3.4.0 or greater. | ||
**Note that Yocto is not compatible with the Windows Subsystem for Linux (WSL)** | **Note that Yocto is not compatible with the Windows Subsystem for Linux (WSL)** | ||
Zeile 19: | Zeile 28: | ||
===== Download ===== | ===== Download ===== | ||
- | Everything | + | Everything |
This guide will assume that everything related to the build will live in a directory called '' | This guide will assume that everything related to the build will live in a directory called '' | ||
Zeile 28: | Zeile 37: | ||
</ | </ | ||
- | Where < | + | Where < |
Note that while checking out a branch also works, checking out a particular tag is recommended to produce reproducible builds. | Note that while checking out a branch also works, checking out a particular tag is recommended to produce reproducible builds. | ||
Check [[ http:// | Check [[ http:// | ||
- | ===== Set up ====== | + | ===== Setup ====== |
Bitbake, yocto' | Bitbake, yocto' | ||
Zeile 76: | Zeile 85: | ||
Often it is necessary to add further layers to the build to customize the resulting image, or build for specific hardware (a specific '' | Often it is necessary to add further layers to the build to customize the resulting image, or build for specific hardware (a specific '' | ||
- | For example, to use the NTB/OST images, the [[ meta-ost ]] layers need to be added to the build. | + | For example, to use the OST images, the [[ meta-ost ]] layers need to be added to the build. |
While layers can be included from any directory, it makes sense to keep all the layers in one place. In this case they will be kept in the parent directory, next to the '' | While layers can be included from any directory, it makes sense to keep all the layers in one place. In this case they will be kept in the parent directory, next to the '' | ||
Zeile 86: | Zeile 95: | ||
# clone layers | # clone layers | ||
git clone git:// | git clone git:// | ||
- | git clone https:// | + | git clone https:// |
</ | </ | ||
- | Note that many layer repositories will have different branches for different yocto releases. For example, meta-openembedded has a '' | + | Note that many layer repositories will have different branches for different yocto releases. For example, meta-openembedded has a '' |
===== Build Configuration ===== | ===== Build Configuration ===== | ||
- | When running '' | + | When running '' |
This folder contains two files: '' | This folder contains two files: '' | ||
Zeile 101: | Zeile 110: | ||
If additional layers are needed, they need to be added to the list for bitbake to find them and their recipes. | If additional layers are needed, they need to be added to the list for bitbake to find them and their recipes. | ||
- | This is the place to add the path to the custom layers that were '' | + | This is the place to add the path to the custom layers that were '' |
Some repositories such as [[ meta-ost ]] contain multiple layers. | Some repositories such as [[ meta-ost ]] contain multiple layers. | ||
- | In these cases each layers must be added seperately. | + | In these cases each layers must be added separately. |
- | For example, '' | + | For example, '' |
< | < | ||
Zeile 114: | Zeile 123: | ||
/ | / | ||
/ | / | ||
- | / | ||
" | " | ||
</ | </ | ||
+ | The paths of the entries above must match your actual paths. | ||
==== local.conf ==== | ==== local.conf ==== | ||
Zeile 132: | Zeile 141: | ||
< | < | ||
MACHINE = "< | MACHINE = "< | ||
- | DISTRO = "ost-distro" | + | DISTRO = "ost-devel" |
</ | </ | ||
- | Additionally, | + | This will build a development image. If you would rather |
- | A development image can be built by adding | + | The difference between the 2 distro's are documented in the " |
- | Otherwise (including | + | |
- | ===== Runnning | + | === Internal Mirrors |
+ | |||
+ | |||
+ | Bitbake has the ability to use external mirrors both for downloading package sources and the shared state cache (sstate-cache) to speed up builds. | ||
+ | |||
+ | The downloads and sstate-cache generated by the CI builds for [[meta-ost]] are provided internally. | ||
+ | |||
+ | OST INTERNAL ONLY: To configure bitbake to use the internal mirror, check {{ https:// | ||
+ | |||
+ | ===== Running | ||
Packages and images can be built by running '' | Packages and images can be built by running '' | ||
Zeile 146: | Zeile 163: | ||
< | < | ||
- | bitbake | + | bitbake |
</ | </ | ||
Zeile 157: | Zeile 174: | ||
'' | '' | ||
In this case that command is '' | In this case that command is '' | ||
+ | |||
+ | Results will be placed in '' |