Bolt-based Native ApplicationsThis page describes the process for creating and building native Bolt applications within the RDK ecosystem. The meta-bolt-youtube repository serves as the canonical reference implementation throughout this article. See also: meta-bolt-distro | bolt-tools Overview:A native Bolt application is a self-contained, application packaged as `.bolt` . Each application is maintained in its own Yocto meta-layer repository and follows a shared set of conventions across all RDK Bolt projects. The overall workflow is: - Create a new application repository following the standard naming and layout.
- Declare all build-time dependencies in manifests/deps.xml.
- Add or reuse Yocto image recipes and native app recipes.
- Define package configs that instruct the Bolt tool how to assemble the final package.
- Source the build environment and run the Bolt make command.
2. Repository Setup2.1 Naming ConventionAll RDK Bolt application repositories follow this naming pattern: Examples: - meta-bolt-youtube
- meta-bolt-amazon-prime
- meta-bolt-myapplication
2.2 Repository StructureA new meta-bolt repository is expected to contain the following top-level layout: meta-bolt-<app_name>/
├── README.md
├── CONTRIBUTING.md
├── LICENSE
├── COPYING
├── CHANGELOG.md
├── NOTICE
├── manifests/ # dependency declarations (see Section 3)
├── package-configs/ # Bolt package configuration JSON files (see Section 6)
├── recipes-core/ # image recipes (see Section 4)
├── recipes-devtools/ # host-tool recipes
├── recipes-extended/ # native app recipes and bbappend files (see Section 5)
├── conf/ # Yocto layer configuration
└── setup-environment # reusable environment setup script (see Section 7) |
The conf/layer.conf file is critical for layer discovery and recipe resolution. At minimum, verify the following: - BBPATH includes this layer path so BitBake can locate classes and metadata.
- BBLAYERS (typically managed from bblayers.conf) includes all dependent layers declared in manifests/deps.xml.
- BBFILES patterns include your local recipe trees (recipes-core, recipes-devtools, recipes-extended) so .bb and .bbappend files are discovered.
- BBFILE_COLLECTIONS, BBFILE_PATTERN_<layer>, and BBFILE_PRIORITY_<layer> are set correctly for your layer identity and precedence.
- LAYERSERIES_COMPAT_<layer> is aligned with the Yocto release used by your distro.
If your team uses the term "BBTPath", treat it as the layer search path concept and align it with standard Yocto BBPATH/BBLAYERS configuration. Also confirm package-config consistency: - package-configs/<app_name>.bolt.json exists and target name matches "bolt make <app_name>".
- package-configs/com.rdkcentral.<app_name>.json exists and references correct runtime deps.
Reference: |
3. Dependency Management3.1 manifests FolderThe manifests folder is the central location for declaring all components that the build system must fetch and integrate before building the native application. 3.2 deps.xml FormatThe deps.xml file inside the manifests folder acts as a dependency resolver for the Bolt application build. It declares: - Required repositories and their remote locations
- Branch names or commit references to pin versions
- Build-time dependency relationships between components
Typical entries in deps.xml cover: - The base Bolt distro layer
- Core runtime components
- Application-specific libraries
- Development tool layers
Reference: deps.xml 4. Bolt Image Recipe4.1 PurposeAn image recipe is a BitBake (.bb) file placed under recipes-core/images/. It defines the full contents of the root filesystem that will be assembled into the final Bolt package, including which packages, binaries, libraries, and supporting components are installed. 4.2 What to IncludeThe image recipe should declare all runtime dependencies of the native application so that the resulting Bolt package is complete and self-contained. The following image recipes in meta-bolt-youtube can be used as templates: 5. Native Application RecipesNative application recipes are BitBake recipes that build the application binaries and libraries included in the final package. They can be sourced in one of two ways: 5.1 Reuse from Dependent LayersIf an existing recipe for the native application already exists in one of the meta-layers declared in manifests/deps.xml, that recipe can be consumed directly without duplication. 5.2 Adding New RecipesWhen a suitable recipe does not exist upstream, new .bb recipe files or .bbappend overlay files can be added under the local recipes-extended tree: recipes-extended/<app_or_component>/ |
Keeping customisations in recipes-extended isolates them from upstream changes and makes future maintenance easier. 6. Package ConfigurationThe package-configs directory holds JSON configuration files that the Bolt tool reads to determine how to build a target image and assemble the final Bolt package. There are two distinct config file types for each application: 6.1 <app_name>.bolt.jsonThis file is the primary Bolt build configuration. It instructs the Bolt tool on: - Which Yocto image target to build
- Which metadata files to include in the final Bolt package
Reference examples in meta-bolt-youtube: 6.2 com.rdkcentral.<app_name>.jsonThis file contains the native application package metadata that is shipped inside the Bolt package. At runtime, the on-device application management service reads this file to determine: - Which dependent Bolt packages (such as base and runtime) must be mounted before launch
- Which environment variables and configuration must be exported into the app container.
- How the application is to be started within the Bolt runtime model.
Reference examples in meta-bolt-youtube:
7. Setup EnvironmentThe setup-environment and repo-sync scripts provided in meta-bolt-youtube are intentionally generic and designed to be reused in new Bolt application repositories with little to no modification. To adapt them for a new repository: - Copy setup-environment and repo-sync into the root of the new meta-bolt-<app_name> repository.
- Ensure the dependency layout declared in manifests/deps.xml aligns with any path assumptions made by the scripts.
- Apply only minimal repo-specific changes where required, such as updating default repository names or local build directory paths.
Reusing these scripts keeps the bootstrap and workspace initialization process consistent across all native Bolt application projects. References |