Yocto and OTA software updates in an IoT project
Yocto is an entire operating system image from scratch from source and a Yocto software update should be over-the-air at this point. You can learn here how to prepare a Yocto Project environment from scratch or go further and create custom images using the Yocto Project. Yocto comes with the advantages of being light and streamlined as a distribution. Yocto is a source-based distribution which the user must build themselves and after you have gone through the installation steps, you get a bootable image that you can use on your board. Yocto has a big advantage: it is far more customizable than Ubuntu, but this also means that Yocto includes very little by default.
Build Yocto from the ground up
Yocto is good for embedded projects because it's small and can be tailored as your use cases grow. You build Yocto from the ground up. Think of Yocto with this analogy: with your personal laptop if you insert a USB device, you just expect that this is just going to work. Ubuntu is similar, but this is almost certainly not going to be the case on the Yocto because whatever you insert, that driver will be missing because you didn't ask for it specifically. This consideration may not be so important in embedded as more than likely every piece of hardware that's going to be on that device so you will never have anything unexpected there.
For an embedded engineer who wants to start with a base minimal image, then this is what you will get with Yocto. Yocto is minimal by design, just text, no graphics, and a lot of tools will not be included. For example, if you want to use Bluetooth, for example, you will find the Bluetooth driver included with Ubuntu but not Yocto. Ubuntu might be more practical from the perspective of having all the tools readily available. But depending on the functionality you want to add, Yocto is probably a better way to do it as it’s more modular.
Yocto as source code for embedded image vs pre-compiled
Yocto is the source code for an embedded image. The alternative would be to use Ubuntu. This is something that's been pre-compiled. With lots of software, all the things are combined into a binary blob, which can then be modified and you can get something quite predictable out of it. But it's not quite the same as having Yocto. First of all, Yocto is much more flexible. Yocto puts a lot of effort into making sure that if you build once with a certain set of build parameters, the next time it is going to be the same. Ubuntu on the other hand comes with some sensitivities. If you download Ubuntu on a certain day, they will have this image online. The next day, they have a different image because they patch something and now this is the new image. So with Ubuntu, you must deal with rolling releases. The advantage of Yocto image is that it is very predictable and stable in what you can build. Then you can with confidence make the move to a more recent OS, once you have decided the time is right in your IoT project.
Yocto is efficient and small in size
Yocto also comes with the great benefit of being small in size. In fact, it can be made much much smaller than Ubuntu. The smallest Yocto image we have seen is 600 megabytes in size, where 3Gbytes is the smallest we have seen for Unbuntu. So you can save a lot there which is very important for flashing to memory and performing software updates to the devices over cellular networks. Compatibility is going to be practically the same for both x86 and ARM architectures. Ubuntu might be slightly more compatible with ARM than Yocto, as they have put a lot of work into making sure that all software will run there. Yocto with its specific vertical focus may not be as up to date and so you have to be ready for certain challenges when it comes to using Yocto with ARM.
Consider reading these other articles on Yocto: