Introduce MORTSGNA_ARMV7_TUNE to reduce armv7a build variant optionally

It depends on user's needs - and is not a pinned distro decision.

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2018-10-26 11:38:56 +02:00
parent 834950ff2e
commit a1c2700c09
4 changed files with 40 additions and 2 deletions

20
README
View File

@@ -9,13 +9,31 @@
meta-mortsgna is yet another distribution layer. It is based on Ångström
distribution - check https://github.com/Angstrom-distribution/meta-angstrom.
The target of this layer is to build images with the best out-of-the-box
experience.
experience and to support developers with helpers for common tasks.
-------------------------------------------------------------------------------
Layer maintainer: Andreas Müller <schnitzeltony@gmail.com>
-------------------------------------------------------------------------------
Additionally this layer checks the following variable in local.conf:
* MORTSGNA_ARMV7_TUNE:
If this variable is set to "1", all armv7a / cortex variants are build as
armv7a.
+ Reduce build time/disk-space required when building for multiple machines
- Build optimzation (e.g vfp/NEON) is not the best your machine can get
Rules of thumb:
* If you build images for multiple armv7 machines and don't need to tickle
the last quarter of your machine's performance:
Set MORTSGNA_ARMV7_TUNE="1"
* If you are intersted in best optimization for your machine and/or you have
a fast build host with lots of disk-space: don't!
-------------------------------------------------------------------------------
This layer contains the following folders:

1
TODO
View File

@@ -2,7 +2,6 @@ These are tasks are planned:
OE:
* Introduce security_flags.inc
* Add an OPTION for local.conf to reduce all armv7a to common tune values
Scripts:
* get rid of bashisms

View File

@@ -0,0 +1,17 @@
def armv7_tune_handler(d):
tune = d.getVar('DEFAULTTUNE', True)
# set MORTSGNA_ARMV7_TUNE="1" in your local.conf to reduce all cortex variants
# to common tune value
if d.getVar('MORTSGNA_ARMV7_TUNE', True) == '1':
features = d.getVar('TUNE_FEATURES', True).split()
if 'armv7a' in features or 'armv7ve' in features:
tune = 'armv7athf'
if 'bigendian' in features:
tune += 'b'
if 'neon' in features:
tune += '-neon'
else:
tune = d.getVar('DEFAULTTUNE', True)
return tune

View File

@@ -33,6 +33,10 @@ ARM_INSTRUCTION_SET_armv4 ?= "arm"
ARM_INSTRUCTION_SET_armv5 ?= "arm"
ARM_INSTRUCTION_SET_armv6 ?= "arm"
# set MORTSGNA_ARMV7_TUNE="1" in your local.conf to build armv7athf
require conf/distro/include/mortsgna-armv7-tune.inc
DEFAULTTUNE_mortsgna := "${@armv7_tune_handler(d)}"
# use debian style naming
INHERIT += "debian"