Difference in installing process

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

Difference in installing process

跳至解决方案
2,172 次查看
imx7newbie
Contributor II

Hi,

While creating yocto recipe, What is difference between

IMAGE_INSTALL_append = "packagename"

and

IMAGE_INSTALL += "packagename"

Regards

标签 (1)
标记 (2)
1 解答
1,915 次查看
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 回复
1,916 次查看
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!
-----------------------------------------------------------------------------------------------------------------------