Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force package to be recompiled on Yocto

Tags:

yocto

bitbake

TL;DR: Is there a way to force to recompile a package every time an image is generated?

I have a bbappend with a do_deploy_append appending to a file and if I modify this step, the recipe will not be recompiled when generating an image using it. This can lead to errors pretty hard to ind. Bitbake assumes it has been unchanged. I have only 2 packages like this, very small.

Is there a parameter to force those package being cleaned and recompiled without manually do it?

I am using Yocto morty

like image 901
David Bensoussan Avatar asked Jan 29 '23 10:01

David Bensoussan


1 Answers

Generally speaking, if you want a task to always be executed, you should use the [nostamp] varflag on this task, which should be set to "1". For example, if you want the recipe to be recompiled every time, you should add the below line to the package's recipe:

do_compile[nostamp] = "1"

To always execute the do_configure task, you should add the following line:

do_configure[nostamp] = "1"

This applies for any task that you need to always be executed. Have a look here for more information on nostamp variable flag: http://www.yoctoproject.org/docs/2.3.2/bitbake-user-manual/bitbake-user-manual.html

like image 148
john madieu Avatar answered Mar 19 '23 19:03

john madieu