Difference in installing process

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

Difference in installing process

ソリューションへジャンプ
3,479件の閲覧回数
imx7newbie
Contributor II

Hi,

While creating yocto recipe, What is difference between

IMAGE_INSTALL_append = "packagename"

and

IMAGE_INSTALL += "packagename"

Regards

ラベル(1)
タグ(2)
1 解決策
3,222件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

The simplest way to add extra packages to all images is by using the IMAGE_INSTALL variable with the _append operator:

     IMAGE_INSTALL_append = " strace"


Use of the syntax is important. Specifically, the space between the quote and the package name, which is strace in this example. This space is required since the _append operator does not add the space.

Furthermore, you must use _append instead of the += operator if you want to avoid ordering issues.

However, the reference manual is a little unclear on what "ordering issues" means. += works just fine, it's just that if you happen to use it at some point before core-image.bbclass line sets it with ?= (i.e. either in local.conf or before the "inherit core-image" line in your image recipe) the ?= line in core-image.bbclass will do nothing and you'll end up with much less in the IMAGE_INSTALL list than you expected. If you use _append, you can have that anywhere you like and it will always work, with the caveat that if you forget to add a leading space in the value to be appended, things will break.


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

1 返信
3,223件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

The simplest way to add extra packages to all images is by using the IMAGE_INSTALL variable with the _append operator:

     IMAGE_INSTALL_append = " strace"


Use of the syntax is important. Specifically, the space between the quote and the package name, which is strace in this example. This space is required since the _append operator does not add the space.

Furthermore, you must use _append instead of the += operator if you want to avoid ordering issues.

However, the reference manual is a little unclear on what "ordering issues" means. += works just fine, it's just that if you happen to use it at some point before core-image.bbclass line sets it with ?= (i.e. either in local.conf or before the "inherit core-image" line in your image recipe) the ?= line in core-image.bbclass will do nothing and you'll end up with much less in the IMAGE_INSTALL list than you expected. If you use _append, you can have that anywhere you like and it will always work, with the caveat that if you forget to add a leading space in the value to be appended, things will break.


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------