2.6. Providing Additional Installable Extensible SDK Content

If you want the users of an extensible SDK you build to be able to add items to the SDK without requiring the users to build the items from source, you need to do a number of things:

  1. Ensure the additional items you want the user to be able to install are already built:

    • Build the items explicitly. You could use one or more "meta" recipes that depend on lists of other recipes.

    • Build the "world" target and set EXCLUDE_FROM_WORLD_pn-recipename for the recipes you do not want built. See the EXCLUDE_FROM_WORLD variable for additional information.

  2. Expose the sstate-cache directory produced by the build. Typically, you expose this directory by making it available through an Apache HTTP Server or Nginx server.

  3. Set the appropriate configuration so that the produced SDK knows how to find the configuration. The variable you need to set is SSTATE_MIRRORS:

         SSTATE_MIRRORS = "file://.*  http://example.com/some_path/sstate-cache/PATH"
                    

    You can set the SSTATE_MIRRORS variable in two different places:

    • If the mirror value you are setting is appropriate to be set for both the OpenEmbedded build system that is actually building the SDK and the SDK itself (i.e. the mirror is accessible in both places or it will fail quickly on the OpenEmbedded build system side, and its contents will not interfere with the build), then you can set the variable in your local.conf or custom distro configuration file. You can then "whitelist" the variable through to the SDK by adding the following:

           SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
                              

    • Alternatively, if you just want to set the SSTATE_MIRRORS variable's value for the SDK alone, create a conf/sdk-extra.conf file either in your Build Directory or within any layer and put your SSTATE_MIRRORS setting within that file.

      Note

      This second option is the safest option should you have any doubts as to which method to use when setting SSTATE_MIRRORS.