Skip to contentSkip to conversation

How does one add do_fetch, do_unpack to an image recipe?

DISCUSSION John Klug 2 participants 3 messages Aug 7, 2021 – Aug 9, 2021

lore
Share & tools
lore

John Klug

author
#0 lore raw

I am using dunfell.

In the documentation I see:

https://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#unsetting-variables

In case some filter removes the yocto URL, I am referring to:

docs/current/bitbake-user-manual/bitbake-user-manual.html#unsetting-variables

Which has this example:

unset do_fetch[noexec]

If I put this in my image recipe, the do_fetch noexec item still exists.

In order to fix this problem I had to patch openembedded-core/meta/classes/image.bbclass, and remove the line setting do_fetch[noexec]="1" and the ones following.

I need to do a fetch for my IMAGE_POSTPROCESS_COMMAND.

Thanks.

#1 lore raw

Howdy!

Am 07.08.2021 um 02:25 schrieb John Klug:

Quoted 12 lines

I am using dunfell.

In the documentation I see:

https://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#unsetting-variables

In case some filter removes the yocto URL, I am referring to:

docs/current/bitbake-user-manual/bitbake-user-manual.html#unsetting-variables

Which has this example:

Quoted 7 lines

unset do_fetch[noexec]

If I put this in my image recipe, the do_fetch noexec item still exists.

In order to fix this problem I had to patch openembedded-core/meta/classes/image.bbclass, and remove the line setting do_fetch[noexec]="1" and the ones following.

I need to do a fetch for my IMAGE_POSTPROCESS_COMMAND.

From first glance, I'd guess that the approach is just not correct. If that thing to be fetched also needs to go *into* the image: make it a recipe on its own. If you only need it during build time, then it should probably be a -native dependency, and therefore again a recipe on its own. Then the image recipe can depend on it and use its contents during the build/postprocess stage.

Greetz

Quoted 8 lines

Thanks.

author
#2 lore raw

Thanks for your great help. A native recipe is what I needed with data in it only. So my native recipe copies files into ${D}${datadir}/${PN}.

Then my image build uses DEPENDS= to bring in the native recipe.

Then my IMAGE_POSTPROCESS_COMMAND can reference ${STAGING_DATADIR_NATIVE}/[native recipe name] to find the data it needs.

Then I don't need to patch the bbclass file.

From: [email protected] <[email protected]> on behalf of Josef Holzmayr <[email protected]>
Sent: Monday, August 9, 2021 12:41 AM
To: [email protected]
Subject: Re: [yocto] How does one add do_fetch, do_unpack to an image recipe?

Howdy!

Am 07.08.2021 um 02:25 schrieb John Klug:

Quoted 12 lines

I am using dunfell.

In the documentation I see:

http://mail2.multitech.com:32224/?dmVyPTEuMDAxJiYyOTU2NDk0NDY2NmQ1NDQyND02MTEwQzAxOF8yMDIxXzcwNzFfMSYmYjc2MzZjMTgxNGE4NTkzPTIzMzMmJnVybD1odHRwcyUzQSUyRiUyRnd3dyUyRXlvY3RvcHJvamVjdCUyRW9yZyUyRmRvY3MlMkZjdXJyZW50JTJGYml0YmFrZS11c2VyLW1hbnVhbCUyRmJpdGJha2UtdXNlci1tYW51YWwlMkVodG1sJTIzdW5zZXR0aW5nLXZhcmlhYmxlcw==

In case some filter removes the yocto URL, I am referring to:

      docs/current/bitbake-user-manual/bitbake-user-manual.html#unsetting-variables

Which has this example:

Quoted 7 lines

      unset do_fetch[noexec]

If I put this in my image recipe, the do_fetch noexec item still exists.

In order to fix this problem I had to patch openembedded-core/meta/classes/image.bbclass, and remove the line setting do_fetch[noexec]="1" and the ones following.

I need to do a fetch for my IMAGE_POSTPROCESS_COMMAND.

 From first glance, I'd guess that the approach is just not correct. If that thing to be fetched also needs to go *into* the image: make it a recipe on its own. If you only need it during build time, then it should probably be a -native dependency, and therefore again a recipe on its own. Then the image recipe can depend on it and use its contents during the build/postprocess stage.

Greetz

Quoted 8 lines

Thanks.