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:sdk [2022-09-26 15:44] Moritz Lammerichsoftware:linux:yocto:sdk [2023-11-16 16:16] (aktuell) 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 30: Zeile 17:
 This will generate a toolchain with a sysroot containing all header/libraries/... included in the image. This will generate a toolchain with a sysroot containing all header/libraries/... included in the image.
 By default the SDK is in ''build/tmp/deploy/sdk/''. By default the SDK is in ''build/tmp/deploy/sdk/''.
 +
 +=== Changing the SDK HOST CPU Architecture ===
 +
 +By default, the SDK is built for ''x86_64'' host machines. That means you can use the SDK on x86_64 computers to build software for the target. If you want to use the SDK on another system such as the ARM based Apple Macbooks, the SDK host architecture needs to be specified accordingly. This is achieved through the ''SDKMACHINE'' variable.
 +To build the SDK for a 64bit ARM host (e.g. ARM based Apple computers), add the following to ''local.conf'':
 +<code>
 +SDKMACHINE = "aarch64"
 +</code>
  
 ==== Installing the SDK ==== ==== Installing the SDK ====
-The sdk can be built as described above or can be fetched from [[software:linux:images:start|Linux Images]]. Building the SDK will generate a few files. The most important one being a ''.sh'' script that is used to install the SDK.+The sdk can be built as described above or can be fetched from [[software:linux:images:start|Linux Images]]. It does do not need to be extracted any further. Building the SDK will generate a few files. The most important one being a ''.sh'' script that is used to install the SDK.
 For example, building the SDK yields: For example, building the SDK yields:
  
Zeile 90: Zeile 85:
 <code> <code>
 . path/to/sdk/environment-setup-aarch64-linux-<arch> . path/to/sdk/environment-setup-aarch64-linux-<arch>
-pushd path/to/sdk/sysroot/<arch>/usr/kernel+pushd path/to/sdk/sysroot/<arch>/usr/src/kernel
 make scripts make scripts
 make prepare make prepare