Troubleshooting build failures
In the two preceding chapters, we learned how to build bootable images for QEMU, our Nova board, and the Raspberry Pi 4. But what happens when things go wrong? In this section, we will cover a number of useful debugging techniques that should make the prospect of wrangling Yocto build failures less intimidating.
To execute the commands in the subsequent exercises, you need to activate a BitBake environment, as follows:
- First, navigate one level above the directory where you cloned Yocto.
- Next, set up your BitBake work environment:
$ source poky/oe-init-build-env build-rpi
This sets a bunch of environment variables and puts you back in the build-rpi
directory that we created in the previous chapter.
Isolating errors
So, your build failed, but where did it fail? You have an error message, but what does it mean and where did it come from? Do not despair. The first step in debugging is reproducing the bug. Once you can reproduce...