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?
已解决! 转到解答。
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.
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.
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
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.