Re: Get target machine

Quentin Schulz

Hi Iggy,

On 12/1/22 13:55, Iggy via wrote:
I have a .inc file that contains this information:
# Set the MACHINE string, expected to eventually replace the long list of
# build settings below
EXTRA_OECMAKE += "-DRDK_MACHINE=${@d.getVar('MACHINE', False)} "
# Set the region and platform type (defaults to Xi6 and UK)
I understand that the append lines add extra parameters to the make call. How does Yocto know which platform to use? I mean how does it choose xione-uk or llama-us for instance?
You are building for a specific machine (MACHINE in your local.conf or via command line argument for example), so Yocto definitely knows it.

Then your machine configuration file (the one in the form of <machinename>.conf contains multiple MACHINEOVERRIDES in .inc files which define "families" under which your machine could be matched.

Since MACHINEOVERRIDES is part of OVERRIDES variable which is used to filter some variables "overrides", it'll just work (e.g. EXTRA_OECMAKE_append_<machinename>).

Hope this helps,

Join to automatically receive all group messages.