By Tracey Erway of Intel Corporation, excerpts from Drew Moseley of Mender (reprinted with permission, original article published on Embedded.com “Why the Yocto Project for my IoT Project?”).
If you look through this information and hunger to dive into the technical details of Yocto Project, read over the “Software Overview” which will show you the technical structure of the project. Then take a look at the documents page where you can see “New User” documents. Be sure to visit our “Community” page and join the mailing lists and such.
If you’re developing embedded or IoT devices then chances are Yocto Project will be an effective solution for your product or development needs (unless your project is a simple one-off). Thousands of developers worldwide have discovered that Yocto Project provides systems development advantages, application development advantages, product archival and management benefits, and of course, the ultimate in customization capability to develop for speed, footprint and memory utilization. The following are some of the features of the project.
1. The Yocto Project is widely adopted throughout the embedded/IoT industry.
In addition to semiconductor and OS vendors, there are a number of vendors providing commercially supported Yocto Project software and services. The Yocto Project membership, associate and participant pages show the variety of industry players that are using the project. Industry initiatives such as the Genivi Alliance and Automotive Grade Linux help push Yocto Project adoption into the automotive industry. A simple job search on “yocto” will show you 100’s of job positions, worldwide.
2. Yocto Project works on any architecture.
Either the silicon or ODM supplier has written a supportive BSP or if you have custom silicon, you can create a BSP following YP’s specifications. Yocto Project supports Intel, ARM, MIPS, AMD, PPC, and others.
3. Most ODMs, OSVs and chip vendors provide SDKs, BSPs and other supportive structures for use with Yocto Project.
4. You are not locked down to any one supplier as Yocto Project is both open source and supports many architectures.
Plus, if you are tired of maintaining your own Linux distribution, what you have created is easily transferable to and usable by commercial Linux vendors such as Wind River, Mentor Graphics, Timesys and ENEA who can provide ongoing support to your project. Their commercial offerings are built with Yocto Project as their upstream.
5. Yocto Project output is easily transferable to another architecture, allowing you to have product lines that use diverse architectures without forcing you to swap development environments.
In fact, Yocto Project allows you to easily use the same code across architectures and customize anything as needed. Often moving code from one architecture to another is a matter of a couple of changes in the configuration file.
6. Because of its architecture independence and customization capabilities, there are many ways that Yocto Project is used by corporations. One is to manage an internal distribution for use across product groups.
A central division keeps the base Linux up to date and makes it available to product groups who then customize for their product needs. When you read about the layering system, you’ll understand better how this works.
7. It is designed for constrained embedded and IoT device needs.
Yocto Project is is designed so that you only add what you want or use packages as needed without having to remove and slim down a default distribution. Yocto Project provides an example embedded distribution (Poky) to get you started quickly. The Yocto Project provides this reference distribution in tiny, small medium and large footprints adding typical embedded device capabilities in exchange for an increase in footprint. This reference OS can be the starting point for you to develop your own customized Linux distribution. It provides sensible defaults to allow developers to get started quickly, but the mechanisms to change these policies are well documented and simple to adopt.
8. Yocto Project is constantly validated by testing all releases with the reference distro (Poky) on each supported architecture.
9. Yocto Project provides comprehensive toolchain capabilities. This toolchain, which has been tested by the Yocto community across a wide variety of architectures and platforms.
This will satisfy the needs of the majority of use cases. If needed, this toolchain can be easily customized using standard Yocto Project mechanisms. Additionally, if your target chip supports features that are not enabled in the default toolchain (e.g., custom instructions or optimizations), specifying platform-specific tuning parameters is a simple addition in your platform specification (layer). Finally, if you have the need to use a prebuilt toolchain provided by a third-party, there are mechanisms built-in to Yocto Project to allow this. Support for several providers of commercial toolchains is available in the default Yocto source code and can be extended to additional providers with relatively modest efforts. Yocto Project can also bundle the tools and libraries needed for your platform into an SDK that can be delivered to application developers. This is simpler than requiring application developers to run full Yocto Project system builds and allows for an optimized application development workflow while ensuring that these developers have the proper versions of all components needed for their work. This SDK is extensible (eSDK), allowing app development work to be integrated into the redeveloped image for use by other application developers.
10. Yocto Project focuses on mechanism over policy which allows wide latitude for system developers.
This approach ensures that you are free to set the policy based on the needs of your design rather than having to adapt to decisions enforced by the system software provider.
11. The Yocto Project layer infrastructure is an integral part of the Yocto Project model.
Layers group related functionality into separate bundles, which can be added to your build setup incrementally, as needed. This greatly reduces the complexity of each individual layer and allows them to be developed at their own pace. Layers also contain dependency information, so one layer can be made dependent on another.
12. Yocto Project allows you to build and rebuild individual packages as needed, without having to build the entire image.
This allows you to test image components for easier debugging.
13. Yocto Project follows a strict release schedule incorporating security patches in all supported releases.
This predictability is crucial for projects that are based on Yocto Project and allows the development teams to plan their activities. Developers can choose which Yocto Project branch on which to base their activities as a function of their needs. The development branch will ensure access to the latest features while the stable branches will reduce the pace of changes.
14. As the Yocto Project community manager has said: “Nothing is as important to an open source project as the ecosystem of individuals and organizations around it.”
This is easily one of the primary advantages of Yocto Project. The value of community cannot be stressed highly enough; support forums and expertise are readily available, as is an active development community pushing Yocto Project forward. As an open source project, you can modify it yourself to suit your needs or find someone to do it for you; and there is no concern of a software vendor changing strategies and leaving you to start over.
15. Yocto Project can be configured to suit any of the devices that have enough flash, ram, and processor features to run Linux, on devices with micro-controllers to big gateways.
More and more, these types of devices are prototyped (and sometimes implemented) with easily available consumer hardware devices such as the Raspberry Pi, the BeagleBone, or the MinnowBoard. The Yocto Project has excellent support for these (and many other similar) boards, and is an excellent way to get started quickly on your IoT project.
16. The project aligns with the Reproducible Builds project.
This means that when you generate an image from a given input set of metadata, you will always get the same binary output. For example, at some point in the future life of a product, you may find that you need to rebuild to add a security fix. If this happens, only the components that have been modified will be changed in the resulting binary. This leads to much easier and clearer bounds on where validation is needed. The project has achieved full binary reproducibility in OpenEmbedded-Core since release 3.1 (“dunfell”).
17. For those who need to track the use of open source licenses, namely your legal team, the project provides a manifest for review.
18. The Advisory Board membership keeps the project financially strong and their contributions give them access to directional strategies.
The project runs under the auspices of the Linux Foundation, and is strengthened by its parent organization’s resources and contacts. Finally, Linux Foundation Fellow, Richard Purdie, and diverse community maintainers guide the project in progressive, technical directions.
Well, you need to be a pretty good coder or be willing to become one.
While the benefits are many, the Yocto Project does have a steep learning curve. Providing the ultimate in customization capability means the mechanisms to do so are varied and diverse. This means it can be difficult to choose how to proceed, there are usually a few different ways to accomplish anything – and while all may work at first, some choices will get you in trouble down the line. On the other hand, you’ll never be at a loss for work – experienced Yocto Project developers are wanted worldwide. If you’re looking for experienced developers, feel free to point our job board to your ad via the Community pages.
Getting a basic system up and running can be achieved quickly by following any of the tutorials available with a simple web search. However, understanding what changes need to be made for your particular design may require a non-trivial amount of research and investigation.
We’ve put together two new documents for “New Users” that we hope will help you transition from the Quick Start Guide to your project set up. Look for 1) What I wish I’d known and 2) Transitioning to a Custom Environment for Systems Development. To be sure, there are valid reasons for the complexity and in general the advantages make it worth the effort. Once you have completed the initial ramp-up, further design efforts will proceed much more quickly. There are a number of instructional presentations and videos to help you, and the site provides links to classes and consultants who can provide training resources.
For developers who are used to traditional desktop and server software development, the Yocto Project workflow can be confusing.
In a desktop development environment, the host OS provider generally provides a mechanism to install new packages. In Ubuntu for instance, new packages are easily installed using the apt-get command. The packages are available in pre-compiled binaries from servers accessible through an Internet connection. In Yocto, you will need to modify your configuration and rebuild to add additional packages; there are no Internet-hosted package libraries generally available to pull from.
Working in a cross-build environment can feel unfamiliar and requires developers to understand both the host and target systems.
Being able to develop code, compile (or simply run in a scripting environment), and quickly test in your target system can be faster than running a bitbake build and deploying a new image to your target. To be clear, Yocto Project does support development tools on the target to support this kind of workflow; however, once the required code has been developed and debugged, there is an additional step needed to integrate those changes back into the Yocto Project build environment. An intermediate approach is to make the changes in the Yocto Project environment, but to then deploy only the updated packages. The Yocto Project build system outputs packages in a standard format (rpm, deb, ipk, or tar) that can be installed into a running system using utilities on the target such as rpm or ipk. These approaches work fine to optimize development cycle times early in the life cycle; however, as you get closer to product release, you generally want to minimize or eliminate the differences between your test images and your production images — manually installing packages or modifying code on a running system effectively creates a custom image.
Finally, the initial build times for a full Yocto Project build can be significant.
This is, in general, unavoidable due to the large number of packages that need to initially be built from scratch for a fully functioning Linux system. However, this will be greatly mitigated by the Yocto Project “shared state” mechanism which keeps the system from rebuilding packages that haven’t been touched since the last build, and will bring the build time down significantly for ongoing builds. Furthermore, Yocto Project provides a shared state mirror for releases on sstate.yoctoproject.org. Leveraging this can reduce build times significantly as well.
Yocto Project’s wide variety of features, expandability and fine-grained control over the contents of the target image make it ideally suited for embedded and IoT products and projects.
Now would be a great time to read over the “Software Overview” to understand some of the technical components. Then take a look at the documents page where you can see “New User” documents. Be sure to visit our “Community” page and join the mailing lists and such.