Yocto vs. Debian for Embedded Systems Design and IoTBy ZM Peterson • Mar 8, 2020
Embedded systems used to be used primarily for real-time control of electronics systems, where highly specialized functions were performed on dedicated hardware. With the development of more chipsets and their SDKs, and efforts by the open-source community, embedded systems have become more general-purpose.
Expanded software and hardware capabilities allow more functions to be implemented in a single device, but it all hinges on choosing the right embedded OS. Embedded Linux distros are by far the ideal choice for embedded systems, and you’ll need to choose the right build for your new product. The debate around Yocto vs. Debian is fierce in the embedded community, but which Linux distro is right for your new product? Let’s look at the benefits and drawbacks of each embedded OS.
Yocto vs. Debian
Perhaps the most important thing to know about Yocto is this: it’s not an actual Linux distro. The Yocto Project website motto states "It's not an embedded Linux Distribution, It creates a custom one for you." In other words, you can create a custom Linux distro using the Yocto framework. Yocto is basically modular software; you can select only the particular libraries and dependencies you need for your system, rather than installing multiple GB worth of OS dependencies you don’t need. This makes Yocto an ideal framework for heavily tailored embedded systems.
Yocto uses a tool called BitBake (requires Python 2.7) and a build system based on OpenEmbedded. Numerous architectures are supported, including x86, ARM, and MIPS. You can easily build a production-grade Linux distro in a short amount of time. Meanwhile, Debian, and other Linux distros like Ubuntu and CentOS, are full Linux distributions for general computing. You’d likely find Debian on a server or terminal, while Yocto is explicitly designed to run on an embedded architecture. That being said, Debian can also run on embedded architectures. Specifically, Debian can be run on the same architectures as Yocto, as well as AMD64 and 64bit IBM S/390. The table below provides a detailed comparison of Yocto vs. Debian.
When to Use Yocto vs. Debian
As Debian provides all the dependencies you need for general-purpose computing, you can certainly deploy it for development and testing purposes. It’s a larger distro, but it can still fit on an eval/dev board with a small thumb drive or microSD card. Loading new packages over the internet is easy; just use an SSH tunnel and install packages from the console as you would with a server or your personal computer.
Yocto is firmly relegated to functional prototyping and production-grade hardware. If you’ve determined the hardware and dependencies you need for your new system, you can build a Yocto distro and start testing your embedded software in a real environment. Making changes to code is easy, but you can’t make changes to the Yocto distro itself without completely rebuilding it.
Here are some example tasks that can help you compare Yocto vs. Debian for embedded applications. More embedded systems being dedicated to AI tasks, and the applications below revolve around these areas.
Because Yocto can be so trimmed down to the bare essentials, you can use it to power embedded AI and computer vision applications on standard or custom hardware. With enough processing power and extra memory, you can extend this to real-time video processing applications. Specialized GPUs like NVIDIA Jetson and Google Coral are two excellent platforms for image or video tasks in these areas.
Sensor Network Data Collection and Processing
Data gathered from sensor networks, such as in a connected factory floor, need to be compiled at a command and control center for processing. Yocto is a good choice for running sensor nodes, especially when digital data needs to be gathered and processed from other equipment. Feel free to use Debian or another Linux distro for your data servers in this application. If you did need to perform classification/prediction tasks at the node level, you can still use your sensor node even with modest processing power.
If this sensor board needs to run classification or prediction tasks, then Yocto is the ideal distribution to use.
Voice or Text Recognition and Processing
This is one of my favorite embedded applications, especially after working with a major eCommerce company. Voice recognition requires less processing power than real-time video as you’re essentially using a 44.1, 48, or 96 kHz audio stream in one or two channels. Text processing is a variation on image processing. Both tasks may require some subsequent NLP processing. The models used for these tasks are quite small, and you’ll be able to complete many processing tasks with high throughput directly at the device level if you use Yocto.
Alternatively, you can send data back to a cloud service or a central repository, where the same data can be analyzed with any other Linux system, including Debian. This is a better option if data collected at the device level will not necessarily be used by the device and instead is integrated into a web platform. In another manifestation of this relationship, models used for these types of prediction, classification, and subsequent NLP tasks can be trained on a central Debian server or with a cloud service, and the models can then be deployed back to the device through an embedded API. This takes the burden of training and testing off a deployed device and offloads it to a server environment or cloud service.
Designing Your Embedded System with Yocto
Your embedded system will live on a PCB, and you’ll need the right hardware architecture to support your new product. These days, embedded systems are designed with multiple wireless protocols (Bluetooth and WiFi are seen as standard), and they must be designed with the lowest possible power consumption. The right design firm can help you pair your hardware and software requirements into a complete product, as well as help you get through the manufacturing process.
If you’re looking for a PCB design and embedded systems design firm to help you build and deploy products for computer vision/embedded systems applications, look no further than NWES. We can help you choose between Yocto vs. Debian, and we know how to quickly build powerful embedded products. We’re also a digital marketing firm, and we can help you market your new product and engage with your target audience. Contact NWES today for a consultation.