All of lore.kernel.org
 help / color / mirror / Atom feed
* Get target machine
@ 2022-12-01 12:55 Iggy
  2022-12-01 16:02 ` [yocto] " Quentin Schulz
  0 siblings, 1 reply; 4+ messages in thread
From: Iggy @ 2022-12-01 12:55 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 1028 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Get target machine
  2022-12-01 12:55 Get target machine Iggy
@ 2022-12-01 16:02 ` Quentin Schulz
       [not found]   ` <6562.1669946313565125249@lists.yoctoproject.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2022-12-01 16:02 UTC (permalink / raw)
  To: j.ignatius, yocto

Hi Iggy,

On 12/1/22 13:55, Iggy via lists.yoctoproject.org wrote:
> 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?
> 

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Private: Re: [yocto] Get target machine
       [not found]   ` <6562.1669946313565125249@lists.yoctoproject.org>
@ 2022-12-02  8:45     ` Quentin Schulz
  2022-12-02  9:03       ` Iggy
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2022-12-02  8:45 UTC (permalink / raw)
  To: Iggy; +Cc: yocto

Hi Iggy,

Please keep the mailing list in copy.

On 12/2/22 02:58, j.ignatius via lists.yoctoproject.org wrote:
> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Private: Re: [yocto] Get target machine
  2022-12-02  8:45     ` Private: " Quentin Schulz
@ 2022-12-02  9:03       ` Iggy
  0 siblings, 0 replies; 4+ messages in thread
From: Iggy @ 2022-12-02  9:03 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 36 bytes --]

Makes sense. Thanks for your help.

[-- Attachment #2: Type: text/html, Size: 36 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-02  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 12:55 Get target machine Iggy
2022-12-01 16:02 ` [yocto] " Quentin Schulz
     [not found]   ` <6562.1669946313565125249@lists.yoctoproject.org>
2022-12-02  8:45     ` Private: " Quentin Schulz
2022-12-02  9:03       ` Iggy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.