Get target machine
Hi,
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) EXTRA_OECMAKE_append_xione-uk = " -DRDK_PLATFORM=XI1 -DREGION=UK " EXTRA_OECMAKE_append_xione-us = " -DRDK_PLATFORM=XI1 -DREGION=UK "
EXTRA_OECMAKE_append_llama-uk = " -DRDK_PLATFORM=LLAMA -DREGION=UK " EXTRA_OECMAKE_append_llama-us = " -DRDK_PLATFORM=LLAMA -DREGION=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?
Plus is there a variable that captures the target name, i.e. "xione-uk", "xione-us", etc?
Hi Iggy,
Quoted 8 lines · Iggy via lists.yoctoproject.org
Hi,
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)} "
Quoted 9 lines
# Set the region and platform type (defaults to Xi6 and UK) EXTRA_OECMAKE_append_xione-uk = " -DRDK_PLATFORM=XI1 -DREGION=UK " EXTRA_OECMAKE_append_xione-us = " -DRDK_PLATFORM=XI1 -DREGION=UK "
EXTRA_OECMAKE_append_llama-uk = " -DRDK_PLATFORM=LLAMA -DREGION=UK " EXTRA_OECMAKE_append_llama-us = " -DRDK_PLATFORM=LLAMA -DREGION=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,
Cheers,
Quentin
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Private: Re: [yocto] Get target machine
Hi Iggy,
Please keep the mailing list in copy.
Quoted 6 lines · j.ignatius via lists.yoctoproject.org
Thanks Quentin for your reply.
I found a number of product-config.in files under different target folders like xione-uk, xione-us, etc. These must be the machine configuration files.
How does yocto choose the right one? Are there some conditional expressions that do this? Could you give me an example?
You tell Yocto to build for a specific MACHINE (this is the name of the variable) either from the command line when calling bitbake or in your local.conf file in build/conf.
MACHINE is the filename without the extension where the configuration is located. e.g. xione-uk MACHINE definition will be in some layer in conf/machine/xione-uk.conf.
Cheers,
Quentin
Re: Private: Re: [yocto] Get target machine
Makes sense. Thanks for your help.