Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread Paul Eggleton
On Friday, 11 May 2018 3:06:11 AM NZST Marcelo E. Magallon wrote: > On Thu, May 10, 2018 at 10:22:34AM +0100, Burton, Ross wrote: > > >$ bitbake image-foo image-bar > > > >image-foo and image-bar both contain recipe-flob. recipe-flob will be > >built *once* to generate the packages, and those pac

Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread Marcelo E. Magallon
On Thu, May 10, 2018 at 10:22:34AM +0100, Burton, Ross wrote: $ bitbake image-foo image-bar image-foo and image-bar both contain recipe-flob. recipe-flob will be built *once* to generate the packages, and those packages used to build both images. If image-foo is read-only and image-bar is rea

Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread Piotr Piwko
czw., 10 maj 2018 o 13:02 Alexander Kanavin < alexander.kana...@linux.intel.com> napisał(a): > You should be able to move the contents of the pkg_postinst to the hook. > Actually two hooks: one for read only rootfs, another for read-write. > Add this to your image recipe: > > ROOTFS_POSTPROCESS_CO

Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread Alexander Kanavin
On 05/10/2018 11:59 AM, Piotr Piwko wrote: 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", "r

Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread Burton, Ross
On 10 May 2018 at 09:59, Piotr Piwko wrote: > >> VAR set in recipe A cannot be accessed by recipe B. >> > > All right, but what about DISTRO_FEATURES? It is available everywhere, so > maybe there is some possibility to do so ... > You need to think about what actually happens. This is a valid b

Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread Piotr Piwko
czw., 10 maj 2018 o 10:45 ChenQi napisał(a): > Hi Piotr, > > VAR set in recipe A cannot be accessed by recipe B. > All right, but what about DISTRO_FEATURES? It is available everywhere, so maybe there is some possibility to do so ... > For 'read-only-rootfs' image feature, tweaks are done in f

Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread André Draszik
Hi, To expand on that - the idea is that (binary) packages shall not be affected by the image, meaning that you should be able to install the exact same (binary) package in different images. If you were able to access image specific variables inside your package recipe (and change behaviour/conten

Re: [yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread ChenQi
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",

[yocto] Check IMAGE_FEATURES content in recipe

2018-05-10 Thread Piotr Piwko
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