Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
software:linux:yocto:sdk [2020-05-19 12:13] – mlammerich | software:linux:yocto:sdk [2021-11-08 14:12] – Typo in bitbake CLI command populate_sdk Marco Fuchs | ||
---|---|---|---|
Zeile 16: | Zeile 16: | ||
===== Cross Development SDK ===== | ===== Cross Development SDK ===== | ||
+ | The most common way is to cross compile rather than compiling natively. | ||
+ | Yocto provides an SDK package that can be built for an image to match possible dependencies in the image. | ||
+ | |||
+ | ==== Building the SDK ==== | ||
run this command to generate a cross development SDK: | run this command to generate a cross development SDK: | ||
< | < | ||
- | bitbake <image name> -c poulate_sdk | + | bitbake <image name> -c populate_sdk |
# for example: | # for example: | ||
- | bitbake ntb-prod-image -c pouplate_sdk | + | bitbake ntb-prod-image -c populate_sdk |
</ | </ | ||
Zeile 27: | Zeile 31: | ||
By default the SDK is in '' | By default the SDK is in '' | ||
- | Buildig | + | ==== Installing the SDK ==== |
+ | The sdk can be built as described above or can be fetched from [[software: | ||
+ | For example, building the SDK yields: | ||
+ | |||
+ | < | ||
+ | poky-glibc-x86_64-ntb-dev-image-armv7at2hf-neon-bblue-toolchain-3.0.2.host.manifest | ||
+ | poky-glibc-x86_64-ntb-dev-image-armv7at2hf-neon-bblue-toolchain-3.0.2.sh | ||
+ | poky-glibc-x86_64-ntb-dev-image-armv7at2hf-neon-bblue-toolchain-3.0.2.target.manifest | ||
+ | poky-glibc-x86_64-ntb-dev-image-armv7at2hf-neon-bblue-toolchain-3.0.2.testdata.json | ||
+ | </ | ||
+ | |||
+ | Note that the file names include information about the image and hardware it was built for. | ||
+ | |||
+ | Installing the SDK is as simple as executing the shell script (e.g. '' | ||
+ | An example installation is shown below. | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | Poky (Yocto Project Reference Distro) SDK installer version 3.0.2 | ||
+ | ================================================================= | ||
+ | Enter target directory for SDK (default: / | ||
+ | You are about to install the SDK to "/ | ||
+ | Extracting SDK.......................................................................................done | ||
+ | Setting it up...done | ||
+ | SDK has been successfully set up and is ready to be used. | ||
+ | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. | ||
+ | $ . / | ||
+ | |||
+ | </ | ||
+ | |||
+ | There are two things of note: | ||
+ | The script will ask for a location to install the SDK to in case you do not want to install it to its default location. | ||
+ | Also the last line of output will tell you what script needs to be sourced in order to use the SDK (see below). | ||
+ | |||
+ | ==== Using the SDK ==== | ||
+ | |||
+ | The SDK includes a script that needs to be sourced in order to use the SDK. | ||
+ | This, among other things, sets up the standard environment variables (such as '' | ||
+ | |||
+ | The script is located in the SDK install directory and the install script tells you where to find it. | ||
+ | |||
+ | For the example above, the command is: | ||
+ | |||
+ | < | ||
+ | . / | ||
+ | </ | ||
+ | |||
+ | Note the space between '' | ||
+ | The script needs to be sourced rather than executed. | ||
+ | Now running any standard build system (eg '' | ||
=== Additional Information === | === Additional Information === | ||
[[ https:// | [[ https:// |