Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Nächste ÜberarbeitungBeide Seiten der Revision
software:linux:yocto:sdk [2022-05-24 16:36] Moritz Lammerichsoftware:linux:yocto:sdk [2022-09-29 11:37] Urs Graf
Zeile 1: Zeile 1:
-====== SDK'====== +====== SDK ======
- +
-===== Build Natively ===== +
- +
-This is the simplest but also least useful way to build packages for yocto. +
-By default, there is no toolchain installed in the image. +
- +
-To add the toolchain to an image, append ''tools-sdk'' to ''CORE_IMAGE_INSTALL''+
- +
-<code> +
-CORE_IMAGE_INSTALL_append  = " tools-sdk" +
-</code> +
- +
-Note that this will significantly increase image size and build time.+
  
 ===== Cross Development SDK ===== ===== Cross Development SDK =====
Zeile 81: Zeile 68:
 The script needs to be sourced rather than executed. The script needs to be sourced rather than executed.
 Now running any standard build system (eg ''make'') should pick up the cross compile settings and automatically build for the target platform. Now running any standard build system (eg ''make'') should pick up the cross compile settings and automatically build for the target platform.
 +
 +
 +==== Developing Kernel Modules ====
 +
 +When using [[meta-ost]], the SDK contains the kernel dev sources by default.
 +However, properly compiling an out of tree module requires some additional steps:
 +
 +<code>
 +. path/to/sdk/environment-setup-aarch64-linux-<arch>
 +pushd path/to/sdk/sysroot/<arch>/usr/kernel
 +make scripts
 +make prepare
 +</code>
 +
 +Source: {{ https://stackoverflow.com/questions/60923890/how-to-build-linux-kernel-module-using-yocto-sdk}}
 +
 +Note that depending on the location of the installed SDK, ''make scripts'' may encounter permission errors.
 +This has been observed when installing the SDK in ''/opt''.
 +The easiest way to work around this is installing the SDK in a location under the current user's home directory.
  
 === Additional Information === === Additional Information ===
  
 [[ https://www.youtube.com/watch?v=u1rzYRz83kc&t=3119s | Live Coding with Yocto Project #4: SDKs ]] [[ https://www.youtube.com/watch?v=u1rzYRz83kc&t=3119s | Live Coding with Yocto Project #4: SDKs ]]