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