Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
software:linux:yocto:layer [2022-09-27 09:17] Urs Grafsoftware:linux:yocto:layer [2023-06-14 10:54] (aktuell) Urs Graf
Zeile 1: Zeile 1:
 ====== Layers ====== ====== Layers ======
  
-Groups of recipes that belong together are grouped into layers. For example ''meta-ost'' is the layer that contains all the things needed to support the our needs for our linux images.+Groups of recipes that belong together are grouped into layers. For example [[software:linux:yocto:meta-ost|meta-ost]] is the layer that contains all the things needed to support the our needs for our linux images.
  
-===== Setting up the environment =====+===== Setting up the Environment =====
  
 First, set up a build environment. If in doubt, follow [[ software:linux:yocto:setup | Setting Up the Build Environment ]]. First, set up a build environment. If in doubt, follow [[ software:linux:yocto:setup | Setting Up the Build Environment ]].
 This guide will assume that the environment matches the one set up there. This guide will assume that the environment matches the one set up there.
  
-===== Creating a custom layer =====+===== Creating a Custom Layer =====
  
 To create a new layer, create a new directory in the ''yocto'' directory. Since this is the OST wiki, this guide will use ''meta-ost''. The directory name can be anything, but it should start with ''meta-''. Now change into that directory and create another folder called ''conf''. In ''conf'', create a file named ''layer.conf'' with the following content: To create a new layer, create a new directory in the ''yocto'' directory. Since this is the OST wiki, this guide will use ''meta-ost''. The directory name can be anything, but it should start with ''meta-''. Now change into that directory and create another folder called ''conf''. In ''conf'', create a file named ''layer.conf'' with the following content:
Zeile 23: Zeile 23:
 </code> </code>
  
-This file configures the layer and where to look for recipes. In this case it will look for a file in ''meta-ost/recipes-<some name>/<some other name>/<file name>.bb''. ''.bb'' is the file extension used by ''bitbake''. Finally, create a folder named ''recipes-ost'' inside ''meta-ost''. This folder will store all the recipes for this layer. The directory structure should now look like this:+This file configures the layer and where to look for recipes. In this case it will look for a file in ''meta-ost/recipes-<some name>/<some other name>/<file name>.bb''. ''.bb'' is the file extension used by ''bitbake''. Finally, create a folder named ''recipes-xyz'' inside ''meta-ost''. This folder will store all the recipes for this layer. The directory structure should now look like this:
  
   * meta-ost   * meta-ost
     * conf     * conf
       * layer.conf       * layer.conf
-      * recipes-ost+    * recipes-xyz
  
 Finally, add the new layer to the build by adding it to ''build/conf/bblayers.conf'' (see [[ software:linux:yocto:setup | here]] for more info) : Finally, add the new layer to the build by adding it to ''build/conf/bblayers.conf'' (see [[ software:linux:yocto:setup | here]] for more info) :
Zeile 39: Zeile 39:
 </code> </code>
  
-===== Adding machines =====+===== Adding Machines =====
  
 Machines are the way to go to set machine/hardware specific settings. Machines are the way to go to set machine/hardware specific settings.
Zeile 48: Zeile 48:
 Example: Example:
 <code> <code>
-DESCRIPTION = "Beckhoff CX2020 PLC"+DESCRIPTION = "generic x86_64 machine with RT kernel"
  
 require conf/machine/genericx86-64.conf require conf/machine/genericx86-64.conf
  
-PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-custom-rt" +PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" 
-KMACHINE_cx2020 = "qemux86-64" +KMACHINE_x86-rt = "qemux86-64" 
 +COMPATIBLE_MACHINE_x86-rt = "x86-rt"
 </code> </code>