From eab4d5660064ab07c68c6ff9283b8a8a637f3bee Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 10 Nov 2013 18:30:58 -0800 Subject: [PATCH] arm-defaults.inc: Tweak DEFAULTTUNE with anonymous pything instead of overrides This will avoid making entries for every machine on earch that is based on armv7a and would like to use angstrom and its feeds, secondly it makes it unified baseline for all armv7a machines and not divide it with cortex-A8, cortex-A9 and so on Above all brings sanity Signed-off-by: Khem Raj --- conf/distro/include/arm-defaults.inc | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/conf/distro/include/arm-defaults.inc b/conf/distro/include/arm-defaults.inc index f62f3ba..906fcb8 100644 --- a/conf/distro/include/arm-defaults.inc +++ b/conf/distro/include/arm-defaults.inc @@ -1,9 +1,22 @@ -# Cortex-A8 machines: +# This function changes the default tune for machines which +# are based on armv7a to use common tune value, note that we enforce hard-float +# which is default on Ångström for armv7+ +# so if you have one of those machines which are armv7a but can't support +# hard-float, please change tune = 'armv7athf' to tune = 'armv7at' +# below but then this is for your own distro, Ångström will not support +# it +# - Khem -DEFAULTTUNE_beagleboard = "cortexa8hf-neon" -DEFAULTTUNE_beaglebone = "cortexa8hf-neon" -DEFAULTTUNE_overo = "cortexa8hf-neon" - -# Cortex-A9 machines: -DEFAULTTUNE_pandaboard = "cortexa9hf-neon" +def arm_tune_handler(d): + features = d.getVar('TUNE_FEATURES', True).split() + if 'armv7a' in features: + tune = 'armv7athf' + if 'bigendian' in features: + tune += 'b' + if 'neon' in features: + tune += '-neon' + else: + tune = d.getVar('DEFAULTTUNE', True) + return tune +DEFAULTTUNE := "${@arm_tune_handler(d)}"