Yocto doesn't react to update in layer recipes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto doesn't react to update in layer recipes

Jump to solution
11,920 Views
rathben
Contributor III

I specify a recipe for linux-imx in my own layer. As Freescale releases updates to linux-imx I'll update the SHA on the SRCREV= line to refer to an updated version of linux-imx. I commit and push my updated layer, then update my yocto directory via a repo sync. I'll see the linux-mx recipe get updated however I cannot figure out how to convince/trick yocto into pulling the correct version of the kernel into it's working directories. I've tried a variety of bitbake commands without any luck. Any ideas?

Labels (1)
1 Solution
7,372 Views
gusarambula
NXP TechSupport
NXP TechSupport

Unfortunately since Yocto is not designed for development but rather for distribution it won’t strictly follow up on files being changed. You would need to clean and then bake again so make sure that the changes are reflected.

$ bitbake –c clean <RECIPE OR IMAGE>

$ bitbake < RECIPE OR IMAGE >

Please try it and let us know if it works. It is recommended, however, to compile directly with the toolchain while developing and once the code is ready releasing it through Yocto.

View solution in original post

0 Kudos
6 Replies
7,372 Views
leoschwab
Contributor III

I just went through this $(EXPLETIVE) with our recipe book.  It seems that a recent-ish change to Yocto made changes to SRCREV insufficient to trigger an update/rebuild.  (Actually, it triggers a fetch and unpack, but it unpacks the old version, so you end up burning CPU cycles rebuilding what you already have).  Yocto now apparently almost exclusively focuses its attention on ${PV}.

The "solution", therefore, is to incorporate SRCREV into PV, along the following lines:

SRCREV = "{Git SHA1 commit ID}"

PV="1.0+git${SRCPV}"

Thus, when you update SRCREV, PV will get changed, too, and trigger a rebuild.  Remember that SRCREV must point to a commit on the same branch as you specified in SRCURI.  Also, expect your build/tmp/work/... directory tree to get larger as stale build revs get left behind.

7,372 Views
rathben
Contributor III

Thanks, and I feel your pain. :smileyhappy: I will try this. I think you have a typo in your solution: SRCPV meant to be SRCREV, right?

0 Kudos
7,372 Views
leoschwab
Contributor III

Ben Rathke wrote:

I think you have a typo in your solution: SRCPV meant to be SRCREV, right?

No!  ${SRCPV} is correct; it's a permutation of SRCREV:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-SRCPV

7,372 Views
rathben
Contributor III

wow, glad I asked. Thanks for the link!

0 Kudos
7,373 Views
gusarambula
NXP TechSupport
NXP TechSupport

Unfortunately since Yocto is not designed for development but rather for distribution it won’t strictly follow up on files being changed. You would need to clean and then bake again so make sure that the changes are reflected.

$ bitbake –c clean <RECIPE OR IMAGE>

$ bitbake < RECIPE OR IMAGE >

Please try it and let us know if it works. It is recommended, however, to compile directly with the toolchain while developing and once the code is ready releasing it through Yocto.

0 Kudos
7,372 Views
rathben
Contributor III

yes, this works. Thanks!

0 Kudos