Yocto / Bitbake : How to recover after a build crash

50 Views Asked by At

Quite a few times my build has crashed prob due to resource exhaustion. This usually crashes the terminal I'm building from as well. Anyway, when this happens my recipe is stuck in a deadlock, meaning I get some build errors when trying to re-build.

I've tried cleaning the recipe with all the cleaning options without any luck. Then I've tried locating the build output of that recipe and manually deleting that to get yocto to build from a clean state, but no luck there either. Finally the only option I've found that to get out of it is to nuke the whole tmp folder and completely re-build everything. Surely there has to be a better way.

1

There are 1 best solutions below

2
Cleiton Bueno On

Try limiting resources by configuring the options below in conf/local.conf:

BB_NUMBER_THREADS = "4"
PARALLEL_MAKE = "-j 4"
PARALLEL_MAKEINST = "-j 4"

To clean the recipes, try with cleansstate and if it persists, try with cleanall which will also remove the download:

bitbake -c cleansstate <your-recipe-here>

or

bitbake -c cleanall <your-recipe-here>