Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
| 2 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" |
| 3 | [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] > |
| 4 | |
| 5 | <appendix id='sdk-appendix-customizing'> |
| 6 | |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 7 | <title>Customizing the Extensible SDK</title> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 8 | |
| 9 | <para> |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 10 | This appendix presents customizations you can apply to the extensible SDK. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 11 | </para> |
| 12 | |
| 13 | <section id='sdk-configuring-the-extensible-sdk'> |
| 14 | <title>Configuring the Extensible SDK</title> |
| 15 | |
| 16 | <para> |
| 17 | The extensible SDK primarily consists of a pre-configured copy of |
| 18 | the OpenEmbedded build system from which it was produced. |
| 19 | Thus, the SDK's configuration is derived using that build system and |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 20 | the filters shown in the following list. |
| 21 | When these filters are present, the OpenEmbedded build system applies |
| 22 | them against <filename>local.conf</filename> and |
| 23 | <filename>auto.conf</filename>: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 24 | <itemizedlist> |
| 25 | <listitem><para> |
| 26 | Variables whose values start with "/" are excluded since the |
| 27 | assumption is that those values are paths that are likely to |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 28 | be specific to the |
| 29 | <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 30 | </para></listitem> |
| 31 | <listitem><para> |
| 32 | Variables listed in |
| 33 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></ulink> |
| 34 | are excluded. |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 35 | These variables are not allowed through from the OpenEmbedded |
| 36 | build system configuration into the extensible SDK |
| 37 | configuration. |
| 38 | Typically, these variables are specific to the machine on |
| 39 | which the build system is running and could be problematic |
| 40 | as part of the extensible SDK configuration.</para> |
| 41 | |
| 42 | <para>For a list of the variables excluded by default, see the |
| 43 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></ulink> |
| 44 | in the glossary of the Yocto Project Reference Manual. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 45 | </para></listitem> |
| 46 | <listitem><para> |
| 47 | Variables listed in |
| 48 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></ulink> |
| 49 | are included. |
| 50 | Including a variable in the value of |
| 51 | <filename>SDK_LOCAL_CONF_WHITELIST</filename> overrides either |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 52 | of the previous two filters. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 53 | The default value is blank. |
| 54 | </para></listitem> |
| 55 | <listitem><para> |
| 56 | Classes inherited globally with |
| 57 | <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink> |
| 58 | that are listed in |
| 59 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink> |
| 60 | are disabled. |
| 61 | Using <filename>SDK_INHERIT_BLACKLIST</filename> to disable |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 62 | these classes is the typical method to disable classes that |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 63 | are problematic or unnecessary in the SDK context. |
| 64 | The default value blacklists the |
| 65 | <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-buildhistory'><filename>buildhistory</filename></ulink> |
| 66 | and |
| 67 | <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-icecc'><filename>icecc</filename></ulink> |
| 68 | classes. |
| 69 | </para></listitem> |
| 70 | </itemizedlist> |
| 71 | Additionally, the contents of <filename>conf/sdk-extra.conf</filename>, |
| 72 | when present, are appended to the end of |
| 73 | <filename>conf/local.conf</filename> within the produced SDK, without |
| 74 | any filtering. |
| 75 | The <filename>sdk-extra.conf</filename> file is particularly useful |
| 76 | if you want to set a variable value just for the SDK and not the |
| 77 | OpenEmbedded build system used to create the SDK. |
| 78 | </para> |
| 79 | </section> |
| 80 | |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 81 | <section id='adjusting-the-extensible-sdk-to-suit-your-build-hosts-setup'> |
| 82 | <title>Adjusting the Extensible SDK to Suit Your Build Host's Setup</title> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 83 | |
| 84 | <para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 85 | In most cases, the extensible SDK defaults should work with your |
| 86 | <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host's</ulink> |
| 87 | setup. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 88 | However, some cases exist for which you might consider making |
| 89 | adjustments: |
| 90 | <itemizedlist> |
| 91 | <listitem><para> |
| 92 | If your SDK configuration inherits additional classes |
| 93 | using the |
| 94 | <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink> |
| 95 | variable and you do not need or want those classes enabled in |
| 96 | the SDK, you can blacklist them by adding them to the |
| 97 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 98 | variable as described in the fourth bullet of the previous |
| 99 | section. |
| 100 | <note> |
| 101 | The default value of |
| 102 | <filename>SDK_INHERIT_BLACKLIST</filename> is set using |
| 103 | the "?=" operator. |
| 104 | Consequently, you will need to either define the entire |
| 105 | list by using the "=" operator, or you will need to append |
| 106 | a value using either "_append" or the "+=" operator. |
| 107 | You can learn more about these operators in the |
| 108 | "<ulink url='&YOCTO_DOCS_BB_URL;#basic-syntax'>Basic Syntax</ulink>" |
| 109 | section of the BitBake User Manual. |
| 110 | </note>. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 111 | </para></listitem> |
| 112 | <listitem><para> |
| 113 | If you have classes or recipes that add additional tasks to |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 114 | the standard build flow (i.e. the tasks execute as the recipe |
| 115 | builds as opposed to being called explicitly), then you need |
| 116 | to do one of the following: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 117 | <itemizedlist> |
| 118 | <listitem><para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 119 | After ensuring the tasks are |
| 120 | <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>shared state</ulink> |
| 121 | tasks (i.e. the output of the task is saved to and |
| 122 | can be restored from the shared state cache) or |
| 123 | ensuring the tasks are able to be produced quickly from |
| 124 | a task that is a shared state task, add the task name |
| 125 | to the value of |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 126 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_RECRDEP_TASKS'><filename>SDK_RECRDEP_TASKS</filename></ulink>. |
| 127 | </para></listitem> |
| 128 | <listitem><para> |
| 129 | Disable the tasks if they are added by a class and |
| 130 | you do not need the functionality the class provides |
| 131 | in the extensible SDK. |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 132 | To disable the tasks, add the class to the |
| 133 | <filename>SDK_INHERIT_BLACKLIST</filename> variable |
| 134 | as described in the previous section. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 135 | </para></listitem> |
| 136 | </itemizedlist> |
| 137 | </para></listitem> |
| 138 | <listitem><para> |
| 139 | Generally, you want to have a shared state mirror set up so |
| 140 | users of the SDK can add additional items to the SDK after |
| 141 | installation without needing to build the items from source. |
| 142 | See the |
| 143 | "<link linkend='sdk-providing-additional-installable-extensible-sdk-content'>Providing Additional Installable Extensible SDK Content</link>" |
| 144 | section for information. |
| 145 | </para></listitem> |
| 146 | <listitem><para> |
| 147 | If you want users of the SDK to be able to easily update the |
| 148 | SDK, you need to set the |
| 149 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_UPDATE_URL'><filename>SDK_UPDATE_URL</filename></ulink> |
| 150 | variable. |
| 151 | For more information, see the |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 152 | "<link linkend='sdk-providing-updates-to-the-extensible-sdk-after-installation'>Providing Updates to the Extensible SDK After Installation</link>" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 153 | section. |
| 154 | </para></listitem> |
| 155 | <listitem><para> |
| 156 | If you have adjusted the list of files and directories that |
| 157 | appear in |
| 158 | <ulink url='&YOCTO_DOCS_REF_URL;#var-COREBASE'><filename>COREBASE</filename></ulink> |
| 159 | (other than layers that are enabled through |
| 160 | <filename>bblayers.conf</filename>), then you must list these |
| 161 | files in |
| 162 | <ulink url='&YOCTO_DOCS_REF_URL;#var-COREBASE_FILES'><filename>COREBASE_FILES</filename></ulink> |
| 163 | so that the files are copied into the SDK. |
| 164 | </para></listitem> |
| 165 | <listitem><para> |
| 166 | If your OpenEmbedded build system setup uses a different |
| 167 | environment setup script other than |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 168 | <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>, |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 169 | then you must set |
| 170 | <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_INIT_ENV_SCRIPT'><filename>OE_INIT_ENV_SCRIPT</filename></ulink> |
| 171 | to point to the environment setup script you use. |
| 172 | <note> |
| 173 | You must also reflect this change in the value used for the |
| 174 | <filename>COREBASE_FILES</filename> variable as previously |
| 175 | described. |
| 176 | </note> |
| 177 | </para></listitem> |
| 178 | </itemizedlist> |
| 179 | </para> |
| 180 | </section> |
| 181 | |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 182 | <section id='sdk-changing-the-sdk-installer-title'> |
| 183 | <title>Changing the Extensible SDK Installer Title</title> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 184 | |
| 185 | <para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 186 | You can change the displayed title for the SDK installer by setting |
| 187 | the |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 188 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_TITLE'><filename>SDK_TITLE</filename></ulink> |
| 189 | variable. |
| 190 | By default, this title is derived from |
| 191 | <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_NAME'><filename>DISTRO_NAME</filename></ulink> |
| 192 | when it is set. |
| 193 | If the <filename>DISTRO_NAME</filename> variable is not set, the title |
| 194 | is derived from the |
| 195 | <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink> |
| 196 | variable. |
| 197 | </para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 198 | |
| 199 | <para> |
| 200 | The |
| 201 | <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-populate-sdk-*'><filename>populate_sdk_ext</filename></ulink> |
| 202 | class defines the default value of the <filename>SDK_TITLE</filename> |
| 203 | variable as follows: |
| 204 | <literallayout class='monospaced'> |
| 205 | SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" |
| 206 | </literallayout> |
| 207 | </para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 208 | </section> |
| 209 | |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 210 | <section id='sdk-providing-updates-to-the-extensible-sdk-after-installation'> |
| 211 | <title>Providing Updates to the Extensible SDK After Installation</title> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 212 | |
| 213 | <para> |
| 214 | When you make changes to your configuration or to the metadata and |
| 215 | if you want those changes to be reflected in installed SDKs, you need |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 216 | to perform additional steps. |
| 217 | These steps make it possible for anyone using the installed SDKs to |
| 218 | update the installed SDKs by using the |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 219 | <filename>devtool sdk-update</filename> command: |
| 220 | <orderedlist> |
| 221 | <listitem><para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 222 | Create a directory that can be shared over HTTP or HTTPS. |
| 223 | You can do this by setting up a web server such as an |
| 224 | <ulink url='https://en.wikipedia.org/wiki/Apache_HTTP_Server'>Apache HTTP Server</ulink> |
| 225 | or |
| 226 | <ulink url='https://en.wikipedia.org/wiki/Nginx'>Nginx</ulink> |
| 227 | server in the cloud to host the directory. |
| 228 | This directory must contain the published SDK. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 229 | </para></listitem> |
| 230 | <listitem><para> |
| 231 | Set the |
| 232 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_UPDATE_URL'><filename>SDK_UPDATE_URL</filename></ulink> |
| 233 | variable to point to the corresponding HTTP or HTTPS URL. |
| 234 | Setting this variable causes any SDK built to default to that |
| 235 | URL and thus, the user does not have to pass the URL to the |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 236 | <filename>devtool sdk-update</filename> command as described |
| 237 | in the |
| 238 | "<link linkend='sdk-applying-updates-to-an-installed-extensible-sdk'>Applying Updates to an Installed Extensible SDK</link>" |
| 239 | section. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 240 | </para></listitem> |
| 241 | <listitem><para> |
| 242 | Build the extensible SDK normally (i.e., use the |
| 243 | <filename>bitbake -c populate_sdk_ext</filename> <replaceable>imagename</replaceable> |
| 244 | command). |
| 245 | </para></listitem> |
| 246 | <listitem><para> |
| 247 | Publish the SDK using the following command: |
| 248 | <literallayout class='monospaced'> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 249 | $ oe-publish-sdk <replaceable>some_path</replaceable>/sdk-installer.sh <replaceable>path_to_shared_http_directory</replaceable> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 250 | </literallayout> |
| 251 | You must repeat this step each time you rebuild the SDK |
| 252 | with changes that you want to make available through the |
| 253 | update mechanism. |
| 254 | </para></listitem> |
| 255 | </orderedlist> |
| 256 | </para> |
| 257 | |
| 258 | <para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 259 | Completing the above steps allows users of the existing installed |
| 260 | SDKs to simply run <filename>devtool sdk-update</filename> to |
| 261 | retrieve and apply the latest updates. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 262 | See the |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 263 | "<link linkend='sdk-applying-updates-to-an-installed-extensible-sdk'>Applying Updates to an Installed Extensible SDK</link>" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 264 | section for further information. |
| 265 | </para> |
| 266 | </section> |
| 267 | |
| 268 | <section id='sdk-providing-additional-installable-extensible-sdk-content'> |
| 269 | <title>Providing Additional Installable Extensible SDK Content</title> |
| 270 | |
| 271 | <para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 272 | If you want the users of an extensible SDK you build to be |
| 273 | able to add items to the SDK without requiring the users to build |
| 274 | the items from source, you need to do a number of things: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 275 | <orderedlist> |
| 276 | <listitem><para> |
| 277 | Ensure the additional items you want the user to be able to |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 278 | install are already built: |
| 279 | <itemizedlist> |
| 280 | <listitem><para> |
| 281 | Build the items explicitly. |
| 282 | You could use one or more "meta" recipes that depend |
| 283 | on lists of other recipes. |
| 284 | </para></listitem> |
| 285 | <listitem><para> |
| 286 | Build the "world" target and set |
| 287 | <filename>EXCLUDE_FROM_WORLD_pn-</filename><replaceable>recipename</replaceable> |
| 288 | for the recipes you do not want built. |
| 289 | See the |
| 290 | <ulink url='&YOCTO_DOCS_REF_URL;#var-EXCLUDE_FROM_WORLD'><filename>EXCLUDE_FROM_WORLD</filename></ulink> |
| 291 | variable for additional information. |
| 292 | </para></listitem> |
| 293 | </itemizedlist> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 294 | </para></listitem> |
| 295 | <listitem><para> |
| 296 | Expose the <filename>sstate-cache</filename> directory |
| 297 | produced by the build. |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 298 | Typically, you expose this directory by making it available |
| 299 | through an |
| 300 | <ulink url='https://en.wikipedia.org/wiki/Apache_HTTP_Server'>Apache HTTP Server</ulink> |
| 301 | or |
| 302 | <ulink url='https://en.wikipedia.org/wiki/Nginx'>Nginx</ulink> |
| 303 | server. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 304 | </para></listitem> |
| 305 | <listitem><para> |
| 306 | Set the appropriate configuration so that the produced SDK |
| 307 | knows how to find the configuration. |
| 308 | The variable you need to set is |
| 309 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>: |
| 310 | <literallayout class='monospaced'> |
| 311 | SSTATE_MIRRORS = "file://.* http://<replaceable>example</replaceable>.com/<replaceable>some_path</replaceable>/sstate-cache/PATH" |
| 312 | </literallayout> |
| 313 | You can set the <filename>SSTATE_MIRRORS</filename> variable |
| 314 | in two different places: |
| 315 | <itemizedlist> |
| 316 | <listitem><para> |
| 317 | If the mirror value you are setting is appropriate to |
| 318 | be set for both the OpenEmbedded build system that is |
| 319 | actually building the SDK and the SDK itself (i.e. the |
| 320 | mirror is accessible in both places or it will fail |
| 321 | quickly on the OpenEmbedded build system side, and its |
| 322 | contents will not interfere with the build), then you |
| 323 | can set the variable in your |
| 324 | <filename>local.conf</filename> or custom distro |
| 325 | configuration file. |
| 326 | You can then "whitelist" the variable through |
| 327 | to the SDK by adding the following: |
| 328 | <literallayout class='monospaced'> |
| 329 | SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" |
| 330 | </literallayout> |
| 331 | </para></listitem> |
| 332 | <listitem><para> |
| 333 | Alternatively, if you just want to set the |
| 334 | <filename>SSTATE_MIRRORS</filename> variable's value |
| 335 | for the SDK alone, create a |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 336 | <filename>conf/sdk-extra.conf</filename> file either in |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 337 | your |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 338 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 339 | or within any layer and put your |
| 340 | <filename>SSTATE_MIRRORS</filename> setting within |
| 341 | that file. |
| 342 | <note> |
| 343 | This second option is the safest option should |
| 344 | you have any doubts as to which method to use when |
| 345 | setting <filename>SSTATE_MIRRORS</filename>. |
| 346 | </note> |
| 347 | </para></listitem> |
| 348 | </itemizedlist> |
| 349 | </para></listitem> |
| 350 | </orderedlist> |
| 351 | </para> |
| 352 | </section> |
| 353 | |
| 354 | <section id='sdk-minimizing-the-size-of-the-extensible-sdk-installer-download'> |
| 355 | <title>Minimizing the Size of the Extensible SDK Installer Download</title> |
| 356 | |
| 357 | <para> |
| 358 | By default, the extensible SDK bundles the shared state artifacts for |
| 359 | everything needed to reconstruct the image for which the SDK was built. |
| 360 | This bundling can lead to an SDK installer file that is a Gigabyte or |
| 361 | more in size. |
| 362 | If the size of this file causes a problem, you can build an SDK that |
| 363 | has just enough in it to install and provide access to the |
| 364 | <filename>devtool command</filename> by setting the following in your |
| 365 | configuration: |
| 366 | <literallayout class='monospaced'> |
| 367 | SDK_EXT_TYPE = "minimal" |
| 368 | </literallayout> |
| 369 | Setting |
| 370 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink> |
| 371 | to "minimal" produces an SDK installer that is around 35 Mbytes in |
| 372 | size, which downloads and installs quickly. |
| 373 | You need to realize, though, that the minimal installer does not |
| 374 | install any libraries or tools out of the box. |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 375 | These libraries and tools must be installed either "on the fly" or |
| 376 | through actions you perform using <filename>devtool</filename> or |
| 377 | explicitly with the <filename>devtool sdk-install</filename> command. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 378 | </para> |
| 379 | |
| 380 | <para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 381 | In most cases, when building a minimal SDK you need to also enable |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 382 | bringing in the information on a wider range of packages produced by |
| 383 | the system. |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 384 | Requiring this wider range of information is particularly true |
| 385 | so that <filename>devtool add</filename> is able to effectively map |
| 386 | dependencies it discovers in a source tree to the appropriate recipes. |
| 387 | Additionally, the information enables the |
| 388 | <filename>devtool search</filename> command to return useful results. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 389 | </para> |
| 390 | |
| 391 | <para> |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 392 | To facilitate this wider range of information, you would need to |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 393 | set the following: |
| 394 | <literallayout class='monospaced'> |
| 395 | SDK_INCLUDE_PKGDATA = "1" |
| 396 | </literallayout> |
| 397 | See the |
| 398 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_PKGDATA'><filename>SDK_INCLUDE_PKGDATA</filename></ulink> |
| 399 | variable for additional information. |
| 400 | </para> |
| 401 | |
| 402 | <para> |
| 403 | Setting the <filename>SDK_INCLUDE_PKGDATA</filename> variable as |
| 404 | shown causes the "world" target to be built so that information |
| 405 | for all of the recipes included within it are available. |
| 406 | Having these recipes available increases build time significantly and |
| 407 | increases the size of the SDK installer by 30-80 Mbytes depending on |
| 408 | how many recipes are included in your configuration. |
| 409 | </para> |
| 410 | |
| 411 | <para> |
| 412 | You can use |
| 413 | <filename>EXCLUDE_FROM_WORLD_pn-</filename><replaceable>recipename</replaceable> |
| 414 | for recipes you want to exclude. |
| 415 | However, it is assumed that you would need to be building the "world" |
| 416 | target if you want to provide additional items to the SDK. |
| 417 | Consequently, building for "world" should not represent undue |
| 418 | overhead in most cases. |
| 419 | <note> |
| 420 | If you set <filename>SDK_EXT_TYPE</filename> to "minimal", |
| 421 | then providing a shared state mirror is mandatory so that items |
| 422 | can be installed as needed. |
| 423 | See the |
| 424 | "<link linkend='sdk-providing-additional-installable-extensible-sdk-content'>Providing Additional Installable Extensible SDK Content</link>" |
| 425 | section for more information. |
| 426 | </note> |
| 427 | </para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 428 | |
| 429 | <para> |
| 430 | You can explicitly control whether or not to include the toolchain |
| 431 | when you build an SDK by setting the |
| 432 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink> |
| 433 | variable to "1". |
| 434 | In particular, it is useful to include the toolchain when you |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 435 | have set <filename>SDK_EXT_TYPE</filename> to "minimal", which by |
| 436 | default, excludes the toolchain. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 437 | Also, it is helpful if you are building a small SDK for use with |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 438 | an IDE, such as <trademark class='trade'>Eclipse</trademark>, or some |
| 439 | other tool where you do not want to take extra steps to install a |
| 440 | toolchain. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 441 | </para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 442 | </section> |
| 443 | </appendix> |
| 444 | <!-- |
| 445 | vim: expandtab tw=80 ts=4 |
| 446 | --> |