diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-08-02 10:38:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-12 23:11:28 +0100 |
commit | 2ee595026628bacbb548ecfb4fd32698b1db0319 (patch) | |
tree | c9920b55950689baa6ddcb9eab64e4bb60bcd115 /documentation/sdk-manual | |
parent | ea613c8f70d5e87a6327d52d935b8646a8fe3077 (diff) | |
download | poky-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.rst | 14 | ||||
-rw-r--r-- | documentation/sdk-manual/appendix-obtain.rst | 18 | ||||
-rw-r--r-- | documentation/sdk-manual/extensible.rst | 66 | ||||
-rw-r--r-- | documentation/sdk-manual/working-projects.rst | 13 |
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 | *************************************************** |
4 | Customizing the Extensible SDK | 4 | Customizing the Extensible SDK standalone installer |
5 | ****************************** | 5 | *************************************************** |
6 | 6 | ||
7 | This appendix describes customizations you can apply to the extensible | 7 | This appendix describes customizations you can apply to the extensible |
8 | SDK. | 8 | SDK 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 | ||
10 | Configuring the Extensible SDK | 16 | Configuring 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 @@ | |||
4 | Obtaining the SDK | 4 | Obtaining the SDK |
5 | ***************** | 5 | ***************** |
6 | 6 | ||
7 | Working with the SDK components directly in a Yocto build | ||
8 | ========================================================= | ||
9 | |||
10 | Please refer to section | ||
11 | ":ref:`sdk-manual/extensible:Setting up the Extensible SDK environment directly in a Yocto build`" | ||
12 | |||
13 | Note that to use this feature effectively either a powerful build | ||
14 | machine, or a well-functioning sstate cache infrastructure is required: | ||
15 | otherwise significant time could be spent waiting for components to be built | ||
16 | by BitBake from source code. | ||
17 | |||
18 | Working with standalone SDK Installers | ||
19 | ====================================== | ||
20 | |||
7 | Locating Pre-Built SDK Installers | 21 | Locating Pre-Built SDK Installers |
8 | ================================= | 22 | --------------------------------- |
9 | 23 | ||
10 | You can use existing, pre-built toolchains by locating and running an | 24 | You can use existing, pre-built toolchains by locating and running an |
11 | SDK installer script that ships with the Yocto Project. Using this | 25 | SDK 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 | ||
74 | Building an SDK Installer | 88 | Building an SDK Installer |
75 | ========================= | 89 | ------------------------- |
76 | 90 | ||
77 | As an alternative to locating and downloading an SDK installer, you can | 91 | As an alternative to locating and downloading an SDK installer, you can |
78 | build the SDK installer. Follow these steps: | 92 | build 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. | |||
41 | Installing the Extensible SDK | 41 | Installing the Extensible SDK |
42 | ============================= | 42 | ============================= |
43 | 43 | ||
44 | Two ways to install the Extensible SDK | ||
45 | -------------------------------------- | ||
46 | |||
47 | Extensible SDK can be installed in two different ways, and both have | ||
48 | their own pros and cons: | ||
49 | |||
50 | 1. *Setting up the Extensible SDK environment directly in a Yocto build*. This | ||
51 | avoids having to produce, test, distribute and maintain separate SDK installer | ||
52 | archives, which can get very large. There is only one environment for the regular | ||
53 | Yocto build and the SDK and less code paths where things can go not according to plan. | ||
54 | It's easier to update the SDK: it simply means updating the Yocto layers with | ||
55 | git fetch or layer management tooling. The SDK extensibility is better than in the | ||
56 | second option: just run ``bitbake`` again to add more things to the sysroot, or add layers | ||
57 | if even more things are required. | ||
58 | |||
59 | 2. *Setting up the Extensible SDK from a standalone installer*. This has the benefit of | ||
60 | having a single, self-contained archive that includes all the needed binary artifacts. | ||
61 | So nothing needs to be rebuilt, and there is no need to provide a well-functioning | ||
62 | binary artefact cache over the network for developers with underpowered laptops. | ||
63 | |||
64 | Setting up the Extensible SDK environment directly in a Yocto build | ||
65 | ------------------------------------------------------------------- | ||
66 | |||
67 | 1. Set up all the needed layers and a Yocto build directory, e.g. a regular Yocto | ||
68 | build where ``bitbake`` can be executed. | ||
69 | |||
70 | 2. 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 | |||
77 | Setting up the Extensible SDK from a standalone installer | ||
78 | --------------------------------------------------------- | ||
79 | |||
44 | The first thing you need to do is install the SDK on your :term:`Build | 80 | The first thing you need to do is install the SDK on your :term:`Build |
45 | Host` by running the ``*.sh`` installation script. | 81 | Host` by running the ``*.sh`` installation script. |
46 | 82 | ||
@@ -136,7 +172,12 @@ Running the Extensible SDK Environment Setup Script | |||
136 | =================================================== | 172 | =================================================== |
137 | 173 | ||
138 | Once you have the SDK installed, you must run the SDK environment setup | 174 | Once you have the SDK installed, you must run the SDK environment setup |
139 | script before you can actually use the SDK. This setup script resides in | 175 | script before you can actually use the SDK. |
176 | |||
177 | When 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 | |||
180 | When using a standalone SDK installer, this setup script resides in | ||
140 | the directory you chose when you installed the SDK, which is either the | 181 | the directory you chose when you installed the SDK, which is either the |
141 | default ``poky_sdk`` directory or the directory you chose during | 182 | default ``poky_sdk`` directory or the directory you chose during |
142 | installation. | 183 | installation. |
@@ -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 | ||
198 | When using the environment script directly in a Yocto build, it can | ||
199 | be run similarly: | ||
200 | |||
201 | $ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux | ||
202 | |||
157 | Running the setup script defines many environment variables needed in | 203 | Running the setup script defines many environment variables needed in |
158 | order to use the SDK (e.g. ``PATH``, | 204 | order 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. | |||
1215 | You can use the following command to find out:: | 1261 | You 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 | |||
1266 | Once you know the recipe | ||
1267 | (i.e. ``mesa`` in this example), you can install it. | ||
1268 | |||
1269 | When using the extensible SDK directly in a Yocto build | ||
1270 | ------------------------------------------------------- | ||
1271 | |||
1272 | In this scenario, the Yocto build tooling, e.g. ``bitbake`` | ||
1273 | is directly accessible to build additional items, and it | ||
1274 | can simply be executed directly: | ||
1275 | |||
1276 | $ bitbake mesa | ||
1277 | $ bitbake populate-sysroots | ||
1218 | 1278 | ||
1219 | A free implementation of the OpenGL API Once you know the recipe | 1279 | When 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 | |||
91 | 3. *Create the configure Script:* Use the ``autoreconf`` command to | 96 | 3. *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 | |||
282 | 3. *Create the Makefile:* For this example, the Makefile contains | 291 | 3. *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 |