[yocto] When are file checksums gathered from files, for tasks? During recipe parsing?

Khem Raj raj.khem at gmail.com
Wed Nov 22 07:53:54 PST 2017


On Wed, Nov 22, 2017 at 5:51 AM, Paul Knopf <pauldotknopf at gmail.com> wrote:
> This recipe is not an image recipe. It is a recipe that packages up our
> image for deployment/updates in the field. Your method assumes I am editing
> the image recipe.

there are post/pre processing hooks for Extra operations on final
image, if you were to use those to achieve the tasks specific for your
deployment/field-update, it will fit well into workflow and you can
leverage the dependency mechanisms stated above

then you could combine this with some extra image specific tasks to
operate on rootfs during image creation.

In short, perhaps you should think about getting this done during the
final image creation instead of creating another recipe.

>
> On Wed, Nov 22, 2017 at 4:01 AM, Martin Hundebøll <mnhu at prevas.dk> wrote:
>>
>> Hi Paul,
>>
>> On 2017-11-22 09:10, Paul Knopf wrote:
>>>
>>> I have a recipe that depends on a deployed output from an image.
>>>
>>> ----------------------------------------------------------
>>> SRC_URI +=
>>> "file://${DEPLOY_DIR_IMAGE}/my-image-${MACHINE}.wic.update.tar.gz;subdir=update"
>>> do_fetch[depends] += "my-image:do_build"
>>> ----------------------------------------------------------
>>>
>>> Will the hash for "do_fetch" be computed after "my-image:do_build" is
>>> executed?
>>
>>
>> The "dependency" hash is based on the hash of the my-image recipe, so that
>> if you change the my-image.bb, then the hash of your dependent recipe
>> changes too.
>>
>>> If not, how would you propose I do something like this?
>>
>>
>> Don't put deployed images in SRC_URI, and don't put task dependencies in
>> do_fetch, as that messes with do_fetchall, should you ever need to run that.
>>
>> Look at what other recipes are doing when using images from
>> DEPLOY_DIR_IMAGE. A reworked example from one of our recipes:
>>
>>   do_image[depends] += "my-image:do_image_complete"
>>
>>   IMAGE_PREPROCESS_COMMAND += "image_prepare"
>>   image_prepare() {
>>     install ${DEPLOY_DIR_IMAGE}/my-image-${MACHINE}.wic.update.tar.gz
>> ${IMAGE_ROOTFS}/
>>   }
>>
>>
>> I hope that helps!
>>
>> // Martin
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list