2.7. Minimizing the Size of the Extensible SDK Installer Download

By default, the extensible SDK bundles the shared state artifacts for everything needed to reconstruct the image for which the SDK was built. This bundling can lead to an SDK installer file that is a Gigabyte or more in size. If the size of this file causes a problem, you can build an SDK that has just enough in it to install and provide access to the devtool command by setting the following in your configuration:

     SDK_EXT_TYPE = "minimal"
        

Setting SDK_EXT_TYPE to "minimal" produces an SDK installer that is around 35 Mbytes in size, which downloads and installs quickly. You need to realize, though, that the minimal installer does not install any libraries or tools out of the box. These must be installed either "on the fly" or through actions you perform using devtool or explicitly with the devtool sdk-install command.

In most cases, when building a minimal SDK you will need to also enable bringing in the information on a wider range of packages produced by the system. This is particularly true so that devtool add is able to effectively map dependencies it discovers in a source tree to the appropriate recipes. Also so that the devtool search command is able to return useful results.

To facilitate this wider range of information, you would additionally set the following:

     SDK_INCLUDE_PKGDATA = "1"
        

See the SDK_INCLUDE_PKGDATA variable for additional information.

Setting the SDK_INCLUDE_PKGDATA variable as shown causes the "world" target to be built so that information for all of the recipes included within it are available. Having these recipes available increases build time significantly and increases the size of the SDK installer by 30-80 Mbytes depending on how many recipes are included in your configuration.

You can use EXCLUDE_FROM_WORLD_pn-recipename for recipes you want to exclude. However, it is assumed that you would need to be building the "world" target if you want to provide additional items to the SDK. Consequently, building for "world" should not represent undue overhead in most cases.

Note

If you set SDK_EXT_TYPE to "minimal", then providing a shared state mirror is mandatory so that items can be installed as needed. See the "Providing Additional Installable Extensible SDK Content" section for more information.

You can explicitly control whether or not to include the toolchain when you build an SDK by setting the SDK_INCLUDE_TOOLCHAIN variable to "1". In particular, it is useful to include the toolchain when you have set SDK_EXT_TYPE to "minimal", which by default, excludes the toolchain. Also, it is helpful if you are building a small SDK for use with an IDE, such as Eclipse™, or some other tool where you do not want to take extra steps to install a toolchain.