[OE-core] Specifying MACHINE inside distro config only

Yevhen Kyriukha kirgene at gmail.com
Tue Jul 29 09:02:46 UTC 2014


Hi Paul,

2014-07-29 11:25 GMT+03:00 Paul Eggleton <paul.eggleton at linux.intel.com>:
> Hi Yevhen,
>
> On Tuesday 29 July 2014 09:55:20 Yevhen Kyriukha wrote:
>> I have several distro config files. I bind each of them to single machine
>> like this:
>>
>> # cat conf/distro/mydistro.conf
>>
>> DISTRO = "mydistro"
>> DISTRO_NAME = "My Distro"
>> DISTRO_VERSION = "1.01"
>> MACHINE = "cedartrail"
>> ...
>>
>> I also created "conf/auto.conf" file with following content:
>> DISTRO = "mydistro"
>> to specify distro to build.
>>
>> The problem is that without specifying MACHINE in "conf/auto.conf" I get
>> following error:
>>
>> ERROR:  OE-core's config sanity checker detected a potential
>> misconfiguration.
>>     Either fix the cause of this error or at your own risk disable the
>> checker (see sanity.conf).
>>     Following is the list of potential problems / advisories:
>>
>>     TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a
>> valid tune configuration file which will set this correctly.
>> Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH
>> ().Toolchain tunings invalid:
>> No tuning found for default multilib.
>>
>>
>> I use a script to change distro (in "auto.conf") and each distro knows its
>> machine to build for. So specifying MACHINE in "auto.conf" isn't desirable.
>>
>> Can someone tell what did I miss?
>
> This is caused by a subtlety in the way that we have structured the
> configuration files. Here's a snippet from meta/conf/bitbake.conf (which aside
> from bblayers.conf is the only file that BitBake knows to look at by itself):
>
> ---------------- snip ----------------
> ##################################################################
> # Include the rest of the config files.
> ##################################################################
>
> require conf/abi_version.conf
> include conf/site.conf
> include conf/auto.conf
> include conf/local.conf
> include conf/build/${BUILD_SYS}.conf
> include conf/target/${TARGET_SYS}.conf
> include conf/machine/${MACHINE}.conf
> include conf/machine-sdk/${SDKMACHINE}.conf
> include conf/distro/${DISTRO}.conf
> include conf/distro/defaultsetup.conf
> include conf/documentation.conf
> include conf/licenses.conf
> require conf/sanity.conf
> ---------------- snip ----------------
>
> These statements are parsed in order; thus, by the time the distro config has
> been parsed, it's too late to include the right machine config file, that's
> already happened. (These lines are in this order deliberately; the reason
> being we want to allow the distro config to easily override things that are
> specified in the machine configuration if desired.)
>
> So the answer is you simply can't do what you're trying to do with the way
> that OE is set up. You need to set the MACHINE value from local.conf /
> auto.conf, or the external environment.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre


Thanks for your clarification.

-- 
Best regards,
Yevhen



More information about the Openembedded-core mailing list