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/extensible.rst | |
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/extensible.rst')
-rw-r--r-- | documentation/sdk-manual/extensible.rst | 66 |
1 files changed, 63 insertions, 3 deletions
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 | ||