[meta-freescale] [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication

Tom Hochstein tom.hochstein at nxp.com
Fri Sep 2 07:46:33 PDT 2016


> From: Otavio Salvador [mailto:otavio.salvador at ossystems.com.br]
> Sent: Friday, September 02, 2016 5:13 AM

> It should be possible indeed however, thinking about it, I think using
> overrides offers an easier to use mechanism.

It's shorter, but I don't see the difference in syntax as a problem. The 'bb.utils.contains('*FEATURES'' is an existing idiom.

The way I see it is the Yocto framework has a high level construct of machines and a finer grained mechanism for specifying the features supported by a machine.

What you are proposing is to take our list of i.MX-specific 'items' and add them through an extension of the machine mechanism. The downside of this is it dilutes the existing Yocto framework, and makes it harder to understand.

On the other hand, it seems correct to just treat these 'items' as machine features, with no changes to the existing Yocto framework required. Furthermore, by implementing this as a set of machine features, we gain the existing capabilities of the framework, mainly that the user can choose to not use an i.MX machine feature even if it is on his SOC. (See the COMBINED_FEATURES variable.)

> Another benefit is that with the extender, we define the features on a
> single place (imx-base.inc) and every board using the respective SoC
> will use it. For machine features we would need to set it in every
> board which is easy to get wrong.

We would need an extra require line from each machine configuration file to specify the SOC configuration. This line replaces the proposed MACHINEOVERRIDES line in the machine configuration file, and so it is no easier to get wrong.

Tom


More information about the meta-freescale mailing list