summaryrefslogtreecommitdiffstats
path: root/documentation/sdk-manual
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-08-02 10:38:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-12 23:11:28 +0100
commit2ee595026628bacbb548ecfb4fd32698b1db0319 (patch)
treec9920b55950689baa6ddcb9eab64e4bb60bcd115 /documentation/sdk-manual
parentea613c8f70d5e87a6327d52d935b8646a8fe3077 (diff)
downloadpoky-2ee595026628bacbb548ecfb4fd32698b1db0319.tar.gz
sdk-manual: describe how to use extensible SDK functionality directly in a Yocto build
(From yocto-docs rev: 7e1b2e4238c2260fd74295dd208ec774e0e6bf68) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/sdk-manual')
-rw-r--r--documentation/sdk-manual/appendix-customizing.rst14
-rw-r--r--documentation/sdk-manual/appendix-obtain.rst18
-rw-r--r--documentation/sdk-manual/extensible.rst66
-rw-r--r--documentation/sdk-manual/working-projects.rst13
4 files changed, 100 insertions, 11 deletions
diff --git a/documentation/sdk-manual/appendix-customizing.rst b/documentation/sdk-manual/appendix-customizing.rst
index 9a76cc59d6..23a437eb9d 100644
--- a/documentation/sdk-manual/appendix-customizing.rst
+++ b/documentation/sdk-manual/appendix-customizing.rst
@@ -1,11 +1,17 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK 1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2 2
3****************************** 3***************************************************
4Customizing the Extensible SDK 4Customizing the Extensible SDK standalone installer
5****************************** 5***************************************************
6 6
7This appendix describes customizations you can apply to the extensible 7This appendix describes customizations you can apply to the extensible
8SDK. 8SDK when using in the standalone installer version.
9
10.. note::
11
12 It is also possible to use the Extensible SDK functionality directly in a
13 Yocto build, avoiding separate installer artefacts. Please refer to
14 ":ref:`sdk-manual/extensible:Installing the Extensible SDK`"
9 15
10Configuring the Extensible SDK 16Configuring the Extensible SDK
11============================== 17==============================
diff --git a/documentation/sdk-manual/appendix-obtain.rst b/documentation/sdk-manual/appendix-obtain.rst
index ece378c75e..7a09a83af8 100644
--- a/documentation/sdk-manual/appendix-obtain.rst
+++ b/documentation/sdk-manual/appendix-obtain.rst
@@ -4,8 +4,22 @@
4Obtaining the SDK 4Obtaining the SDK
5***************** 5*****************
6 6
7Working with the SDK components directly in a Yocto build
8=========================================================
9
10Please refer to section
11":ref:`sdk-manual/extensible:Setting up the Extensible SDK environment directly in a Yocto build`"
12
13Note that to use this feature effectively either a powerful build
14machine, or a well-functioning sstate cache infrastructure is required:
15otherwise significant time could be spent waiting for components to be built
16by BitBake from source code.
17
18Working with standalone SDK Installers
19======================================
20
7Locating Pre-Built SDK Installers 21Locating Pre-Built SDK Installers
8================================= 22---------------------------------
9 23
10You can use existing, pre-built toolchains by locating and running an 24You can use existing, pre-built toolchains by locating and running an
11SDK installer script that ships with the Yocto Project. Using this 25SDK installer script that ships with the Yocto Project. Using this
@@ -72,7 +86,7 @@ Follow these steps to locate and hand-install the toolchain:
72 section for more information. 86 section for more information.
73 87
74Building an SDK Installer 88Building an SDK Installer
75========================= 89-------------------------
76 90
77As an alternative to locating and downloading an SDK installer, you can 91As an alternative to locating and downloading an SDK installer, you can
78build the SDK installer. Follow these steps: 92build the SDK installer. Follow these steps:
diff --git a/documentation/sdk-manual/extensible.rst b/documentation/sdk-manual/extensible.rst
index ed9e43a2d8..0df6519b8e 100644
--- a/documentation/sdk-manual/extensible.rst
+++ b/documentation/sdk-manual/extensible.rst
@@ -41,6 +41,42 @@ functionality.
41Installing the Extensible SDK 41Installing the Extensible SDK
42============================= 42=============================
43 43
44Two ways to install the Extensible SDK
45--------------------------------------
46
47Extensible SDK can be installed in two different ways, and both have
48their own pros and cons:
49
501. *Setting up the Extensible SDK environment directly in a Yocto build*. This
51avoids having to produce, test, distribute and maintain separate SDK installer
52archives, which can get very large. There is only one environment for the regular
53Yocto build and the SDK and less code paths where things can go not according to plan.
54It's easier to update the SDK: it simply means updating the Yocto layers with
55git fetch or layer management tooling. The SDK extensibility is better than in the
56second option: just run ``bitbake`` again to add more things to the sysroot, or add layers
57if even more things are required.
58
592. *Setting up the Extensible SDK from a standalone installer*. This has the benefit of
60having a single, self-contained archive that includes all the needed binary artifacts.
61So nothing needs to be rebuilt, and there is no need to provide a well-functioning
62binary artefact cache over the network for developers with underpowered laptops.
63
64Setting up the Extensible SDK environment directly in a Yocto build
65-------------------------------------------------------------------
66
671. Set up all the needed layers and a Yocto build directory, e.g. a regular Yocto
68 build where ``bitbake`` can be executed.
69
702. Run:
71 $ bitbake meta-ide-support
72 $ bitbake -c populate_sysroot gtk+3
73 (or any other target or native item that the application developer would need)
74 $ bitbake populate-sysroots
75
76
77Setting up the Extensible SDK from a standalone installer
78---------------------------------------------------------
79
44The first thing you need to do is install the SDK on your :term:`Build 80The first thing you need to do is install the SDK on your :term:`Build
45Host` by running the ``*.sh`` installation script. 81Host` by running the ``*.sh`` installation script.
46 82
@@ -136,7 +172,12 @@ Running the Extensible SDK Environment Setup Script
136=================================================== 172===================================================
137 173
138Once you have the SDK installed, you must run the SDK environment setup 174Once you have the SDK installed, you must run the SDK environment setup
139script before you can actually use the SDK. This setup script resides in 175script before you can actually use the SDK.
176
177When using a SDK directly in a Yocto build, you will find the script in
178``tmp/deploy/images/qemux86-64/`` in your build directory.
179
180When using a standalone SDK installer, this setup script resides in
140the directory you chose when you installed the SDK, which is either the 181the directory you chose when you installed the SDK, which is either the
141default ``poky_sdk`` directory or the directory you chose during 182default ``poky_sdk`` directory or the directory you chose during
142installation. 183installation.
@@ -154,6 +195,11 @@ script is for an IA-based target machine using i586 tuning::
154 SDK environment now set up; additionally you may now run devtool to perform development tasks. 195 SDK environment now set up; additionally you may now run devtool to perform development tasks.
155 Run devtool --help for further details. 196 Run devtool --help for further details.
156 197
198When using the environment script directly in a Yocto build, it can
199be run similarly:
200
201 $ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
202
157Running the setup script defines many environment variables needed in 203Running the setup script defines many environment variables needed in
158order to use the SDK (e.g. ``PATH``, 204order to use the SDK (e.g. ``PATH``,
159:term:`CC`, 205:term:`CC`,
@@ -1215,9 +1261,23 @@ need to link to libGL but you are not sure which recipe provides libGL.
1215You can use the following command to find out:: 1261You can use the following command to find out::
1216 1262
1217 $ devtool search libGL mesa 1263 $ devtool search libGL mesa
1264 A free implementation of the OpenGL API
1265
1266Once you know the recipe
1267(i.e. ``mesa`` in this example), you can install it.
1268
1269When using the extensible SDK directly in a Yocto build
1270-------------------------------------------------------
1271
1272In this scenario, the Yocto build tooling, e.g. ``bitbake``
1273is directly accessible to build additional items, and it
1274can simply be executed directly:
1275
1276 $ bitbake mesa
1277 $ bitbake populate-sysroots
1218 1278
1219A free implementation of the OpenGL API Once you know the recipe 1279When using a standalone installer for the Extensible SDK
1220(i.e. ``mesa`` in this example), you can install it:: 1280--------------------------------------------------------
1221 1281
1222 $ devtool sdk-install mesa 1282 $ devtool sdk-install mesa
1223 1283
diff --git a/documentation/sdk-manual/working-projects.rst b/documentation/sdk-manual/working-projects.rst
index 7f8d9b8491..91d8d6ad93 100644
--- a/documentation/sdk-manual/working-projects.rst
+++ b/documentation/sdk-manual/working-projects.rst
@@ -88,9 +88,13 @@ project:
88 88
89 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux 89 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
90 90
91 Another example is sourcing the environment setup directly in a Yocto
92 build::
93
94 $ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
95
913. *Create the configure Script:* Use the ``autoreconf`` command to 963. *Create the configure Script:* Use the ``autoreconf`` command to
92 generate the ``configure`` script. 97 generate the ``configure`` script::
93 ::
94 98
95 $ autoreconf 99 $ autoreconf
96 100
@@ -279,6 +283,11 @@ example:
279 283
280 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux 284 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
281 285
286 Another example is sourcing the environment setup directly in a Yocto
287 build::
288
289 $ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
290
2823. *Create the Makefile:* For this example, the Makefile contains 2913. *Create the Makefile:* For this example, the Makefile contains
283 two lines that can be used to set the :term:`CC` variable. One line is 292 two lines that can be used to set the :term:`CC` variable. One line is
284 identical to the value that is set when you run the SDK environment 293 identical to the value that is set when you run the SDK environment