Debugging the Yocto build

There was a very interesting talk at the recent Yocto Summit about how you can do debugging on hardware. Sergio Prado, a consultant and trainer from Embedded Labworks, explains how to leverage the Yocto Project to debug an embedded Linux system . It is a very impressive talk and this is something that we would really recommend that you look into. If you were going to do serious debugging on hardware then you should run a debugger with the whole screen at full 1080 x 1080 on your desktop computer but have it connected to the smaller device via a debugger and run the process there. By adhering to this, you can have a very smooth experience. Debugging and logging go hand in hand with Yocto.

Logging and debugging go hand in hand

The Mender engineering team uses a lot of logging when we are debugging so logging is part and parcel of the debugging process. So you should have a good logger in your debugging software. And you should use one that has different log levels so that you can debug things when they're in the field: This is because one of the most difficult things to address is when someone has a problem with a device that crashes somewhere in the field but there is no record of how it got to the place where it crashed. That's why it's important to add a lot of logging everywhere in the software so that when the time comes that this happens, you can just turn on debugging off an accurate and comprehensive logging of events. Then you can just turn on this log level where all those logs are. Until now they have been silent and will start showing up in the logs. And this can give you an indication of where things are crashing and that's worth so much. Because if something is crashing, you know, in the field and not on your computer, you have a big problem. Being able to access those logs and replay those logs is made much more practical with the Mender Remote Terminal as you can access the device and get the logs via the same secure communication channel that is used for the OTA software updates.

Mender Enterprise Remote Terminal feature for Yocto debug

Common bugs with a Yocto build

What are the most common bugs that you will encounter with a Yocto build? There are some specific bugs that you will only see on Yocto and they would relate to certain software being missing or being kind of non-standard versions or built in, non-standard ways. And this is perhaps one of the few problems with Yocto and this is the environment that the software is running in, Is going to be a little bit weird in a sense because it's always customized. So, if you just take something off the shelf there's a higher chance that it's going to crash or misbehave on a Yocto build than on Ubuntu one. And this is the price you have to pay for having something that is customizable: Because whoever wrote it might assume that it has some certain software because every Ubuntu has it, that’s not the case with Yocto.

Consider reading these other articles on Yocto:

Recent articles

Enhancing Sustainability in Oil & Gas: Tackling Methane Emissions with Cutting-Edge Solutions

Enhancing Sustainability in Oil & Gas: Tackling Methane Emissions with Cutting-Edge Solutions

The oil and gas industry faces a crucial environmental challenge in pursuit of a greener and more sustainable future: reducing methane emissions.
CVE-2024-37019 - Account takeover using SAML

CVE-2024-37019 - Account takeover using SAML

CVE-2024-37019 is an account-takeover vulnerability in Mender Enterprise which was fixed in versions 3.6.4 and 3.7.4.
The top challenge for autonomous vehicles: What does adding AI to cars mean for OEMs?

The top challenge for autonomous vehicles: What does adding AI to cars mean for OEMs?

The critical question for the automotive industry is: how can you shorten the time to market and innovate faster in software and AVs to meet more demanding customer requirements?
View more articles

Learn more about Mender

Explore our Resource Center to discover more about how Mender empowers both you and your customers with secure and reliable over-the-air updates for IoT devices.