All of lore.kernel.org
 help / color / mirror / Atom feed
* Custom image type and CONVERSION_CMD images softlink problem
@ 2018-03-29  9:20 Mirza Krak
  2018-04-02 19:29 ` Mirza Krak
  0 siblings, 1 reply; 3+ messages in thread
From: Mirza Krak @ 2018-03-29  9:20 UTC (permalink / raw)
  To: yocto

Hi.

I am working with a project that has a custom image type, "sdimg". The
image works fine but it is when I try to apply CONVERSION_CMDs that I
see some interesting things.

The image output is:

     ${IMGDEPLOYDIR}/${IMAGE_NAME}.$suffix

There is also a soft-link:

    ln -sfn "${IMAGE_NAME}.$suffix"
"${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.$suffix"

Now the interesting part comes when I try this:

     IMAGE_FSTYPES += "sdimg.gz"

This results in a empty gz file, but I already know why and that is
because the "normal" image does not contain IMAGE_NAME_SUFFIX in the
output name, on which the CONVERSION_CMDs rely on [1].

So instead of changing the image name I was hoping that this should
work (default is ".rootfs" in image_types.bbclass):

    IMAGE_NAME_SUFFIX_sdimg = ""

But above only partly works. It will generate a proper "gz" version of
"sdimg" but it fails to create a soft-link, that is
${IMAGE_BASENAME}-${MACHINE}.sdimg.gz -> ${IMAGE_NAME}.sdimg.gz. And I
have traced down on why. It is because image.bbclass still reads
IMAGE_NAME_SUFFIX as ".rootfs" in create_symlinks[2] even though I
have set it to something else for my specific image type (override).

I have a couple of workarounds for this already but still wanted to
report this and see what the community thinks about this. I would
expect what I am trying to do, to work. That is to set
IMAGE_NAME_SUFFIX to empty for the custom image.

But you might be of another opinion.

[1]. https://github.com/openembedded/openembedded-core/blob/master/meta/classes/image_types.bbclass#L284
[2]. https://github.com/openembedded/openembedded-core/blob/master/meta/classes/image.bbclass#L592-L614

-- 
Med Vänliga Hälsningar / Best Regards

Mirza Krak
email: mirza@mkrak.org
web: http://mkrak.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Custom image type and CONVERSION_CMD images softlink problem
  2018-03-29  9:20 Custom image type and CONVERSION_CMD images softlink problem Mirza Krak
@ 2018-04-02 19:29 ` Mirza Krak
  2018-04-02 20:03   ` Mirza Krak
  0 siblings, 1 reply; 3+ messages in thread
From: Mirza Krak @ 2018-04-02 19:29 UTC (permalink / raw)
  To: yocto

On 29 March 2018 at 11:20, Mirza Krak <mirza@mkrak.org> wrote:
> Hi.
>
> I am working with a project that has a custom image type, "sdimg". The
> image works fine but it is when I try to apply CONVERSION_CMDs that I
> see some interesting things.
>
> The image output is:
>
>      ${IMGDEPLOYDIR}/${IMAGE_NAME}.$suffix
>
> There is also a soft-link:
>
>     ln -sfn "${IMAGE_NAME}.$suffix"
> "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.$suffix"
>
> Now the interesting part comes when I try this:
>
>      IMAGE_FSTYPES += "sdimg.gz"
>
> This results in a empty gz file, but I already know why and that is
> because the "normal" image does not contain IMAGE_NAME_SUFFIX in the
> output name, on which the CONVERSION_CMDs rely on [1].
>
> So instead of changing the image name I was hoping that this should
> work (default is ".rootfs" in image_types.bbclass):
>
>     IMAGE_NAME_SUFFIX_sdimg = ""
>
> But above only partly works. It will generate a proper "gz" version of
> "sdimg" but it fails to create a soft-link, that is
> ${IMAGE_BASENAME}-${MACHINE}.sdimg.gz -> ${IMAGE_NAME}.sdimg.gz. And I
> have traced down on why. It is because image.bbclass still reads
> IMAGE_NAME_SUFFIX as ".rootfs" in create_symlinks[2] even though I
> have set it to something else for my specific image type (override).
>
> I have a couple of workarounds for this already but still wanted to
> report this and see what the community thinks about this. I would
> expect what I am trying to do, to work. That is to set
> IMAGE_NAME_SUFFIX to empty for the custom image.
>
> But you might be of another opinion.
>
> [1]. https://github.com/openembedded/openembedded-core/blob/master/meta/classes/image_types.bbclass#L284
> [2]. https://github.com/openembedded/openembedded-core/blob/master/meta/classes/image.bbclass#L592-L614
>

Re-send, because my initial mail got stuck for moderator approval due
to not being registered on the mailing-list with this email, I am now
and bypassing moderators :).

-- 
Med Vänliga Hälsningar / Best Regards

Mirza Krak
email: mirza@mkrak.org
web: http://mkrak.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Custom image type and CONVERSION_CMD images softlink problem
  2018-04-02 19:29 ` Mirza Krak
@ 2018-04-02 20:03   ` Mirza Krak
  0 siblings, 0 replies; 3+ messages in thread
From: Mirza Krak @ 2018-04-02 20:03 UTC (permalink / raw)
  To: yocto

On 2 April 2018 at 21:29, Mirza Krak <mirza@mkrak.org> wrote:
> On 29 March 2018 at 11:20, Mirza Krak <mirza@mkrak.org> wrote:
>> Hi.
>>
>> I am working with a project that has a custom image type, "sdimg". The
>> image works fine but it is when I try to apply CONVERSION_CMDs that I
>> see some interesting things.
>>
>> The image output is:
>>
>>      ${IMGDEPLOYDIR}/${IMAGE_NAME}.$suffix
>>
>> There is also a soft-link:
>>
>>     ln -sfn "${IMAGE_NAME}.$suffix"
>> "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.$suffix"
>>
>> Now the interesting part comes when I try this:
>>
>>      IMAGE_FSTYPES += "sdimg.gz"
>>
>> This results in a empty gz file, but I already know why and that is
>> because the "normal" image does not contain IMAGE_NAME_SUFFIX in the
>> output name, on which the CONVERSION_CMDs rely on [1].
>>
>> So instead of changing the image name I was hoping that this should
>> work (default is ".rootfs" in image_types.bbclass):
>>
>>     IMAGE_NAME_SUFFIX_sdimg = ""

Some addition information.

It seems if I if I do this:

   IMAGE_NAME_SUFFIX_sdimg = ""
   do_image_sdimg[imgsuffix] = ""

Then all steps are completed as expected (gz created and symlink is correct)
-- 
Med Vänliga Hälsningar / Best Regards

Mirza Krak
email: mirza@mkrak.org
web: http://mkrak.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-02 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29  9:20 Custom image type and CONVERSION_CMD images softlink problem Mirza Krak
2018-04-02 19:29 ` Mirza Krak
2018-04-02 20:03   ` Mirza Krak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.