# Overrides are processed left to right, so the ones that are named later take precedence.
# You generally want them to go from least to most specific.
-#
-# This means that an envionment variable named '<foo>_arm' overrides an
-# environment variable '<foo>' (when ${TARGET_ARCH} is arm).
-# an environment variable '<foo>_ramses' overrides '<foo>' but doesn't override
-# '<foo>_arm' when ${MACHINE} is 'ramses'.
-# If you use combination ie '<foo>_arm_ramses', then '<foo>_arm_ramses' will override
-# '<foo>_arm' and then '<foo>' will be overriden with that value from '<foo>_arm'.
-# And finally '<foo>_local' overrides anything, but with lowest priority.
-#
-# This works for functions as well, they are really just environment variables.
-# Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
-OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
-# Alternative OVERRIDES definition without "fail fast", usually only for native building and Scratchbox toolchains.
-#OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}"
+MACHINE_OVERRIDES ?= ""
+OVERRIDES = "pn-${PN}:fail-fast:build-${BUILD_OS}:${TARGET_ARCH}:${TARGET_OS}:\
+${DISTRO}:${@':'.join(d.getVar('MACHINE_OVERRIDES', True).split())}:${MACHINE}:local"
##################################################################
# Include the rest of the config files.
# arm system and vice versa. It is strongly recommended that DISTROs not
# turn this off - the actual cost is very small.
-OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
-OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
-OVERRIDES_append_arm =. "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}"
+OVERRIDE_THUMB = "${@['', 'thumb:'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
+OVERRIDE_INTERWORK = "${@['', 'thumb-interwork:'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
+OVERRIDES_prepend_arm =. "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}"
# Compiler and linker options for application code and kernel code. These
# options ensure that the compiler has the correct settings for the selected
require conf/distro/include/arm-thumb.inc
#############################################################################
-# OVERRIDES adjusted from bitbake.conf to feature the MACHINE_CLASS
+# Ensure MACHINE_CLASS is in OVERRIDES
#############################################################################
-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:\
-${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_CLASS ?= ""
+MACHINE_OVERRIDES += "${MACHINE_CLASS}"
#############################################################################
# PREFERRED VERSIONS
MACHINE_KERNEL_VERSION = "2.6"
#############################################################################
-# OVERWRITES adjusted from bitbake.conf to feature the MACHINE_CLASS
+# Ensure MACHINE_CLASS is in OVERRIDES
#############################################################################
-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_CLASS ?= ""
+MACHINE_OVERRIDES += "${MACHINE_CLASS}"
#############################################################################
# TOOLCHAIN
MACHINE_KERNEL_VERSION = "2.6"
#############################################################################
-# OVERWRITES adjusted from bitbake.conf to feature the MACHINE_CLASS
+# Ensure MACHINE_CLASS is in OVERRIDES
#############################################################################
-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_CLASS ?= ""
+MACHINE_OVERRIDES += "${MACHINE_CLASS}"
#############################################################################
# TOOLCHAIN
MACHINE_ARCH = "ixp4xxbe"
-OVERRIDES = "local:${MACHINE}:ixp4xxbe:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "ixp4xx ixp4xxbe"
# Match the vendor's latest kernel
PREFERRED_PROVIDER_virtual/kernel ?= "fsg3-kernel"
# Note: armv4 armv4t armv5te will be added by tune-xscale.inc automatically.
PACKAGE_EXTRA_ARCHS = "armv5e ixp4xxle"
-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "ixp4xx nslu2"
PREFERRED_PROVIDER_virtual/kernel = "linux"
PREFERRED_VERSION_linux = "2.6.30"
# Note: armv4b armv4tb armv5teb will be added by tune-xscale.inc automatically.
PACKAGE_EXTRA_ARCHS = "armv5eb ixp4xxbe"
-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "ixp4xx nslu2"
ROOT_FLASH_SIZE ?= "6"
# Note: armv4 armv4t armv5te will be added by tune-xscale.inc automatically.
PACKAGE_EXTRA_ARCHS = "armv5e ixp4xxle"
-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "ixp4xx nslu2"
ROOT_FLASH_SIZE ?= "6"
<para>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?
<itemizedlist>
<listitem>
<para><command>DISTRO_VERSION</command> so users will know which
<section id="commonuse_new_machine">
<title>Adding a new Machine</title>
- <para>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
+ <para>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.</para>
<para>As usual some variables are required: <itemizedlist>
<para>There are also some optional variables that can be defined:
<itemizedlist>
+ <listitem>
+ <para>
+ <command>MACHINE_OVERRIDES</command> lists additional items to add to
+ the <command>OVERRIDES</command> variable, between the
+ <command>DISTRO</command> and the <command>MACHINE</command>. 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 <command>SOC_FAMILY</command> or <command>MACHINE_CLASS</command>.
+ </para>
+ <para>
+ 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.
+ </para>
+ </listitem>
<listitem>
<para><command>SOC_FAMILY</command> describes a family of processors
that all share common features such as kernel versions,
or local setting.
</para>
<para>
- 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
<listitem><para>for cvs: add 'PV = "1.1+cvs${SRCREV}"' to your bb file.</para></listitem>
</itemizedlist>
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.
</para>
<para>
<title>Putting it together</title>
<para>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.</para>
<para>Create <filename>meta-toolchain-YOU.bb</filename> in the
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "2.15.99+csl-arm+cvs20050416"
PR = "r3"
-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+OVERRIDES_prepend = "${TARGET_ARCH}-${TARGET_OS}:"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_arm-linux = "-1"
DEFAULT_PREFERENCE_arm-linuxeabi = "-1"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "2.15.99+csl-arm+cvs20050603"
PR = "r3"
-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+OVERRIDES_prepend = "${TARGET_ARCH}-${TARGET_OS}:"
DEFAULT_PREFERENCE = "-1"
#DEFAULT_PREFERENCE_arm-linux = "1"
#DEFAULT_PREFERENCE_arm-linuxeabi = "1"
EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}"
EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+OVERRIDES_prepend = "${TARGET_ARCH}-${TARGET_OS}:"
do_configure_prepend() {
sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+OVERRIDES_prepend = "${TARGET_ARCH}-${TARGET_OS}:"
do_install() {
oe_runmake install_root=${D} install
file://prelink.default"
TARGET_OS_ORIG := "${TARGET_OS}"
-OVERRIDES_append = ":${TARGET_OS_ORIG}"
+OVERRIDES_prepend = "${TARGET_OS_ORIG}:"
SRC_URI_append_linux-gnueabi = " file://arm_eabi.patch"
S = "${WORKDIR}/prelink-0.0.${PV}"
file://prelink.default"
TARGET_OS_ORIG := "${TARGET_OS}"
-OVERRIDES_append = ":${TARGET_OS_ORIG}"
+OVERRIDES_prepend = "${TARGET_OS_ORIG}:"
SRC_URI_append_linux-gnueabi = " file://arm_eabi.patch"
S = "${WORKDIR}/prelink-0.0.${PV}"
file://prelink.default"
#TARGET_OS_ORIG := "${TARGET_OS}"
-#OVERRIDES_append = ":${TARGET_OS_ORIG}"
+#OVERRIDES_prepend = "${TARGET_OS_ORIG}:"
#SRC_URI_append_linux-gnueabi = " file://arm_eabi.patch"
S = "${WORKDIR}/prelink-0.0.${PV}"