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:devtool [2021-11-29 11:08] Marco Fuchssoftware:linux:yocto:devtool [2023-11-16 15:23] (aktuell) Urs Graf
Zeile 2: Zeile 2:
  
 ''devtool'' is a helper program for adding and modifying recipes in yocto. ''devtool'' is a helper program for adding and modifying recipes in yocto.
-It is available as part of the yocto build environment either through setting up a [[ setup | full yocto build environment ]] or through the [[ sdk extensible SDK ]].+It is available as part of the yocto build environment either through setting up a full yocto build environment, see [[ setup | Setup and Building ]] or through the [[ sdks#extensible_sdk Extensible SDK]].
  
-Upon invoking ''devtool'', it creates a workspace layer inside the ''build'' directory to store any and all new recipes and modifications to existing ones. +Invoking ''devtool'' creates a workspace layer inside the ''build'' directory to store new recipes and modifications to existing ones. 
-The workspace also includes the sources for all recipes touched by ''devtool'', so that they can easily be modified and persist through cleaning actions such as ''bitbake -c cleanall''.+The workspace also includes the sources for all recipes touched by ''devtool'', so that they can easily be modified and persist through cleaning actions such as ''bitbake -c cleanall''. When using a [[sdks#extensible_sdk|Extensible SDK]] the workspace is directly created within it.
  
 Furthermore, ''devtool'' allows for easy creation of patches, at least when used with sources from a ''git'' repository. Furthermore, ''devtool'' allows for easy creation of patches, at least when used with sources from a ''git'' repository.
Zeile 12: Zeile 12:
  
 ==== devtool add ==== ==== devtool add ====
 +You can add your own sources and automatically create recipes as given in [[https://docs.yoctoproject.org/sdk-manual/extensible.html#use-devtool-add-to-add-an-application|Add an Application]]. 
 +<code text>
 +devtool add <recipe> <srctree>
 +</code>
  
 ==== devtool modify ==== ==== devtool modify ====
Zeile 21: Zeile 25:
  
 ==== devtool reset ==== ==== devtool reset ====
-Use the ''devtool reset'' command to remove a recipe and its configuration (e.g. the corresponding .bbappend file) from the workspace layer. From now on the image is build with the default repository linked in the recipe.+Use the ''devtool reset'' command to remove a recipe and its configuration (e.g. the corresponding .bbappend file) from the workspace layer. From now on the image is build with the default repository linked in the recipe. Specify the recipe you want to reset: 
 + 
 +<code text> 
 +devtool reset <recipe> 
 +</code>
  
 ==== devtool menuconfig ==== ==== devtool menuconfig ====
 +Use the ''devtool menuconfig'' command to change the kernel configuration. 
 +<code text>
 +devtool menuconfig <kernel-recipe>
 +</code>
  
 ==== devtool  finish ==== ==== devtool  finish ====
 +Allow to complete the development done through devtool by updating layer(s) with the work done. Pushes any committed changes to the specified recipe to the specified layer and removes it from your workspace.
 +<code text>
 +devtool finish <recipe> <layer/path>
 +</code>
  
 ==== devtool build-image ==== ==== devtool build-image ====
Zeile 33: Zeile 49:
 devtool build-image <image> devtool build-image <image>
 </code> </code>
 +The output tells in which directory the new image was created.
  
 +==== devtool build ====
 +If the change affects only one or a few recipes, you can build this recipes individually with:
  
 +<code text>
 +devtool build <recipe>
  
 +# for example:
 +devtool build ethercattest 
 +</code>
  
 +==== devtool deploy-target ====
 +The recipe changes described above can be deployed directly to the target machine using the following command:
 +
 +<code text>
 +devtool deploy-target <recipe> <target>
 +
 +# for example:
 +devtool deploy-target ethercattest root@146.136.37.133
 +</code>
 +
 +===== Use Cases =====
 +  - Modify the device tree of the kernel and put the changes into its own layer <code text>
 +# build image for [[software:linux:yocto:bblue|Beaglebone Blue]]
 +# alter device tree in build/workspace/sources/linux-stable-rcn-ee/arch/arm/boot/dts
 +# commit changes
 +$ bitbake-layers create-layer ../meta-bsc-os
 +$ bitbake-layers add-layer ../meta-bsc-os
 +$ devtool finish -f linux-stable-rcn-ee ../meta-bsc-os/
 +</code> This creates layer with suitable recipe and adds the new layer to the local //bblayers.conf// file.
 +  - Repository of used library has new commit. How can you force yocto to fetch the new commit and rebuild the image? Simply, change the source reference in the recipe, e.g. <code text>
 +#SRCREV = "master"
 +SRCREV = "bcaf4bfb775b207d5e1e7b8340235050832345f4"
 +</code>