Skip to contentSkip to conversation

bbappend usage

yocto Leon Woestenberg 4 participants 4 messages Oct 25, 2021 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello Steve,

Is the approach where you remove the recipes from the image an option? Is there a reason why you want to build the recipes that you do not want to appear in your image?

Regards,

Leon.

Signature · 13 lines
Leon Woestenberg
[email protected]
T: +31 40 711 42 76
M: +31 6 472 30 372

Sidebranch Embedded Systems
Eindhoven, The Netherlands
http://www.sidebranch.com



On Mon, Oct 25, 2021 at 2:55 PM Monsees, Steven C (US) via
lists.yoctoproject.org
Quoted 40 lines · <[email protected]> wrote:

Hello:

If I am building an image “image-ABC”, and it is composed of a number recipes, and for some of these recipes I may NOT want to install their final components within my image…

Which is the best place to modify the build with bbappend ?

Would I modify a recipe’s do_install (do_install_append-recipe_xyz) ?, or would I modify the image recipe (do_install_append-image_ABC) I am leaning this way to avoid cases where the component recipes might have bbappends in place already ?

Looking for the proper Yocto way…

Thanks,

Steve

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55136): https://lists.yoctoproject.org/g/yocto/message/55136
Mute This Topic: https://lists.yoctoproject.org/mt/86576092/1051774
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

I am looking to selectively remove portions of 1or 2 components I will not be using from my running image

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Leon Woestenberg
Sent: Monday, October 25, 2021 9:12 AM
To: Monsees, Steven C (US) <[email protected]>
Cc: [email protected]
Subject: Re: [yocto] bbappend usage

External Email Alert

This email has been sent from an account outside of the BAE Systems network.

Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar.

Hello Steve,

Is the approach where you remove the recipes from the image an option?
Is there a reason why you want to build the recipes that you do not want to appear in your image?

Regards,

Leon.

--
Leon Woestenberg
[email protected]
T: +31 40 711 42 76
M: +31 6 472 30 372

Sidebranch Embedded Systems
Eindhoven, The Netherlands
http://www.sidebranch.com

Quoted 36 lines · Steven C (US) via lists.yoctoproject.org

Hello:

If I am building an image “image-ABC”, and it is composed of a number recipes, and for some of these recipes I may NOT want to install their final components within my image…

Which is the best place to modify the build with bbappend ?

Would I modify a recipe’s do_install (do_install_append-recipe_xyz) ?, or would I modify the image recipe (do_install_append-image_ABC) I am leaning this way to avoid cases where the component recipes might have bbappends in place already ?

Looking for the proper Yocto way…

Thanks,

Steve

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

There is no one-size-fits-all answer to this. It helps if you provide
specifics: what components and what portions of them and why.

Alex

Quoted 101 lines · Steven C (US) via lists.yoctoproject.org

I am looking to selectively remove portions of 1or 2 components I will not be using from my running image

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Leon Woestenberg
Sent: Monday, October 25, 2021 9:12 AM
To: Monsees, Steven C (US) <[email protected]>
Cc: [email protected]
Subject: Re: [yocto] bbappend usage

External Email Alert

This email has been sent from an account outside of the BAE Systems network.

Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar.

Hello Steve,

Is the approach where you remove the recipes from the image an option? Is there a reason why you want to build the recipes that you do not want to appear in your image?

Regards,

Leon.

--
Leon Woestenberg
[email protected]
T: +31 40 711 42 76
M: +31 6 472 30 372

Sidebranch Embedded Systems
Eindhoven, The Netherlands
http://www.sidebranch.com

Quoted 13 lines · Steven C (US) via lists.yoctoproject.org

Hello:

If I am building an image “image-ABC”, and it is composed of a number recipes, and for some of these recipes I may NOT want to install their final components within my image…

Quoted 5 lines

Which is the best place to modify the build with bbappend ?

Would I modify a recipe’s do_install (do_install_append-recipe_xyz) ?,

or would I modify the image recipe (do_install_append-image_ABC) I am leaning this way to avoid cases where the component recipes might have bbappends in place already ?

Quoted 18 lines

Looking for the proper Yocto way…

Thanks,

Steve

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#55141):
https://lists.yoctoproject.org/g/yocto/message/55141
Mute This Topic: https://lists.yoctoproject.org/mt/86576092/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
In reply to a message not in the archive

The super yoctoish way would be to alter the packaging of the recipe to your needs.

Let's assume recipe-a consists of the files

foo
bar

and it would package both files into recipe-a pkg.

In the actual image you only install packages into a file system, so if you don't want bar to be installed into your final image, it'd be best to package bar into a separate package.

PACKAGES_BEFORE_PN = "${PN}-bar"
FILES:${PN}-bar = "bar"

in this case the recipe would produce

recipe-a (containing just foo)
recipe-a-bar (containing just bar)

You could install now (via IMAGE_INSTALL in your image recipe) just add recipe-a and only foo would be put into the final image.

While a potential other image (IMAGE_INSTALL += "recipe-a-bar recipe-a") would contain both.

But if you'd go down that road you have to make sure that runtime dependencies between the packages are met (using REDEPENDS:* statements), as otherwise it could turn into very hard to debug issues. So I would propose to **not** do that via bbappends, but forks of the recipes you want to repackage.

Another option (as likely mentioned already) is to use

rem_stuff() {
rm ${IMAGE_ROOTFS}/<file you want to delete>
}

ROOTFS_POSTPROCESS_COMMAND += "rem_stuff;"

in your image recipe

Quoted 24 lines · Steven C (US) via lists.yoctoproject.org

Hello:

If I am building an image “image-ABC”, and it is composed of a number recipes, and for some of these recipes I may NOT want to install their final components within my image…

Which is the best place to modify the build with bbappend ?

Would I modify a recipe’s do_install (do_install_append-recipe_xyz) ?, or would I modify the image recipe (do_install_append-image_ABC) I am leaning this way to avoid cases where the component recipes might have bbappends in place already ?

Looking for the proper Yocto way…

Thanks,

Steve

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55136): https://lists.yoctoproject.org/g/yocto/message/55136
Mute This Topic: https://lists.yoctoproject.org/mt/86576092/3647476
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-