Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 3 | *************************************************** |
| 4 | Customizing the Extensible SDK standalone installer |
| 5 | *************************************************** |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 6 | |
| 7 | This appendix describes customizations you can apply to the extensible |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 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`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 15 | |
| 16 | Configuring the Extensible SDK |
| 17 | ============================== |
| 18 | |
| 19 | The extensible SDK primarily consists of a pre-configured copy of the |
| 20 | OpenEmbedded build system from which it was produced. Thus, the SDK's |
| 21 | configuration is derived using that build system and the filters shown |
| 22 | in the following list. When these filters are present, the OpenEmbedded |
| 23 | build system applies them against ``local.conf`` and ``auto.conf``: |
| 24 | |
| 25 | - Variables whose values start with "/" are excluded since the |
| 26 | assumption is that those values are paths that are likely to be |
| 27 | specific to the :term:`Build Host`. |
| 28 | |
| 29 | - Variables listed in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 30 | :term:`ESDK_LOCALCONF_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 31 | are excluded. These variables are not allowed through from the |
| 32 | OpenEmbedded build system configuration into the extensible SDK |
| 33 | configuration. Typically, these variables are specific to the machine |
| 34 | on which the build system is running and could be problematic as part |
| 35 | of the extensible SDK configuration. |
| 36 | |
| 37 | For a list of the variables excluded by default, see the |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 38 | :term:`ESDK_LOCALCONF_REMOVE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 39 | in the glossary of the Yocto Project Reference Manual. |
| 40 | |
| 41 | - Variables listed in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 42 | :term:`ESDK_LOCALCONF_ALLOW` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 43 | are included. Including a variable in the value of |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 44 | :term:`ESDK_LOCALCONF_ALLOW` overrides either of the previous two |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 45 | filters. The default value is blank. |
| 46 | |
| 47 | - Classes inherited globally with |
| 48 | :term:`INHERIT` that are listed in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 49 | :term:`ESDK_CLASS_INHERIT_DISABLE` |
| 50 | are disabled. Using :term:`ESDK_CLASS_INHERIT_DISABLE` to disable these |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 51 | classes is the typical method to disable classes that are problematic |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 52 | or unnecessary in the SDK context. The default value disables the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 53 | :ref:`buildhistory <ref-classes-buildhistory>` |
| 54 | and :ref:`icecc <ref-classes-icecc>` classes. |
| 55 | |
| 56 | Additionally, the contents of ``conf/sdk-extra.conf``, when present, are |
| 57 | appended to the end of ``conf/local.conf`` within the produced SDK, |
| 58 | without any filtering. The ``sdk-extra.conf`` file is particularly |
| 59 | useful if you want to set a variable value just for the SDK and not the |
| 60 | OpenEmbedded build system used to create the SDK. |
| 61 | |
| 62 | Adjusting the Extensible SDK to Suit Your Build Host's Setup |
| 63 | ============================================================ |
| 64 | |
| 65 | In most cases, the extensible SDK defaults should work with your :term:`Build |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 66 | Host`'s setup. However, there are cases when you might consider making |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 67 | adjustments: |
| 68 | |
| 69 | - If your SDK configuration inherits additional classes using the |
| 70 | :term:`INHERIT` variable and you |
| 71 | do not need or want those classes enabled in the SDK, you can |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 72 | disable them by adding them to the :term:`ESDK_CLASS_INHERIT_DISABLE` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 73 | variable as described in the previous section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 74 | |
| 75 | .. note:: |
| 76 | |
| 77 | The default value of |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 78 | ESDK_CLASS_INHERIT_DISABLE |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 79 | is set using the "?=" operator. Consequently, you will need to |
| 80 | either define the entire list by using the "=" operator, or you |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 81 | will need to append a value using either ":append" or the "+=" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 82 | operator. You can learn more about these operators in the |
| 83 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" |
| 84 | section of the BitBake User Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 85 | |
| 86 | - If you have classes or recipes that add additional tasks to the |
| 87 | standard build flow (i.e. the tasks execute as the recipe builds as |
| 88 | opposed to being called explicitly), then you need to do one of the |
| 89 | following: |
| 90 | |
| 91 | - After ensuring the tasks are :ref:`shared |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 92 | state <overview-manual/concepts:shared state cache>` tasks (i.e. the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 93 | output of the task is saved to and can be restored from the shared |
| 94 | state cache) or ensuring the tasks are able to be produced quickly |
| 95 | from a task that is a shared state task, add the task name to the |
| 96 | value of |
| 97 | :term:`SDK_RECRDEP_TASKS`. |
| 98 | |
| 99 | - Disable the tasks if they are added by a class and you do not need |
| 100 | the functionality the class provides in the extensible SDK. To |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 101 | disable the tasks, add the class to the :term:`ESDK_CLASS_INHERIT_DISABLE` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 102 | variable as described in the previous section. |
| 103 | |
| 104 | - Generally, you want to have a shared state mirror set up so users of |
| 105 | the SDK can add additional items to the SDK after installation |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 106 | without needing to build the items from source. See the |
| 107 | ":ref:`sdk-manual/appendix-customizing:providing additional installable extensible sdk content`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 108 | section for information. |
| 109 | |
| 110 | - If you want users of the SDK to be able to easily update the SDK, you |
| 111 | need to set the |
| 112 | :term:`SDK_UPDATE_URL` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 113 | variable. For more information, see the |
| 114 | ":ref:`sdk-manual/appendix-customizing:providing updates to the extensible sdk after installation`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 115 | section. |
| 116 | |
| 117 | - If you have adjusted the list of files and directories that appear in |
| 118 | :term:`COREBASE` (other than |
| 119 | layers that are enabled through ``bblayers.conf``), then you must |
| 120 | list these files in |
| 121 | :term:`COREBASE_FILES` so |
| 122 | that the files are copied into the SDK. |
| 123 | |
| 124 | - If your OpenEmbedded build system setup uses a different environment |
| 125 | setup script other than |
| 126 | :ref:`structure-core-script`, then you must |
| 127 | set |
| 128 | :term:`OE_INIT_ENV_SCRIPT` |
| 129 | to point to the environment setup script you use. |
| 130 | |
| 131 | .. note:: |
| 132 | |
| 133 | You must also reflect this change in the value used for the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 134 | :term:`COREBASE_FILES` variable as previously described. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 135 | |
| 136 | Changing the Extensible SDK Installer Title |
| 137 | =========================================== |
| 138 | |
| 139 | You can change the displayed title for the SDK installer by setting the |
| 140 | :term:`SDK_TITLE` variable and then |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 141 | rebuilding the SDK installer. For information on how to build an SDK |
| 142 | installer, see the ":ref:`sdk-manual/appendix-obtain:building an sdk installer`" |
| 143 | section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 144 | |
| 145 | By default, this title is derived from |
| 146 | :term:`DISTRO_NAME` when it is |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 147 | set. If the :term:`DISTRO_NAME` variable is not set, the title is derived |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 148 | from the :term:`DISTRO` variable. |
| 149 | |
| 150 | The |
| 151 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 152 | class defines the default value of the :term:`SDK_TITLE` variable as |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 153 | follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 154 | |
| 155 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
| 156 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 157 | While there are several ways of changing this variable, an efficient method is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 158 | to set the variable in your distribution's configuration file. Doing so |
| 159 | creates an SDK installer title that applies across your distribution. As |
| 160 | an example, assume you have your own layer for your distribution named |
| 161 | "meta-mydistro" and you are using the same type of file hierarchy as |
| 162 | does the default "poky" distribution. If so, you could update the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 163 | :term:`SDK_TITLE` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 164 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 165 | form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 166 | |
| 167 | SDK_TITLE = "your_title" |
| 168 | |
| 169 | Providing Updates to the Extensible SDK After Installation |
| 170 | ========================================================== |
| 171 | |
| 172 | When you make changes to your configuration or to the metadata and if |
| 173 | you want those changes to be reflected in installed SDKs, you need to |
| 174 | perform additional steps. These steps make it possible for anyone using |
| 175 | the installed SDKs to update the installed SDKs by using the |
| 176 | ``devtool sdk-update`` command: |
| 177 | |
| 178 | 1. Create a directory that can be shared over HTTP or HTTPS. You can do |
| 179 | this by setting up a web server such as an `Apache HTTP |
| 180 | Server <https://en.wikipedia.org/wiki/Apache_HTTP_Server>`__ or |
| 181 | `Nginx <https://en.wikipedia.org/wiki/Nginx>`__ server in the cloud |
| 182 | to host the directory. This directory must contain the published SDK. |
| 183 | |
| 184 | 2. Set the |
| 185 | :term:`SDK_UPDATE_URL` |
| 186 | variable to point to the corresponding HTTP or HTTPS URL. Setting |
| 187 | this variable causes any SDK built to default to that URL and thus, |
| 188 | the user does not have to pass the URL to the ``devtool sdk-update`` |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 189 | command as described in the |
| 190 | ":ref:`sdk-manual/extensible:applying updates to an installed extensible sdk`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 191 | section. |
| 192 | |
| 193 | 3. Build the extensible SDK normally (i.e., use the |
| 194 | ``bitbake -c populate_sdk_ext`` imagename command). |
| 195 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 196 | 4. Publish the SDK using the following command:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 197 | |
| 198 | $ oe-publish-sdk some_path/sdk-installer.sh path_to_shared_http_directory |
| 199 | |
| 200 | You must |
| 201 | repeat this step each time you rebuild the SDK with changes that you |
| 202 | want to make available through the update mechanism. |
| 203 | |
| 204 | Completing the above steps allows users of the existing installed SDKs |
| 205 | to simply run ``devtool sdk-update`` to retrieve and apply the latest |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 206 | updates. See the |
| 207 | ":ref:`sdk-manual/extensible:applying updates to an installed extensible sdk`" |
| 208 | section for further information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 209 | |
| 210 | Changing the Default SDK Installation Directory |
| 211 | =============================================== |
| 212 | |
| 213 | When you build the installer for the Extensible SDK, the default |
| 214 | installation directory for the SDK is based on the |
| 215 | :term:`DISTRO` and |
| 216 | :term:`SDKEXTPATH` variables from |
| 217 | within the |
| 218 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 219 | class as follows:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 220 | |
| 221 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
| 222 | |
| 223 | You can |
| 224 | change this default installation directory by specifically setting the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 225 | :term:`SDKEXTPATH` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 226 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 227 | While there are several ways of setting this variable, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 228 | the method that makes the most sense is to set the variable in your |
| 229 | distribution's configuration file. Doing so creates an SDK installer |
| 230 | default directory that applies across your distribution. As an example, |
| 231 | assume you have your own layer for your distribution named |
| 232 | "meta-mydistro" and you are using the same type of file hierarchy as |
| 233 | does the default "poky" distribution. If so, you could update the |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 234 | :term:`SDKEXTPATH` variable in the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 235 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 236 | form:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 237 | |
| 238 | SDKEXTPATH = "some_path_for_your_installed_sdk" |
| 239 | |
| 240 | After building your installer, running it prompts the user for |
| 241 | acceptance of the some_path_for_your_installed_sdk directory as the |
| 242 | default location to install the Extensible SDK. |
| 243 | |
| 244 | Providing Additional Installable Extensible SDK Content |
| 245 | ======================================================= |
| 246 | |
| 247 | If you want the users of an extensible SDK you build to be able to add |
| 248 | items to the SDK without requiring the users to build the items from |
| 249 | source, you need to do a number of things: |
| 250 | |
| 251 | 1. Ensure the additional items you want the user to be able to install |
| 252 | are already built: |
| 253 | |
| 254 | - Build the items explicitly. You could use one or more "meta" |
| 255 | recipes that depend on lists of other recipes. |
| 256 | |
| 257 | - Build the "world" target and set |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 258 | ``EXCLUDE_FROM_WORLD:pn-``\ recipename for the recipes you do not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 259 | want built. See the |
| 260 | :term:`EXCLUDE_FROM_WORLD` |
| 261 | variable for additional information. |
| 262 | |
| 263 | 2. Expose the ``sstate-cache`` directory produced by the build. |
| 264 | Typically, you expose this directory by making it available through |
| 265 | an `Apache HTTP |
| 266 | Server <https://en.wikipedia.org/wiki/Apache_HTTP_Server>`__ or |
| 267 | `Nginx <https://en.wikipedia.org/wiki/Nginx>`__ server. |
| 268 | |
| 269 | 3. Set the appropriate configuration so that the produced SDK knows how |
| 270 | to find the configuration. The variable you need to set is |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 271 | :term:`SSTATE_MIRRORS`:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 272 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 273 | SSTATE_MIRRORS = "file://.* https://example.com/some_path/sstate-cache/PATH" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 274 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 275 | You can set the :term:`SSTATE_MIRRORS` variable in two different places: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 276 | |
| 277 | - If the mirror value you are setting is appropriate to be set for |
| 278 | both the OpenEmbedded build system that is actually building the |
| 279 | SDK and the SDK itself (i.e. the mirror is accessible in both |
| 280 | places or it will fail quickly on the OpenEmbedded build system |
| 281 | side, and its contents will not interfere with the build), then |
| 282 | you can set the variable in your ``local.conf`` or custom distro |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 283 | configuration file. You can then pass the variable to the SDK by |
| 284 | adding the following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 285 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 286 | ESDK_LOCALCONF_ALLOW = "SSTATE_MIRRORS" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 287 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 288 | - Alternatively, if you just want to set the :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 289 | variable's value for the SDK alone, create a |
| 290 | ``conf/sdk-extra.conf`` file either in your |
| 291 | :term:`Build Directory` or within any |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 292 | layer and put your :term:`SSTATE_MIRRORS` setting within that file. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 293 | |
| 294 | .. note:: |
| 295 | |
| 296 | This second option is the safest option should you have any |
| 297 | doubts as to which method to use when setting |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 298 | :term:`SSTATE_MIRRORS` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 299 | |
| 300 | Minimizing the Size of the Extensible SDK Installer Download |
| 301 | ============================================================ |
| 302 | |
| 303 | By default, the extensible SDK bundles the shared state artifacts for |
| 304 | everything needed to reconstruct the image for which the SDK was built. |
| 305 | This bundling can lead to an SDK installer file that is a Gigabyte or |
| 306 | more in size. If the size of this file causes a problem, you can build |
| 307 | an SDK that has just enough in it to install and provide access to the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 308 | ``devtool command`` by setting the following in your configuration:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 309 | |
| 310 | SDK_EXT_TYPE = "minimal" |
| 311 | |
| 312 | Setting |
| 313 | :term:`SDK_EXT_TYPE` to |
| 314 | "minimal" produces an SDK installer that is around 35 Mbytes in size, |
| 315 | which downloads and installs quickly. You need to realize, though, that |
| 316 | the minimal installer does not install any libraries or tools out of the |
| 317 | box. These libraries and tools must be installed either "on the fly" or |
| 318 | through actions you perform using ``devtool`` or explicitly with the |
| 319 | ``devtool sdk-install`` command. |
| 320 | |
| 321 | In most cases, when building a minimal SDK you need to also enable |
| 322 | bringing in the information on a wider range of packages produced by the |
| 323 | system. Requiring this wider range of information is particularly true |
| 324 | so that ``devtool add`` is able to effectively map dependencies it |
| 325 | discovers in a source tree to the appropriate recipes. Additionally, the |
| 326 | information enables the ``devtool search`` command to return useful |
| 327 | results. |
| 328 | |
| 329 | To facilitate this wider range of information, you would need to set the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 330 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 331 | |
| 332 | SDK_INCLUDE_PKGDATA = "1" |
| 333 | |
| 334 | See the :term:`SDK_INCLUDE_PKGDATA` variable for additional information. |
| 335 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 336 | Setting the :term:`SDK_INCLUDE_PKGDATA` variable as shown causes the "world" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 337 | target to be built so that information for all of the recipes included |
| 338 | within it are available. Having these recipes available increases build |
| 339 | time significantly and increases the size of the SDK installer by 30-80 |
| 340 | Mbytes depending on how many recipes are included in your configuration. |
| 341 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 342 | You can use ``EXCLUDE_FROM_WORLD:pn-``\ recipename for recipes you want |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 343 | to exclude. However, it is assumed that you would need to be building |
| 344 | the "world" target if you want to provide additional items to the SDK. |
| 345 | Consequently, building for "world" should not represent undue overhead |
| 346 | in most cases. |
| 347 | |
| 348 | .. note:: |
| 349 | |
| 350 | If you set |
| 351 | SDK_EXT_TYPE |
| 352 | to "minimal", then providing a shared state mirror is mandatory so |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 353 | that items can be installed as needed. See the |
| 354 | :ref:`sdk-manual/appendix-customizing:providing additional installable extensible sdk content` |
| 355 | section for more information. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 356 | |
| 357 | You can explicitly control whether or not to include the toolchain when |
| 358 | you build an SDK by setting the |
| 359 | :term:`SDK_INCLUDE_TOOLCHAIN` |
| 360 | variable to "1". In particular, it is useful to include the toolchain |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 361 | when you have set :term:`SDK_EXT_TYPE` to "minimal", which by default, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 362 | excludes the toolchain. Also, it is helpful if you are building a small |
| 363 | SDK for use with an IDE or some other tool where you do not want to take |
| 364 | extra steps to install a toolchain. |