summaryrefslogtreecommitdiffstats
path: root/documentation/sdk-manual/using.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/sdk-manual/using.rst')
-rw-r--r--documentation/sdk-manual/using.rst153
1 files changed, 153 insertions, 0 deletions
diff --git a/documentation/sdk-manual/using.rst b/documentation/sdk-manual/using.rst
new file mode 100644
index 0000000000..29fb50465f
--- /dev/null
+++ b/documentation/sdk-manual/using.rst
@@ -0,0 +1,153 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3**********************
4Using the Standard SDK
5**********************
6
7This chapter describes the standard SDK and how to install it.
8Information includes unique installation and setup aspects for the
9standard SDK.
10
11.. note::
12
13 For a side-by-side comparison of main features supported for a
14 standard SDK as compared to an extensible SDK, see the "
15 Introduction
16 " section.
17
18You can use a standard SDK to work on Makefile and Autotools-based
19projects. See the "`Using the SDK Toolchain
20Directly <#sdk-working-projects>`__" chapter for more information.
21
22Why use the Standard SDK and What is in It?
23===========================================
24
25The Standard SDK provides a cross-development toolchain and libraries
26tailored to the contents of a specific image. You would use the Standard
27SDK if you want a more traditional toolchain experience as compared to
28the extensible SDK, which provides an internal build system and the
29``devtool`` functionality.
30
31The installed Standard SDK consists of several files and directories.
32Basically, it contains an SDK environment setup script, some
33configuration files, and host and target root filesystems to support
34usage. You can see the directory structure in the "`Installed Standard
35SDK Directory
36Structure <#sdk-installed-standard-sdk-directory-structure>`__" section.
37
38Installing the SDK
39==================
40
41The first thing you need to do is install the SDK on your :term:`Build
42Host` by running the ``*.sh`` installation script.
43
44You can download a tarball installer, which includes the pre-built
45toolchain, the ``runqemu`` script, and support files from the
46appropriate :yocto_dl:`toolchain </releases/yocto/yocto-&DISTRO;/toolchain/>` directory within
47the Index of Releases. Toolchains are available for several 32-bit and
4864-bit architectures with the ``x86_64`` directories, respectively. The
49toolchains the Yocto Project provides are based off the
50``core-image-sato`` and ``core-image-minimal`` images and contain
51libraries appropriate for developing against that image.
52
53The names of the tarball installer scripts are such that a string
54representing the host system appears first in the filename and then is
55immediately followed by a string representing the target architecture.
56::
57
58 poky-glibc-host_system-image_type-arch-toolchain-release_version.sh
59
60 Where:
61 host_system is a string representing your development system:
62
63 i686 or x86_64.
64
65 image_type is the image for which the SDK was built:
66
67 core-image-minimal or core-image-sato.
68
69 arch is a string representing the tuned target architecture:
70
71 aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon.
72
73 release_version is a string representing the release number of the Yocto Project:
74
75 &DISTRO;, &DISTRO;+snapshot
76
77For example, the following SDK installer is for a 64-bit
78development host system and a i586-tuned target architecture based off
79the SDK for ``core-image-sato`` and using the current DISTRO snapshot:
80::
81
82 poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh
83
84.. note::
85
86 As an alternative to downloading an SDK, you can build the SDK
87 installer. For information on building the installer, see the "
88 Building an SDK Installer
89 " section.
90
91The SDK and toolchains are self-contained and by default are installed
92into the ``poky_sdk`` folder in your home directory. You can choose to
93install the extensible SDK in any location when you run the installer.
94However, because files need to be written under that directory during
95the normal course of operation, the location you choose for installation
96must be writable for whichever users need to use the SDK.
97
98The following command shows how to run the installer given a toolchain
99tarball for a 64-bit x86 development host system and a 64-bit x86 target
100architecture. The example assumes the SDK installer is located in
101``~/Downloads/`` and has execution rights.
102
103.. note::
104
105 If you do not have write permissions for the directory into which you
106 are installing the SDK, the installer notifies you and exits. For
107 that case, set up the proper permissions in the directory and run the
108 installer again.
109
110::
111
112 $ ./Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
113 Poky (Yocto Project Reference Distro) SDK installer version &DISTRO;
114 ===============================================================
115 Enter target directory for SDK (default: /opt/poky/&DISTRO;):
116 You are about to install the SDK to "/opt/poky/&DISTRO;". Proceed [Y/n]? Y
117 Extracting SDK........................................ ..............................done
118 Setting it up...done
119 SDK has been successfully set up and is ready to be used.
120 Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
121 $ . /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
122
123Again, reference the "`Installed Standard SDK Directory
124Structure <#sdk-installed-standard-sdk-directory-structure>`__" section
125for more details on the resulting directory structure of the installed
126SDK.
127
128Running the SDK Environment Setup Script
129========================================
130
131Once you have the SDK installed, you must run the SDK environment setup
132script before you can actually use the SDK. This setup script resides in
133the directory you chose when you installed the SDK, which is either the
134default ``/opt/poky/&DISTRO;`` directory or the directory you chose during
135installation.
136
137Before running the script, be sure it is the one that matches the
138architecture for which you are developing. Environment setup scripts
139begin with the string "``environment-setup``" and include as part of
140their name the tuned target architecture. As an example, the following
141commands set the working directory to where the SDK was installed and
142then source the environment setup script. In this example, the setup
143script is for an IA-based target machine using i586 tuning:
144::
145
146 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
147
148When you run the
149setup script, the same environment variables are defined as are when you
150run the setup script for an extensible SDK. See the "`Running the
151Extensible SDK Environment Setup
152Script <#sdk-running-the-extensible-sdk-environment-setup-script>`__"
153section for more information.