[OE-core] Tune files and knobs to turn

Koen Kooi koen at dominion.thruhere.net
Tue Jun 28 19:18:51 UTC 2011


Op 28 jun 2011, om 21:13 heeft Darren Hart het volgende geschreven:

> 
> 
> On 06/28/2011 10:38 AM, Koen Kooi wrote:
>> 
>> Op 28 jun 2011, om 19:36 heeft Darren Hart het volgende geschreven:
>> 
>>> 
>>> 
>>> On 06/24/2011 04:54 AM, Koen Kooi wrote:
>>>> Hi,
>>>> 
>>>> We discussed tune files a bit during last nights TSC meeting and Khem had
>>>> expressed the need before, so I'd like to get this discussion started by using
>>>> armv7a as an example.
>>>> 
>>>> For armv7a capable cores we have the following hardware features:
>>>> 
>>>> * armv7a instruction set
>>>> * thumb1 instruction set
>>>> * thumb2 instruction set
>>>> * VFP coprocessor
>>>> * optional NEON coprocessor
>>>> 
>>>> For the ABI we can choose the following:
>>>> 
>>>> * softtp without hw support (e.g. no VFP instructions emitted, slow)
>>>> * softfp with hw support (e.g. VFP and/or NEON instructions emitted, fast)
>>>> * hardfp, emits VFP and/or NEON instructions, slightly faster than softfp/hw,
>>>> incompatible with everything else
>>>> 
>>>> And the extra knobs:
>>>> 
>>>> * pure thumb1, no arm instructions (limited use)
>>>> * thumb1/arm interworking
>>>> * pure thumb2,  no arm instructions
>>>> * thumb2 interworking (not sure if that's actually usefull, thumb2 has complete coverage)
>>>> 
>>>> In OE .dev we have the following vars:
>>>> 
>>>> TARGET_FPU: switches between hw float and sw float, no reflection in package arch
>>>> ARM_FP_ABI: switches between softfp and hardfp, will create 'armv7a' or
>>>>           'armv7a-hardfp' as package arch
>>>> ARM_INSTRUCTION_SET: switches between arm and thumb1, no reflection in package arch
>>>> THUMB_INTERWORK: turns on interworking, no reflection in package arch
>>>> 
>>>> (side note, oe-core/distroless and meta-yocto/poky don't turn set TARGET_FPU
>>>> for armv7a and will generate slow code, angstrom does turn it on)
>>> 
>>> 
>>> oe-core tune-cortexa8.inc doesn't make use of these variables (unlike
>>> meta-texasinstruments) and does make use of the neon coprocessor, but
>>> still uses the softfp float-api:
>>> 
>>> TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon
>>> -mfloat-abi=softfp -fno-tree-vectorize"
>> 
>> Don't confuse softfp calling conventions with softfloat! The above will still emit
>> vfp and neon instructions if your set TARGET_FPU = hard
> 
> Ah. So we would need to add something like:
> 
> conf/distro/include/angstrom.inc:TARGET_FPU_armv7a ?= "hard"
> conf/distro/include/angstrom.inc:TARGET_FPU_armv7a-vfp ?= "hard"
> 
> to something DISTRO specific (poky.conf or similar).

That won't work because FEED_ARCH/BASE_PACKAGE_ARCH isn't in overrides for oe-core/poky

> It isn't clear to me why this is a distro policy decision instead of
> part of the tune include or the machine config itself.
> 
> Can someone elaborate on why this goes where it does?

It isn't inherently hardware specific and might need to link to evil sourceless binaries from $evil_vendor and you want to be able to have your DISTRO control that knob. There are other usecases as well, but the evil vendor one is the most common.



More information about the Openembedded-core mailing list