From 5b485324c2ac637e9fc6d40753ee64fd6907db69 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 15 Oct 2010 05:41:21 +0000 Subject: Reverse the order of OVERRIDES Given the current implementation of OVERRIDES in bitbake, the variable is expected to contain elements in the order least specific to most specific, however, our current usage of it does not match that. As one example, "local" is supposed to always be the most specific override, yet currently it's the least specific. As another example, currently the target architecture is seen as more specific than the machine, which is also clearly wrong. Big thanks to Chase Maupin for investigating and identifying this long standing issue. It becomes clear that a reversal of the current value will bring us to a more sane behavior, and avoids the need for the dual overrides hack mentioned in the comments, so this implements this reversal, and drops the unnecessary and confusing comments. This also introduces a MACHINE_OVERRIDES variable as a generic mechanism to inject overrides elements which are more specific than the distro but less specific than the machine, which is where things like MACHINE_CLASS or SOC_FAMILY or the like would go. This variable is *space* separated, to make it easier and more convenient to assemble the variable incrementally. Reported-by: Chase Maupin Signed-off-by: Chris Larson Acked-by: Chase Maupin Acked-by: Khem Raj --- docs/usermanual/chapters/common_use_cases.xml | 31 +++++++++++++++++++++------ 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/usermanual/chapters/common_use_cases.xml b/docs/usermanual/chapters/common_use_cases.xml index 8202dda64b..21140472be 100644 --- a/docs/usermanual/chapters/common_use_cases.xml +++ b/docs/usermanual/chapters/common_use_cases.xml @@ -7,8 +7,8 @@ Creating a new distribution is not complicated, however we urge you to try existing distributions first, because it's also very easy to do - wrong. The config needs to be created in $OEBASE/openembedded/conf/distro - directory. So what has to be inside? + wrong. The config needs to be created in $OEBASE/openembedded/conf/distro + directory. So what has to be inside? DISTRO_VERSION so users will know which @@ -72,8 +72,8 @@ SRCDATE = "20061014"
Adding a new Machine - To be able to build for a device OpenEmbedded has to know about it, - so a machine config file needs to be written. All of the machine + To be able to build for a device OpenEmbedded has to know about it, + so a machine config file needs to be written. All of the machine configs are stored in $OEBASE/openembedded/conf/machine/ directory. As usual some variables are required: @@ -96,6 +96,23 @@ SRCDATE = "20061014" There are also some optional variables that can be defined: + + + MACHINE_OVERRIDES lists additional items to add to + the OVERRIDES variable, between the + DISTRO and the MACHINE. This is + utilized to add overrides which are less specific than the machine, + but are nonetheless related to it, allowing us to define variables a + certain way for a group of machines, rather than for each individual + one. As an example, this variable may be used by the distribution to + add SOC_FAMILY or MACHINE_CLASS. + + + Note that this variable is space separated, and should always be + manipulated with +=, to ensure it's built up incrementally, and no + additions are lost. + + SOC_FAMILY describes a family of processors that all share common features such as kernel versions, @@ -105,7 +122,7 @@ SRCDATE = "20061014" or local setting. - NOTE: SOC_FAMILY is different than MACHINE_CLASS in that + NOTE: SOC_FAMILY is different than MACHINE_CLASS in that MACHINE_CLASS is intended to specify a grouping of devices that may have different processors but share common features. For example all OMAP3 devices can be described using the SOC_FAMILY @@ -139,7 +156,7 @@ SRCDATE = "20061014" for cvs: add 'PV = "1.1+cvs${SRCREV}"' to your bb file. Accompany either with an entry to conf/distro/include/sane-srcrevs.inc for a revision that you know - builds successfully. It is also common to define the stable SRCREV + builds successfully. It is also common to define the stable SRCREV for your package directly in the package recipe. @@ -276,7 +293,7 @@ RDEPENDS_${PN} += "\ Putting it together In the previous two sections we have prepared the host and target side. One thing that is missing is combining the two newly - created tasks and actually creating the SDK. This is what we are + created tasks and actually creating the SDK. This is what we are going to do now. Create meta-toolchain-YOU.bb in the -- cgit 1.2.3-korg