Yocto doesn't react to update in layer recipes

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Yocto doesn't react to update in layer recipes

跳至解决方案
13,164 次查看
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?

标签 (1)
1 解答
8,616 次查看
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 项奖励
回复
6 回复数
8,616 次查看
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.

8,616 次查看
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 项奖励
回复
8,616 次查看
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

8,616 次查看
rathben
Contributor III

wow, glad I asked. Thanks for the link!

0 项奖励
回复
8,617 次查看
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 项奖励
回复
8,616 次查看
rathben
Contributor III

yes, this works. Thanks!

0 项奖励
回复