Yocto doesn't react to update in layer recipes

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Yocto doesn't react to update in layer recipes

ソリューションへジャンプ
16,802件の閲覧回数
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 解決策
12,254件の閲覧回数
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 返答(返信)
12,254件の閲覧回数
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.

12,254件の閲覧回数
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 件の賞賛
返信
12,254件の閲覧回数
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

12,254件の閲覧回数
rathben
Contributor III

wow, glad I asked. Thanks for the link!

0 件の賞賛
返信
12,255件の閲覧回数
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 件の賞賛
返信
12,254件の閲覧回数
rathben
Contributor III

yes, this works. Thanks!

0 件の賞賛
返信