Patchwork [1/7] conf/machine/include/README: Add readme to explain cpu tunings

login
register
mail settings
Submitter Mark Hatle
Date April 3, 2012, 7:47 p.m.
Message ID <558f20b409b75d18d426a471c3aa5bd296df9aa7.1333481624.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/25109/
State Accepted
Commit e138f9f7e48e0af94c5c88045c4f0581cc68248d
Headers show

Comments

Mark Hatle - April 3, 2012, 7:47 p.m.
Add a new README that covers the basic items used with various cpu
tunings.  The goal is to better help people understand the various
settings and where things should or should not be defined.

Corresponding architecture README files will also be generated to
explain the particulars of architectural tunings.

Also remove the default TUNE_PKGARCH setting in bitbake.conf.  This
was done to ensure an error occurs if an invalid tuning is defined.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/conf/bitbake.conf           |    1 -
 meta/conf/machine/include/README |   77 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+), 1 deletions(-)
 create mode 100644 meta/conf/machine/include/README
Chris Larson - April 4, 2012, 12:40 a.m.
On Tue, Apr 3, 2012 at 12:47 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> Add a new README that covers the basic items used with various cpu
> tunings.  The goal is to better help people understand the various
> settings and where things should or should not be defined.
>
> Corresponding architecture README files will also be generated to
> explain the particulars of architectural tunings.
>
> Also remove the default TUNE_PKGARCH setting in bitbake.conf.  This
> was done to ensure an error occurs if an invalid tuning is defined.
>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

This looks great, nice work on all of this. One question I have, which
isn't answered in the documentation you add, is when/where
ABIEXTENSION is utilized.
Otavio Salvador - April 4, 2012, 1:58 a.m.
On Tue, Apr 3, 2012 at 16:47, Mark Hatle <mark.hatle@windriver.com> wrote:
...
> +TUNE_ARCH - The GNU canonical arch for a specific architecture.  i.e.
> +arm, armeb, mips, mips64, etc.  This value is by bitbake to setup
> +configure. TUNE_ARCH definitions are specific to a given architecture.
> +They may be a single static definitions, or may be dynamically adjusted.
> +See each architectures README for details for that CPU family.

... This value /is used by bitbake/ ...

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 824ef04..b4669d3 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -96,7 +96,6 @@  TUNE_CCARGS ??= ""
 TUNE_LDARGS ??= ""
 TUNE_ASARGS ??= ""
 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
-TUNE_PKGARCH ??= "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
 LIBCEXTENSION ??= ""
 ABIEXTENSION ??= ""
 
diff --git a/meta/conf/machine/include/README b/meta/conf/machine/include/README
new file mode 100644
index 0000000..6a3a63d
--- /dev/null
+++ b/meta/conf/machine/include/README
@@ -0,0 +1,77 @@ 
+2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
+ - Initial Revision
+
+The individual CPU, and ABI tunings are contained in this directory.  A 
+number of local and global variables are used to control the way the 
+tunings are setup and how they work together to specify an optimized 
+configuration.
+
+The following is brief summary of the generic components that are used 
+in these tunings.
+
+AVAILTUNES - This is a list of all of the tuning definitions currently 
+available in the system.  Not all tunes in this list may be compatible 
+with the machine configuration, or each other in a multilib 
+configuration.  Each tuning file can add to this list using "+=", but 
+should never replace the list using "=".
+
+DEFAULTTUNE - This specifies the tune to use for a particular build.  
+Each tune should specify a reasonable default, which can be overriden by 
+a machine or multilib configuration.  The specified tune must be listed 
+in the AVAILTUNES.
+
+TUNEVALID[feature] - The <feature> is defined with a human readable 
+explanation for what it does.  All architectural, cpu, abi, etc tuning 
+features must be defined using TUNEVALID.
+
+TUNE_FEATURES - This is automatically defined as TUNE_FEATURES_tune-<tune>.
+See TUNE_FEATURES_tune-<tune> for more information.
+
+TUNE_FEATURES_tune-<tune> - Specify the features used to describe a 
+specific tune.  This is a list of features that a tune support, each 
+feature must be in the TUNEVALID list.  Note: the tune and a given 
+feature name may be the same, but they have different purposes.  Only 
+features may be used to change behavior, while tunes are used to 
+describe an overall set of features.
+
+ABIEXTENSION - An ABI extension may be specified by a specific feature 
+or other tuning setting, such as TARGET_FPU.  Any ABI extensions either 
+need to be defined in the architectures base arch file, i.e.  
+ABIEXTENSION = "eabi" in the arm case, or appended to in specific tune 
+files with a ".=".  Spaces are not allowed in this variable.
+
+TUNE_CCARGS - Setup the cflags based on the TUNE_FEATURES settings.  
+These should be additive when defined using "+=".  All items in this 
+list should be dynamic! i.e. 
+${@bb.utils.contains("TUNE_FEATURES", "feature", "cflag", "!cflag", d)}
+
+TUNE_ARCH - The GNU canonical arch for a specific architecture.  i.e. 
+arm, armeb, mips, mips64, etc.  This value is by bitbake to setup 
+configure. TUNE_ARCH definitions are specific to a given architecture.  
+They may be a single static definitions, or may be dynamically adjusted.  
+See each architectures README for details for that CPU family.
+
+TUNE_PKGARCH - The package architecture used by the packaging systems to 
+define the architecture, abi and tuning of a particular package.  
+Similarly to TUNE_ARCH, the definition of TUNE_PKGARCH is specific to 
+each architecture. See each architectures README for details for that 
+CPU family.
+
+PACKAGE_EXTRA_ARCHS - Lists all runtime compatible package 
+architectures.  By default this is equal to 
+PACKAGE_EXTRA_ARCHS_tune-<tune>.  If an architecture deviates from the 
+default it will be listed in the architecture README.
+
+PACKAGE_EXTRA_ARCHS_tune-<tune> - List all of the package architectures 
+that are compatible with this specific tune.  The package arch of this 
+tune must be in the list.
+
+TARGET_FPU - The FPU setting for a given tune, hard (generate floating 
+point instructions), soft (generate internal gcc calls), "other" 
+architecture specific floating point.  This is synchronized with the 
+compiler and other toolchain items.  This should be dynamically 
+configured in the same way that TUNE_CCARGS is.
+
+BASE_LIB_tune-<tune> - The "/lib" location for a specific ABI.  This is 
+used in a multilib configuration to place the libraries in the correct, 
+non-conflicting locations.