[linux-yocto] Removing DISTRO_FEATURES from a specific machine type


Richard Purdie
 

On Mon, 2022-11-14 at 22:05 +0530, Pintu Agarwal wrote:
Hi,

This question is related to Yocto Dunfell specifically.

I have certain distro features defined (by default) in our distro
include/conf file.
These distro features are required for certain machines and should not
be enabled for only one machine.
For example, we have a distro feature such as "nand-squashfs".
So, in our distro.inc file we are including like this:
DISTRO_FEATURES_append = " nand-squashfs"

Since this distro.inc file is shared across 2-3 machines, this feature
will be available to all.
But we don't want to include it in the "xyz" machine.

So, can I do like this:
DISTRO_FEATURES_append = " nand-squashfs"
DISTRO_FEATURES_remove_xyz = " nand-squashfs"

If there is some other better way please suggest.
Have you looked at COMBINED_FEATURES?

This allows you to only enable something if it is in both
DISTRO_FEATURES and MACHINE_FEATURES.

Cheers,

Richard