[yocto] Check IMAGE_FEATURES content in recipe

ChenQi Qi.Chen at windriver.com
Thu May 10 01:46:32 PDT 2018


Hi Piotr,

VAR set in recipe A cannot be accessed by recipe B.

For 'read-only-rootfs' image feature, tweaks are done in functions 
executed after generating rootfs.
meta/classes/rootfs-postcommands.bbclass:ROOTFS_POSTPROCESS_COMMAND += 
'${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", 
"read_only_rootfs_hook; ", "",d)}'

Can you use a similar approach to solve your problem?

Best Regards,
Chen Qi

On 05/10/2018 03:37 PM, Piotr Piwko wrote:
> Hi,
>
> I would like to check in my recipe if created image is read-only or 
> not. In order to do so, I use the following condition which I would 
> inside poky sources:
>
> if ${@bb.utils.contains('IMAGE_FEATURES', 'read-only-rootfs', 'true', 
> 'false', d)}; then
>
> However it seems that IMAGE_FEATURES variable is not exported to the 
> higher recipes. I also confirmed it's content by executing:
>
> bitbake my-image -e | grep IMAGE_FEATURES
>
> Is there any possibility to export this variable to my recipe or 
> somehow check the particular image feature?
>
> Thank you in advance for help.
>
> -- 
> Piotr Piwko
> http://www.embedded-engineering.pl/
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180510/c479449a/attachment.html>


More information about the yocto mailing list