Reverse the order of OVERRIDES
PATCH 1/1 Reverse the order of OVERRIDES
From: Chris Larson <[email protected]>
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.
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 clean those up as well.
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, and it's then translated to : separated when used in OVERRIDES.
--- conf/bitbake.conf | 17 +++-------------- conf/distro/include/arm-thumb.inc | 6 +++--- conf/distro/micro.conf | 6 +++--- conf/distro/minimal.conf | 5 +++-- conf/distro/shr.conf | 5 +++-- conf/machine/fsg3be.conf | 2 +- conf/machine/kixrp435.conf | 2 +- conf/machine/nslu2be.conf | 2 +- conf/machine/nslu2le.conf | 2 +- recipes/binutils/binutils_csl-arm-20050416.bb | 2 +- recipes/binutils/binutils_csl-arm-20050603.bb | 2 +- recipes/eglibc/eglibc-package.bbclass | 2 +- recipes/glibc/glibc-package.inc | 2 +- recipes/prelink/prelink_20061027.bb | 2 +- recipes/prelink/prelink_20071009.bb | 2 +- recipes/prelink/prelink_20090925.bb | 2 +- 16 files changed, 26 insertions(+), 35 deletions(-)
conf/bitbake.conf +3 -14
@@ -675,20 +675,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # 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.
conf/distro/include/arm-thumb.inc +3 -3
@@ -16,9 +16,9 @@ THUMB_INTERWORK ?= "no" # 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
conf/distro/micro.conf +3 -3
@@ -69,10 +69,10 @@ require conf/distro/include/sane-toolchain.inc 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
conf/distro/minimal.conf +3 -2
@@ -81,9 +81,10 @@ KERNEL = "kernel26" 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
conf/distro/shr.conf +3 -2
@@ -151,9 +151,10 @@ KERNEL = "kernel26" 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
conf/machine/fsg3be.conf +1 -1
@@ -8,7 +8,7 @@ PACKAGE_EXTRA_ARCHS = "ixp4xxbe" 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"
conf/machine/kixrp435.conf +1 -1
@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # 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 += "nslu2 ixp4xx" PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_VERSION_linux = "2.6.30"
conf/machine/nslu2be.conf +1 -1
@@ -7,7 +7,7 @@ TARGET_ARCH = "armeb" # 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 += "nslu2 ixp4xx" ROOT_FLASH_SIZE ?= "6"
conf/machine/nslu2le.conf +1 -1
@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # 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 += "nslu2 ixp4xx" ROOT_FLASH_SIZE ?= "6"
recipes/binutils/binutils_csl-arm-20050416.bb +1 -1
@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"
recipes/binutils/binutils_csl-arm-20050603.bb +1 -1
@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"
recipes/eglibc/eglibc-package.bbclass +1 -1
@@ -116,7 +116,7 @@ def get_eglibc_fpu_setting(bb, d): 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
recipes/glibc/glibc-package.inc +1 -1
@@ -44,7 +44,7 @@ def get_glibc_fpu_setting(bb, d): 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
recipes/prelink/prelink_20061027.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
recipes/prelink/prelink_20071009.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
recipes/prelink/prelink_20090925.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
Signature · 1 line
1.7.2.3
Quoted 13 lines · Chris Larson
From: Chris Larson <[email protected]>
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.
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 clean those up as well.
Quoted 8 lines
This also introduces a
MACHINE_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, to make it easier and more convenient to assemble the variable incrementally, and it's then translated to : separated when used in OVERRIDES.Signed-off-by Chris Larson <[email protected]>
both things look nice to me. We might need to document MACHINE_OVERRIDES though.
Quoted 268 lines
---
conf/bitbake.conf | 17 +++-------------- conf/distro/include/arm-thumb.inc | 6 +++---conf/distro/micro.conf| 6 +++---conf/distro/minimal.conf| 5 +++--conf/distro/shr.conf| 5 +++--conf/machine/fsg3be.conf| 2 +-conf/machine/kixrp435.conf | 2 +- conf/machine/nslu2be.conf | 2 +- conf/machine/nslu2le.conf | 2 +-recipes/binutils/binutils_csl-arm-20050416.bb | 2 +- recipes/binutils/binutils_csl-arm-20050603.bb | 2 +- recipes/eglibc/eglibc-package.bbclass | 2 +- recipes/glibc/glibc-package.inc | 2 +-
recipes/prelink/prelink_20061027.bb | 2 +- recipes/prelink/prelink_20071009.bb | 2 +- recipes/prelink/prelink_20090925.bb | 2 +- 16 files changed, 26 insertions(+), 35 deletions(-)conf/bitbake.conf +3
-14@@ -675,20 +675,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # 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.conf/distro/include/arm-thumb.inc +3
-3@@ -16,9 +16,9 @@ THUMB_INTERWORK ?= "no" # 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 selectedconf/distro/micro.conf +0
-0@@ -69,10 +69,10 @@ require conf/distro/include/sane-toolchain.increquire conf/distro/include/arm-thumb.inc
#############################################################################
conf/distro/micro.conf +1
-1-# OVERRIDES adjusted from bitbake.conf to feature the MACHINE_CLASS +# Ensure MACHINE_CLASS is in OVERRIDES#############################################################################
conf/distro/micro.conf +2
-2-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:\ -${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"#############################################################################
# PREFERRED VERSIONSconf/distro/minimal.conf +0
-0@@ -81,9 +81,10 @@ KERNEL = "kernel26"MACHINE_KERNEL_VERSION = "2.6"
#############################################################################
conf/distro/minimal.conf +1
-1-# OVERWRITES adjusted from bitbake.conf to feature the MACHINE_CLASS +# Ensure MACHINE_CLASS is in OVERRIDES#############################################################################
conf/distro/minimal.conf +2
-1-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"#############################################################################
# TOOLCHAINconf/distro/shr.conf +0
-0@@ -151,9 +151,10 @@ KERNEL = "kernel26"MACHINE_KERNEL_VERSION = "2.6"
#############################################################################
conf/distro/shr.conf +1
-1-# OVERWRITES adjusted from bitbake.conf to feature the MACHINE_CLASS +# Ensure MACHINE_CLASS is in OVERRIDES#############################################################################
conf/distro/shr.conf +2
-1-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"#############################################################################
# TOOLCHAINconf/machine/fsg3be.conf +0
-0@@ -8,7 +8,7 @@ PACKAGE_EXTRA_ARCHS = "ixp4xxbe"MACHINE_ARCH = "ixp4xxbe"
conf/machine/fsg3be.conf +1
-1-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"
conf/machine/kixrp435.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.inc automatically.PACKAGE_EXTRA_ARCHS = "armv5e ixp4xxle"
conf/machine/kixrp435.conf +1
-1-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_OVERRIDES += "nslu2 ixp4xx"PREFERRED_PROVIDER_virtual/kernel = "linux"
PREFERRED_VERSION_linux = "2.6.30"conf/machine/nslu2be.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "armeb" # Note: armv4b armv4tb armv5teb will be added by tune-xscale.inc automatically.PACKAGE_EXTRA_ARCHS = "armv5eb ixp4xxbe"
conf/machine/nslu2be.conf +1
-1-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_OVERRIDES += "nslu2 ixp4xx"ROOT_FLASH_SIZE ?= "6"
conf/machine/nslu2le.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.inc automatically.PACKAGE_EXTRA_ARCHS = "armv5e ixp4xxle"
conf/machine/nslu2le.conf +1
-1-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_OVERRIDES += "nslu2 ixp4xx"ROOT_FLASH_SIZE ?= "6"
recipes/binutils/binutils_csl-arm-20050416.bb +0
-0@@ -7,7 +7,7 @@ LICENSE = "GPL"FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" PV = "2.15.99+csl-arm+cvs20050416"
PR = "r3"recipes/binutils/binutils_csl-arm-20050416.bb +1
-1-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"recipes/binutils/binutils_csl-arm-20050603.bb +0
-0@@ -7,7 +7,7 @@ LICENSE = "GPL"FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" PV = "2.15.99+csl-arm+cvs20050603"
PR = "r3"recipes/binutils/binutils_csl-arm-20050603.bb +1
-1-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"recipes/eglibc/eglibc-package.bbclass +0
-0@@ -116,7 +116,7 @@ def get_eglibc_fpu_setting(bb, d):EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}"
EXTRA_OEMAKE+= "rootsbindir=${base_sbindir}"recipes/eglibc/eglibc-package.bbclass +1
-1-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.inrecipes/glibc/glibc-package.inc +0
-0@@ -44,7 +44,7 @@ def get_glibc_fpu_setting(bb, d):EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
EXTRA_OEMAKE+= "rootsbindir=${base_sbindir}"recipes/glibc/glibc-package.inc +1
-1-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" +OVERRIDES_prepend = "${TARGET_ARCH}-${TARGET_OS}:"do_install() {
oe_runmake install_root=${D} installrecipes/prelink/prelink_20061027.bb +0
-0@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \file://prelink.default"
TARGET_OS_ORIG := "${TARGET_OS}"
recipes/prelink/prelink_20061027.bb +1
-1-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}"
recipes/prelink/prelink_20071009.bb +0
-0@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \file://prelink.default"
TARGET_OS_ORIG := "${TARGET_OS}"
recipes/prelink/prelink_20071009.bb +1
-1-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}"
recipes/prelink/prelink_20090925.bb +0
-0@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \file://prelink.default"
#TARGET_OS_ORIG := "${TARGET_OS}"
recipes/prelink/prelink_20090925.bb +1
-1-#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}"
--
1.7.2.3_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
2010/10/15 Khem Raj <[email protected]>:
Quoted 21 lines · Chris Larson
Quoted 20 lines
From: Chris Larson <[email protected]>
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.
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 clean those up as well.
This also introduces a
MACHINE_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, to make it easier and more convenient to assemble the variable incrementally, and it's then translated to : separated when used in OVERRIDES.
Quoted 6 lines
Quoted 1 line
Signed-off-by Chris Larson <[email protected]>both things look nice to me. We might need to document
MACHINE_OVERRIDESthough.Acked-by Khem Raj <[email protected]>
Looks fine to me.
Actually I've wondered several times why local did not have priority (but I had to do things like X_local).
But before adding an ack, I would like to ask what has been done wrt testing (as this is potentially quite invasive).
Also is there a way we can detect where the recipes can be simplified by adding unneeded appendices? (e.g by modifying/extending recipe_sanity).
Thanks for the patch! Frans
Quoted 21 lines · Khem Raj
Quoted 20 lines · Chris Larson
From: Chris Larson <[email protected]>
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.
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 clean those up as well.
This also introduces a
MACHINE_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, to make it easier and more convenient to assemble the variable incrementally, and it's then translated to : separated when used in OVERRIDES.
Quoted 3 lines
Quoted 1 line
Signed-off-by Chris Larson <[email protected]>both things look nice to me. We might need to document
MACHINE_OVERRIDESthough.
Yes, no new variables without updating the docs.
Signature · 2 lines
Tom Rini Mentor Graphics Corporation
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 13 lines · Chris Larson
From: Chris Larson <[email protected]>
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.
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 clean those up as well.
Quoted 8 lines
This also introduces a
MACHINE_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, to make it easier and more convenient to assemble the variable incrementally, and it's then translated to : separated when used in OVERRIDES.Signed-off-by Chris Larson <[email protected]>
Thanks for the patch! Chase or I will take care of moving SOC_FAMILY to MACHINE_OVERRIDES after this lands.
Quoted 251 lines
--- conf/bitbake.conf | 17 +++-------------- conf/distro/include/arm-thumb.inc | 6 +++--- conf/distro/micro.conf | 6 +++--- conf/distro/minimal.conf | 5 +++-- conf/distro/shr.conf | 5 +++-- conf/machine/fsg3be.conf | 2 +- conf/machine/kixrp435.conf | 2 +- conf/machine/nslu2be.conf | 2 +- conf/machine/nslu2le.conf | 2 +- recipes/binutils/binutils_csl-arm-20050416.bb | 2 +- recipes/binutils/binutils_csl-arm-20050603.bb | 2 +- recipes/eglibc/eglibc-package.bbclass | 2 +- recipes/glibc/glibc-package.inc | 2 +- recipes/prelink/prelink_20061027.bb | 2 +- recipes/prelink/prelink_20071009.bb | 2 +- recipes/prelink/prelink_20090925.bb | 2 +- 16 files changed, 26 insertions(+), 35 deletions(-)conf/bitbake.conf +3
-14@@ -675,20 +675,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # 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.conf/distro/include/arm-thumb.inc +3
-3@@ -16,9 +16,9 @@ THUMB_INTERWORK ?= "no" # 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 selectedconf/distro/micro.conf +3
-3@@ -69,10 +69,10 @@ require conf/distro/include/sane-toolchain.inc 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 VERSIONSconf/distro/minimal.conf +3
-2@@ -81,9 +81,10 @@ KERNEL = "kernel26" 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}" ############################################################################# # TOOLCHAINconf/distro/shr.conf +3
-2@@ -151,9 +151,10 @@ KERNEL = "kernel26" 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}" ############################################################################# # TOOLCHAINconf/machine/fsg3be.conf +1
-1@@ -8,7 +8,7 @@ PACKAGE_EXTRA_ARCHS = "ixp4xxbe" 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"conf/machine/kixrp435.conf +1
-1@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # 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 += "nslu2 ixp4xx" PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_VERSION_linux = "2.6.30"conf/machine/nslu2be.conf +1
-1@@ -7,7 +7,7 @@ TARGET_ARCH = "armeb" # 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 += "nslu2 ixp4xx" ROOT_FLASH_SIZE ?= "6"conf/machine/nslu2le.conf +1
-1@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # 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 += "nslu2 ixp4xx" ROOT_FLASH_SIZE ?= "6"recipes/binutils/binutils_csl-arm-20050416.bb +1
-1@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"recipes/binutils/binutils_csl-arm-20050603.bb +1
-1@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"recipes/eglibc/eglibc-package.bbclass +1
-1@@ -116,7 +116,7 @@ def get_eglibc_fpu_setting(bb, d): 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.inrecipes/glibc/glibc-package.inc +1
-1@@ -44,7 +44,7 @@ def get_glibc_fpu_setting(bb, d): 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} installrecipes/prelink/prelink_20061027.bb +1
-1@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"recipes/prelink/prelink_20071009.bb +1
-1@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"recipes/prelink/prelink_20090925.bb +0
-0
recipes/prelink/prelink_20090925.bb SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ · line 18
Quoted 8 lines
recipes/prelink/prelink_20090925.bb +1
-1@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMuDAvMkyGM64RGpERAlxxAKCzjaugv4f3l8A/wL+evxo3QOjbyQCgiuLC GTiLjxOoQ/7pW0vhSZf1owM=
=hkIm
-----END PGP SIGNATURE-----
Quoted 9 lines
conf/machine/kixrp435.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5e ixp4xxle"
Quoted 4 lines
-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build -${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "nslu2 ixp4xx"
Should this be "ixp4xx nslu2"? At least in order to keep the original behavior?
Quoted 12 lines
PREFERRED_PROVIDER_virtual/kernel = "linux"
PREFERRED_VERSION_linux= "2.6.30"conf/machine/nslu2be.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "armeb" # Note: armv4b armv4tb armv5teb will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5eb ixp4xxbe"
Quoted 4 lines
-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build -${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "nslu2 ixp4xx"
Should this be "ixp4xx nslu2"? At least in order to keep the original behavior?
Quoted 12 lines
ROOT_FLASH_SIZE?= "6"conf/machine/nslu2le.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5e ixp4xxle"
Quoted 4 lines
-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build -${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "nslu2 ixp4xx"
Should this be "ixp4xx nslu2"? At least in order to keep the original behavior?
Quoted 5 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 9 lines · Chase
Quoted 9 lines
conf/machine/kixrp435.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5e ixp4xxle"
Quoted 8 lines
Quoted 2 lines
-OVERRIDES =
"local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build
Quoted 2 lines
-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "nslu2 ixp4xx"Should this be "ixp4xx nslu2"? At least in order to keep the original behavior?
Yes, good catch, thanks, I'll fix it in the next version of the patch.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 25 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Chris Larson
Sent: Friday, October 15, 2010 10:17 AM
To: [email protected]
Cc: Chris Larson
Subject: Re: [oe] [PATCH] Reverse the order of OVERRIDESQuoted 9 lines · Chase
Quoted 9 lines
conf/machine/kixrp435.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5e ixp4xxle"Quoted 3 lines
Quoted 2 lines
-OVERRIDES =
"local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
-${BUILD_OS}:fail-fast:pn-${PN}"
+MACHINE_OVERRIDES += "nslu2 ixp4xx"Should this be "ixp4xx nslu2"? At least in order to keep the original behavior?
Yes, good catch, thanks, I'll fix it in the next version of the patch.
Everything else looked OK to me. Thanks for this change Chris.
Quoted 10 lines
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
PATCH 1/1 Reverse the order of OVERRIDES
In reply to Chris LarsonFrom: Chris Larson <[email protected]>
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.
--- conf/bitbake.conf | 17 ++----------- conf/distro/include/arm-thumb.inc | 6 ++-- conf/distro/micro.conf | 6 ++-- conf/distro/minimal.conf | 5 ++- conf/distro/shr.conf | 5 ++- conf/machine/fsg3be.conf | 2 +- conf/machine/kixrp435.conf | 2 +- conf/machine/nslu2be.conf | 2 +- conf/machine/nslu2le.conf | 2 +- docs/usermanual/chapters/common_use_cases.xml | 31 +++++++++++++++++++----- recipes/binutils/binutils_csl-arm-20050416.bb | 2 +- recipes/binutils/binutils_csl-arm-20050603.bb | 2 +- recipes/eglibc/eglibc-package.bbclass | 2 +- recipes/glibc/glibc-package.inc | 2 +- recipes/prelink/prelink_20061027.bb | 2 +- recipes/prelink/prelink_20071009.bb | 2 +- recipes/prelink/prelink_20090925.bb | 2 +- 17 files changed, 50 insertions(+), 42 deletions(-)
conf/bitbake.conf +3 -14
@@ -675,20 +675,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # 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.
conf/distro/include/arm-thumb.inc +3 -3
@@ -16,9 +16,9 @@ THUMB_INTERWORK ?= "no" # 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
conf/distro/micro.conf +3 -3
@@ -69,10 +69,10 @@ require conf/distro/include/sane-toolchain.inc 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
conf/distro/minimal.conf +3 -2
@@ -81,9 +81,10 @@ KERNEL = "kernel26" 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
conf/distro/shr.conf +3 -2
@@ -151,9 +151,10 @@ KERNEL = "kernel26" 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
conf/machine/fsg3be.conf +1 -1
@@ -8,7 +8,7 @@ PACKAGE_EXTRA_ARCHS = "ixp4xxbe" 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"
conf/machine/kixrp435.conf +1 -1
@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # 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"
conf/machine/nslu2be.conf +1 -1
@@ -7,7 +7,7 @@ TARGET_ARCH = "armeb" # 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"
conf/machine/nslu2le.conf +1 -1
@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # 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"
docs/usermanual/chapters/common_use_cases.xml +24 -7
@@ -7,8 +7,8 @@ <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
@@ -72,8 +72,8 @@ SRCDATE = "20061014" <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>
@@ -97,6 +97,23 @@ SRCDATE = "20061014" <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, bootloaders, etc. This is used to allow overrides for a whole
@@ -105,7 +122,7 @@ SRCDATE = "20061014" 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
@@ -139,7 +156,7 @@ SRCDATE = "20061014" <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>
@@ -276,7 +293,7 @@ RDEPENDS_${PN} += "\ <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
recipes/binutils/binutils_csl-arm-20050416.bb +1 -1
@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"
recipes/binutils/binutils_csl-arm-20050603.bb +1 -1
@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"
recipes/eglibc/eglibc-package.bbclass +1 -1
@@ -116,7 +116,7 @@ def get_eglibc_fpu_setting(bb, d): 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
recipes/glibc/glibc-package.inc +1 -1
@@ -44,7 +44,7 @@ def get_glibc_fpu_setting(bb, d): 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
recipes/prelink/prelink_20061027.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
recipes/prelink/prelink_20071009.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
recipes/prelink/prelink_20090925.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
Signature · 1 line
1.7.2.3
Quoted 39 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Chris Larson
Sent: Friday, October 15, 2010 10:41 AM
To: [email protected]
Subject: [oe] [PATCH (v2)] Reverse the order of OVERRIDESFrom: Chris Larson <[email protected]>
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_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, to make
it easier and more convenient to assemble the variable incrementally.
Quoted 2 lines
Reported-by Chase Maupin <[email protected]>Signed-off-by Chris Larson <[email protected]>
Quoted 439 lines
--- conf/bitbake.conf | 17 ++----------- conf/distro/include/arm-thumb.inc | 6 ++-- conf/distro/micro.conf | 6 ++-- conf/distro/minimal.conf | 5 ++- conf/distro/shr.conf | 5 ++- conf/machine/fsg3be.conf | 2 +- conf/machine/kixrp435.conf | 2 +- conf/machine/nslu2be.conf | 2 +- conf/machine/nslu2le.conf | 2 +- docs/usermanual/chapters/common_use_cases.xml | 31 +++++++++++++++++++- ---- recipes/binutils/binutils_csl-arm-20050416.bb | 2 +- recipes/binutils/binutils_csl-arm-20050603.bb | 2 +- recipes/eglibc/eglibc-package.bbclass | 2 +- recipes/glibc/glibc-package.inc | 2 +- recipes/prelink/prelink_20061027.bb | 2 +- recipes/prelink/prelink_20071009.bb | 2 +- recipes/prelink/prelink_20090925.bb | 2 +- 17 files changed, 50 insertions(+), 42 deletions(-)conf/bitbake.conf +0
-0@@ -675,20 +675,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # Overrides are processed left to right, so the ones that are named latertake precedence.
# You generally want them to go from least to most specific.conf/bitbake.conf +0
-4-# -# 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'toverride
conf/bitbake.conf +0
-2-# '<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'.conf/bitbake.conf +0
-3-# And finally '<foo>_local' overrides anything, but with lowest priority. -# -# This works for functions as well, they are really just environmentvariables.
-# 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}"conf/bitbake.conf +2
-0+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.conf/distro/include/arm- renamed from conf/distro/include/arm-thumb.inc +0
-0thumb.inc
index 36edd4f..75ed978 100644conf/distro/include/arm-thumb.inc +0
-0@@ -16,9 +16,9 @@ THUMB_INTERWORK ?= "no" # arm system and vice versa. It is strongly recommended that DISTROsnot
# 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']}"conf/distro/include/arm-thumb.inc +1
-1-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
selectedconf/distro/micro.conf +3
-3@@ -69,10 +69,10 @@ require conf/distro/include/sane-toolchain.inc 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 VERSIONSconf/distro/minimal.conf +1
-2@@ -81,9 +81,10 @@ KERNEL = "kernel26" 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}:b uild-${BUILD_OS}:fail-fast:pn-${PN}"
conf/distro/minimal.conf +2
-0+MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"##########################################################################
###
# TOOLCHAINconf/distro/shr.conf +1
-2@@ -151,9 +151,10 @@ KERNEL = "kernel26" 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}:b uild-${BUILD_OS}:fail-fast:pn-${PN}"
conf/distro/shr.conf +2
-0+MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"##########################################################################
###
# TOOLCHAINconf/machine/fsg3be.conf +0
-1@@ -8,7 +8,7 @@ PACKAGE_EXTRA_ARCHS = "ixp4xxbe" MACHINE_ARCH = "ixp4xxbe" -OVERRIDES ="local:${MACHINE}:ixp4xxbe:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:bu ild-${BUILD_OS}:fail-fast:pn-${PN}"
conf/machine/fsg3be.conf +1
-0+MACHINE_OVERRIDES += "ixp4xx ixp4xxbe" # Match the vendor's latest kernel PREFERRED_PROVIDER_virtual/kernel ?= "fsg3-kernel"conf/machine/kixrp435.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5e ixp4xxle"-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build -${BUILD_OS}:fail-fast:pn-${PN}"
conf/machine/kixrp435.conf +1
-0+MACHINE_OVERRIDES += "ixp4xx nslu2" PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_VERSION_linux = "2.6.30"conf/machine/nslu2be.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "armeb" # Note: armv4b armv4tb armv5teb will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5eb ixp4xxbe"-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build -${BUILD_OS}:fail-fast:pn-${PN}"
conf/machine/nslu2be.conf +1
-0+MACHINE_OVERRIDES += "ixp4xx nslu2" ROOT_FLASH_SIZE ?= "6"conf/machine/nslu2le.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.incautomatically.
PACKAGE_EXTRA_ARCHS= "armv5e ixp4xxle"-OVERRIDES = "local:${MACHINE}:nslu2:ixp4xx:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build -${BUILD_OS}:fail-fast:pn-${PN}"
conf/machine/nslu2le.conf +1
-0+MACHINE_OVERRIDES += "ixp4xx nslu2" ROOT_FLASH_SIZE ?= "6"docs/usermanual/chapters/common_use_cases.xml +0
-0@@ -7,8 +7,8 @@ <para>Creating a new distribution is not complicated, however we urgeyou
to try existing distributions first, because it's also very easy to
do
- wrong. The config needs to be created in
$OEBASE/openembedded/conf/distrodocs/usermanual/chapters/common_use_cases.xml +1
-1- 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
whichdocs/usermanual/chapters/common_use_cases.xml +2
-2@@ -72,8 +72,8 @@ SRCDATE = "20061014" <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>
docs/usermanual/chapters/common_use_cases.xml +2
-0@@ -97,6 +97,23 @@ SRCDATE = "20061014" <para>There are also some optional variables that can be defined: <itemizedlist> <listitem> + <para> + <command>MACHINE_OVERRIDES</command> lists additional items toadd to
docs/usermanual/chapters/common_use_cases.xml +2
-0+ 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>.docs/usermanual/chapters/common_use_cases.xml +4
-0+ </para> + <para> + Note that this variable is space separated, and should always be + manipulated with +=, to ensure it's built up incrementally, andno
docs/usermanual/chapters/common_use_cases.xml +4
-0+ additions are lost. + </para> + </listitem> + <listitem> <para><command>SOC_FAMILY</command> describes a family ofprocessors
that all share common features such as kernel versions, bootloaders, etc. This is used to allow overrides for a
wholedocs/usermanual/chapters/common_use_cases.xml +1
-1@@ -105,7 +122,7 @@ SRCDATE = "20061014" 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_FAMILYdocs/usermanual/chapters/common_use_cases.xml +0
-0@@ -139,7 +156,7 @@ SRCDATE = "20061014" <listitem><para>for cvs: add 'PV = "1.1+cvs${SRCREV}"' toyour 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
SRCREVfor your package directly in the package recipe. </para> <para>docs/usermanual/chapters/common_use_cases.xml +0
-0@@ -276,7 +293,7 @@ RDEPENDS_${PN} += "\ <title>Putting it together</title> <para>In the previous two sections we have prepared the hostand
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
therecipes/binutils/binutils_csl-arm-20050416.bb +1
-1@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"recipes/binutils/binutils_csl-arm-20050603.bb +1
-1@@ -7,7 +7,7 @@ LICENSE = "GPL" 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"recipes/eglibc/eglibc-package.bbclass +1
-1@@ -116,7 +116,7 @@ def get_eglibc_fpu_setting(bb, d): 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.inrecipes/glibc/glibc- renamed from recipes/glibc/glibc-package.inc +0
-0package.inc
index 0b263bb..8cd8564 100644recipes/glibc/glibc-package.inc +1
-1@@ -44,7 +44,7 @@ def get_glibc_fpu_setting(bb, d): 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} installrecipes/prelink/prelink_20061027.bb +1
-1@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
recipes/prelink/prelink_20071009.bb +1
-1@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
recipes/prelink/prelink_20090925.bb +1
-1@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \ 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}"
--
1.7.2.3_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 17 lines · Chris Larson
From: Chris Larson <[email protected]>
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.
Quoted 8 lines
This also introduces a
MACHINE_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor 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 <[email protected]>Signed-off-by Chris Larson <[email protected]>
Quoted 346 lines
---
conf/bitbake.conf | 17 ++----------- conf/distro/include/arm-thumb.inc | 6 ++--conf/distro/micro.conf| 6 ++--conf/distro/minimal.conf| 5 ++-conf/distro/shr.conf| 5 ++-conf/machine/fsg3be.conf| 2 +-conf/machine/kixrp435.conf | 2 +- conf/machine/nslu2be.conf | 2 +- conf/machine/nslu2le.conf | 2 +- docs/usermanual/chapters/common_use_cases.xml | 31 +++++++++++++++++++----- recipes/binutils/binutils_csl-arm-20050416.bb | 2 +- recipes/binutils/binutils_csl-arm-20050603.bb | 2 +- recipes/eglibc/eglibc-package.bbclass | 2 +- recipes/glibc/glibc-package.inc | 2 +- recipes/prelink/prelink_20061027.bb | 2 +- recipes/prelink/prelink_20071009.bb | 2 +- recipes/prelink/prelink_20090925.bb | 2 +- 17 files changed, 50 insertions(+), 42 deletions(-)conf/bitbake.conf +3
-14@@ -675,20 +675,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # 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.conf/distro/include/arm-thumb.inc +3
-3@@ -16,9 +16,9 @@ THUMB_INTERWORK ?= "no" # 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 selectedconf/distro/micro.conf +0
-0@@ -69,10 +69,10 @@ require conf/distro/include/sane-toolchain.increquire conf/distro/include/arm-thumb.inc
#############################################################################
conf/distro/micro.conf +1
-1-# OVERRIDES adjusted from bitbake.conf to feature the MACHINE_CLASS +# Ensure MACHINE_CLASS is in OVERRIDES#############################################################################
conf/distro/micro.conf +2
-2-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:\ -${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"#############################################################################
# PREFERRED VERSIONSconf/distro/minimal.conf +0
-0@@ -81,9 +81,10 @@ KERNEL = "kernel26"MACHINE_KERNEL_VERSION = "2.6"
#############################################################################
conf/distro/minimal.conf +1
-1-# OVERWRITES adjusted from bitbake.conf to feature the MACHINE_CLASS +# Ensure MACHINE_CLASS is in OVERRIDES#############################################################################
conf/distro/minimal.conf +2
-1-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"#############################################################################
# TOOLCHAINconf/distro/shr.conf +0
-0@@ -151,9 +151,10 @@ KERNEL = "kernel26"MACHINE_KERNEL_VERSION = "2.6"
#############################################################################
conf/distro/shr.conf +1
-1-# OVERWRITES adjusted from bitbake.conf to feature the MACHINE_CLASS +# Ensure MACHINE_CLASS is in OVERRIDES#############################################################################
conf/distro/shr.conf +2
-1-OVERRIDES = "local:${MACHINE}:${MACHINE_CLASS}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}" +MACHINE_CLASS ?= "" +MACHINE_OVERRIDES += "${MACHINE_CLASS}"#############################################################################
# TOOLCHAINconf/machine/fsg3be.conf +0
-0@@ -8,7 +8,7 @@ PACKAGE_EXTRA_ARCHS = "ixp4xxbe"MACHINE_ARCH = "ixp4xxbe"
conf/machine/fsg3be.conf +1
-1-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"
conf/machine/kixrp435.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.inc automatically.PACKAGE_EXTRA_ARCHS = "armv5e ixp4xxle"
conf/machine/kixrp435.conf +1
-1-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"conf/machine/nslu2be.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "armeb" # Note: armv4b armv4tb armv5teb will be added by tune-xscale.inc automatically.PACKAGE_EXTRA_ARCHS = "armv5eb ixp4xxbe"
conf/machine/nslu2be.conf +1
-1-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"
conf/machine/nslu2le.conf +0
-0@@ -7,7 +7,7 @@ TARGET_ARCH = "arm" # Note: armv4 armv4t armv5te will be added by tune-xscale.inc automatically.PACKAGE_EXTRA_ARCHS = "armv5e ixp4xxle"
conf/machine/nslu2le.conf +1
-1-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"
docs/usermanual/chapters/common_use_cases.xml +0
-0@@ -7,8 +7,8 @@<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 whichdocs/usermanual/chapters/common_use_cases.xml +0
-0@@ -72,8 +72,8 @@ SRCDATE = "20061014"<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>
docs/usermanual/chapters/common_use_cases.xml +0
-0@@ -97,6 +97,23 @@ SRCDATE = "20061014"<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, bootloaders, etc. This is used to allow overrides for a wholedocs/usermanual/chapters/common_use_cases.xml +0
-0@@ -105,7 +122,7 @@ SRCDATE = "20061014"or local setting.
</para>
<para>
- NOTE:SOC_FAMILYis different thanMACHINE_CLASSin that
+ NOTE:SOC_FAMILYis different thanMACHINE_CLASSin thatMACHINE_CLASSis 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 theSOC_FAMILYdocs/usermanual/chapters/common_use_cases.xml +0
-0@@ -139,7 +156,7 @@ SRCDATE = "20061014"<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>docs/usermanual/chapters/common_use_cases.xml +0
-0@@ -276,7 +293,7 @@ RDEPENDS_${PN} += "\<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
recipes/binutils/binutils_csl-arm-20050416.bb +0
-0@@ -7,7 +7,7 @@ LICENSE = "GPL"FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" PV = "2.15.99+csl-arm+cvs20050416"
PR = "r3"recipes/binutils/binutils_csl-arm-20050416.bb +1
-1-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"recipes/binutils/binutils_csl-arm-20050603.bb +0
-0@@ -7,7 +7,7 @@ LICENSE = "GPL"FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" PV = "2.15.99+csl-arm+cvs20050603"
PR = "r3"recipes/binutils/binutils_csl-arm-20050603.bb +1
-1-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"recipes/eglibc/eglibc-package.bbclass +0
-0@@ -116,7 +116,7 @@ def get_eglibc_fpu_setting(bb, d):EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}"
EXTRA_OEMAKE+= "rootsbindir=${base_sbindir}"recipes/eglibc/eglibc-package.bbclass +1
-1-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.inrecipes/glibc/glibc-package.inc +0
-0@@ -44,7 +44,7 @@ def get_glibc_fpu_setting(bb, d):EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
EXTRA_OEMAKE+= "rootsbindir=${base_sbindir}"recipes/glibc/glibc-package.inc +1
-1-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}" +OVERRIDES_prepend = "${TARGET_ARCH}-${TARGET_OS}:"do_install() {
oe_runmake install_root=${D} installrecipes/prelink/prelink_20061027.bb +0
-0@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \file://prelink.default"
TARGET_OS_ORIG := "${TARGET_OS}"
recipes/prelink/prelink_20061027.bb +1
-1-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}"
recipes/prelink/prelink_20071009.bb +0
-0@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \file://prelink.default"
TARGET_OS_ORIG := "${TARGET_OS}"
recipes/prelink/prelink_20071009.bb +1
-1-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}"
recipes/prelink/prelink_20090925.bb +0
-0@@ -12,7 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \file://prelink.default"
#TARGET_OS_ORIG := "${TARGET_OS}"
recipes/prelink/prelink_20090925.bb +1
-1-#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}"
--
1.7.2.3_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 17 lines · Chris Larson
From: Chris Larson <[email protected]>
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.
Quoted 8 lines
This also introduces a
MACHINE_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor 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 <[email protected]>Signed-off-by Chris Larson <[email protected]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMuK2DMkyGM64RGpERAsrgAJ0QbM4VQaERuv72HzOGZJKGqGxljwCfUpHL wX5AXypHwuHP4cG9BKj7CjM=
=Jpyx
-----END PGP SIGNATURE-----
Quoted 34 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 4 lines · Chris Larson
From: Chris Larson <[email protected]>
Given the current implementation of OVERRIDES in bitbake, the variable is expected to contain elements in the order least specific to most
specific,
Quoted 1 line
however, our current usage of it does not match that. As one example,
"local"
Quoted 1 line
is supposed to always be the most specific override, yet currently it's
the
Quoted 1 line
least specific. As another example, currently the target architecture is
seen
Quoted 6 lines
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
Quoted 1 line
sane behavior, and avoids the need for the dual overrides hack mentioned
in
Quoted 1 line
the comments, so this implements this reversal, and drops the unnecessary
and
Quoted 3 lines
confusing comments.
This also introduces a
MACHINE_OVERRIDESvariable as a generic mechanismto
Quoted 1 line
inject overrides elements which are more specific than the distro but
less
Quoted 2 lines
specific than the machine, which is where things like
MACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, to
Quoted 8 lines
make
Quoted 4 lines
it easier and more convenient to assemble the variable incrementally.
Reported-by Chase Maupin <[email protected]>Signed-off-by Chris Larson <[email protected]>Acked-by Koen Kooi <[email protected]>
This is now in master -- thanks to all for the acks, review, comments -- let me know if any problems result from this.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 39 lines · Chris Larson
Quoted 37 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 4 lines · Chris Larson
From: Chris Larson <[email protected]>
Given the current implementation of OVERRIDES in bitbake, the variable is expected to contain elements in the order least specific to most
specific,
Quoted 1 line
however, our current usage of it does not match that. As one example,
"local"
Quoted 1 line
is supposed to always be the most specific override, yet currently it's
the
Quoted 1 line
least specific. As another example, currently the target architecture is
seen
Quoted 6 lines
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
Quoted 1 line
sane behavior, and avoids the need for the dual overrides hack mentioned
in
Quoted 1 line
the comments, so this implements this reversal, and drops the unnecessary
and
Quoted 3 lines
confusing comments.
This also introduces a
MACHINE_OVERRIDESvariable as a generic mechanismto
Quoted 1 line
inject overrides elements which are more specific than the distro but
less
Quoted 2 lines
specific than the machine, which is where things like
MACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, tomake
Quoted 2 lines
it easier and more convenient to assemble the variable incrementally.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Reported-by Chase Maupin <[email protected]>Signed-off-by Chris Larson <[email protected]>Acked-by Koen Kooi <[email protected]>This is now in master -- thanks to all for the acks, review, comments -- let me know if any problems result from this.
You do realise the damage this potentially causes for compatibility of metadata between OE and Poky?
This change is pretty serious and potentially alters the handling of any double override. Poky uses them a bit more extensively than OE does. Its effectively an architecture change to OE yet no discussion was had at any TSC meeting :(.
I even asked about this a while back and was *told* that "local" was meant to be weak, I therefore added a strong version to Poky, in the spirit of maintaining compatibility.
Richard
On Wed, Nov 10, 2010 at 12:26 PM, Richard Purdie <[email protected]> wrote:
...
Quoted 4 lines
This change is pretty serious and potentially alters the handling of any double override. Poky uses them a bit more extensively than OE does. Its effectively an architecture change to OE yet no discussion was had at any TSC meeting :(.
...
I agree with Richard here. It was merged too fast.
We are suppose to have a release soon and this kind of change shouldn't be done so near of it.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
Quoted 6 lines · Otavio Salvador
On Wed, Nov 10, 2010 at 12:26 PM, Richard Purdie <[email protected]> wrote:
...Quoted 4 lines
This change is pretty serious and potentially alters the handling of any double override. Poky uses them a bit more extensively than OE does. Its effectively an architecture change to OE yet no discussion was had at any TSC meeting :(.
Quoted 6 lines
...
I agree with Richard here. It was merged too fast.
We are suppose to have a release soon and this kind of change shouldn't be done so near of it.
To be fair, this was done a few weeks before it was decided that we'd even have releases, if I follow the timeline for that decision right.
Signature · 2 lines
Tom Rini Mentor Graphics Corporation
Quoted 50 lines · Richard Purdie
Quoted 37 lines · Chris Larson
Quoted 35 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 4 lines · Chris Larson
From: Chris Larson <[email protected]>
Given the current implementation of OVERRIDES in bitbake, the variable is expected to contain elements in the order least specific to most
specific,
Quoted 1 line
however, our current usage of it does not match that. As one example,
"local"
Quoted 1 line
is supposed to always be the most specific override, yet currently it's
the
Quoted 1 line
least specific. As another example, currently the target architecture is
seen
Quoted 6 lines
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
Quoted 1 line
sane behavior, and avoids the need for the dual overrides hack mentioned
in
Quoted 1 line
the comments, so this implements this reversal, and drops the unnecessary
and
Quoted 3 lines
confusing comments.
This also introduces a
MACHINE_OVERRIDESvariable as a generic mechanismto
Quoted 1 line
inject overrides elements which are more specific than the distro but
less
Quoted 2 lines
specific than the machine, which is where things like
MACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, tomake
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
it easier and more convenient to assemble the variable incrementally.
Reported-by Chase Maupin <[email protected]>Signed-off-by Chris Larson <[email protected]>Acked-by Koen Kooi <[email protected]>This is now in master -- thanks to all for the acks, review, comments -- let me know if any problems result from this.
You do realise the damage this potentially causes for compatibility of metadata between OE and Poky?
Quoted 9 lines
This change is pretty serious and potentially alters the handling of any double override. Poky uses them a bit more extensively than OE does. Its effectively an architecture change to OE yet no discussion was had at any TSC meeting :(.
I even asked about this a while back and was *told* that "local" was meant to be weak, I therefore added a strong version to Poky, in the spirit of maintaining compatibility.
(a) Eeep! and (b) That's pretty much the opposite of what the rest of the thread / discussion was, which is to say "local is supposed to be the final winner, why isn't it?"
Now... what do we do here?
Signature · 2 lines
Tom Rini Mentor Graphics Corporation
Quoted 81 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tom Rini
Sent: Wednesday, November 10, 2010 10:29 AM
To: [email protected]
Subject: Re: [oe] [PATCH (v2)] Reverse the order of OVERRIDESQuoted 2 lines · Richard Purdie
Quoted 1 line · Chris Larson
On Fri, Oct 15, 2010 at 12:37 PM, Koen Kooi
Quoted 8 lines · <[email protected]>wrote:
Quoted 8 lines
Quoted 8 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 3 lines · Chris Larson
From: Chris Larson <[email protected]>
Given the current implementation of OVERRIDES in bitbake, the
variable is
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
expected to contain elements in the order least specific to most
specific,
Quoted 1 line
however, our current usage of it does not match that. As one example,
"local"
Quoted 1 line
is supposed to always be the most specific override, yet currently
it's
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
the
Quoted 1 line
least specific. As another example, currently the target
architecture is
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
seen
Quoted 3 lines
as more specific than the machine, which is also clearly wrong.
Big thanks to Chase Maupin for investigating and identifying this
long
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
standing issue.
It becomes clear that a reversal of the current value will bring us
to a
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
more
Quoted 1 line
sane behavior, and avoids the need for the dual overrides hack
mentioned
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
in
Quoted 1 line
the comments, so this implements this reversal, and drops the
unnecessary
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
and
Quoted 3 lines
confusing comments.
This also introduces a
MACHINE_OVERRIDESvariable as a genericmechanism
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
to
Quoted 1 line
inject overrides elements which are more specific than the distro but
less
Quoted 1 line
specific than the machine, which is where things like
MACHINE_CLASSor
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
SOC_FAMILYor the like would go. This variable is *space* separated,to
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
make
Quoted 4 lines
it easier and more convenient to assemble the variable incrementally.
Reported-by Chase Maupin <[email protected]>Signed-off-by Chris Larson <[email protected]>Acked-by Koen Kooi <[email protected]>This is now in master -- thanks to all for the acks, review, comments -
- let
Quoted 5 lines
Quoted 1 line
me know if any problems result from this.
You do realise the damage this potentially causes for compatibility of metadata between OE and Poky?
Quoted 9 lines
This change is pretty serious and potentially alters the handling of any double override. Poky uses them a bit more extensively than OE does. Its effectively an architecture change to OE yet no discussion was had at any TSC meeting :(.
I even asked about this a while back and was *told* that "local" was meant to be weak, I therefore added a strong version to Poky, in the spirit of maintaining compatibility.
Quoted 5 lines
(a) Eeep! and (b) That's pretty much the opposite of what the rest of the thread / discussion was, which is to say "local is supposed to be the final winner, why isn't it?"
Now... what do we do here?
I know this was all posted a while back. Has there been any resolution on this? I didn't notice any additional responses to this thread.
Quoted 9 lines
--
Tom Rini
Mentor Graphics Corporation_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 2 lines · Chase
I know this was all posted a while back. Has there been any resolution on this? I didn't notice any additional responses to this thread.
See the TSC meeting notes, it was discussed (with myself excluded from the decision making), and the decision was that it would be reverted and the issue revisited with an eye toward compatibility issues on a branch.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 31 lines · Chris Larson
From: Chris Larson <[email protected]>
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.
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 clean those up as well.
This also introduces a
MACHINE_OVERRIDESvariable 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 likeMACHINE_CLASSorSOC_FAMILYor the like would go. This variable is *space* separated, to make it easier and more convenient to assemble the variable incrementally, and it's then translated to : separated when used in OVERRIDES.Signed-off-by Chris Larson <[email protected]>---
conf/bitbake.conf | 17 +++-------------- conf/distro/include/arm-thumb.inc | 6 +++---conf/distro/micro.conf| 6 +++---conf/distro/minimal.conf| 5 +++--conf/distro/shr.conf| 5 +++--conf/machine/fsg3be.conf| 2 +-conf/machine/kixrp435.conf | 2 +- conf/machine/nslu2be.conf | 2 +- conf/machine/nslu2le.conf | 2 +-
Quoted 8 lines
recipes/binutils/binutils_csl-arm-20050416.bb | 2 +- recipes/binutils/binutils_csl-arm-20050603.bb | 2 +- recipes/eglibc/eglibc-package.bbclass | 2 +- recipes/glibc/glibc-package.inc | 2 +-
recipes/prelink/prelink_20061027.bb | 2 +- recipes/prelink/prelink_20071009.bb | 2 +- recipes/prelink/prelink_20090925.bb | 2 +- 16 files changed, 26 insertions(+), 35 deletions(-)
I'm sorry to notice too late, but this changes breaks do_unpack behavior, machine dir in FILESPATHPKG are no longer preferred ie for xorg-conf unpack:
now I get:
NOTE: package xserver-xorg-conf-0.1-r36: task do_unpack: Started
NOTE: Unpacking xserver-xorg-conf/xorg.conf to /OE/tmpdir-shr/work/om-gta02-oe-linux-gnueabi/xserver-xorg-conf-0.1-r36/
NOTE: package xserver-xorg-conf-0.1-r36: task do_unpack: Succeeded
if I revert this commit:
NOTE: package xserver-xorg-conf-0.1-r36: task do_unpack: Started
NOTE: Unpacking xserver-xorg-conf/om-gta02/xorg.conf to /OE/tmpdir-shr/work/om-gta02-oe-linux-gnueabi/xserver-xorg-conf-0.1-r36/
NOTE: package xserver-xorg-conf-0.1-r36: task do_unpack: Succeeded
Works OK if there is no "default" file (ie after rm xserver-xorg-conf/xorg.conf).
Probably needs reversed OVERRIDES order also in bitbake.conf FILESPATH
FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', 1).split(':') for p in d.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES',
1) + ':').split(':')])}"
I'll try it and send patch.
Regards,
Quoted 7 lines · Martin Jansa
Probably needs reversed OVERRIDES order also in bitbake.conf FILESPATH
FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in
d.getVar('FILESPATHBASE', 1).split(':') for p ind.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES',
1) + ':').split(':')])}"
Yes, you're right. OVERRIDES in bitbake is used such that the *last* defined overridden variable is used, but FILESPATH uses the *first* file it finds. Reversing it there should indeed fix it. Nicely spotted, thanks. I have some errands to run, so won't have a chance to apply a fix until this evening, so if someone else wants to get it in, feel free.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 10 lines · Chris Larson
Quoted 7 lines · Martin Jansa
Probably needs reversed OVERRIDES order also in bitbake.conf FILESPATH
FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in
d.getVar('FILESPATHBASE', 1).split(':') for p ind.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES',
1) + ':').split(':')])}"
Quoted 5 lines
Yes, you're right. OVERRIDES in bitbake is used such that the *last* defined overridden variable is used, but FILESPATH uses the *first* file it finds. Reversing it there should indeed fix it. Nicely spotted, thanks. I have some errands to run, so won't have a chance to apply a fix until this evening, so if someone else wants to get it in, feel free.
It's a bit more complicated
OE om-gta02@shr ~/dev/recipes/xorg-xserver $ bitbake -e -b
xserver-xorg-conf_0.1.bb | grep ^OVERRIDES OVERRIDES="thumb:thumb-interwork:libc-glibc:pn-xserver-xorg-conf:fail-fast:build-linux:arm:linux-gnueabi:shr::om-gta02:local:armv4t:armv4t"
that empty :: between shr and om-gta02 (where MACHINE_OVERRIDES should be) is breaking it for both orders (ie ignoring all after om-gta02 or after shr from with reversed order)
This is part of filespath (for first FILESPATHPKG - ${PF}) from base_do_unpack in base.bbclass:
'/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/task-unpack' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb-interwork' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/libc-glibc' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/pn-xserver-xorg-conf' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/fail-fast' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/build-linux' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/arm' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/linux-gnueabi' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/shr' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36'
-- here is the problem
'/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/om-gta02' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/local' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t' '/OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36'
Regards,
Quoted 19 lines · Martin Jansa
Quoted 10 lines · Chris Larson
Quoted 7 lines · Martin Jansa
Probably needs reversed OVERRIDES order also in bitbake.conf FILESPATH
FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in
d.getVar('FILESPATHBASE', 1).split(':') for p ind.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES',
1) + ':').split(':')])}"Quoted 5 lines
Yes, you're right. OVERRIDES in bitbake is used such that the *last* defined overridden variable is used, but FILESPATH uses the *first* file it finds. Reversing it there should indeed fix it. Nicely spotted, thanks. I have some errands to run, so won't have a chance to apply a fix until this evening, so if someone else wants to get it in, feel free.
It's a bit more complicated
Quoted 7 lines
OE om-gta02@shr ~/dev/recipes/xorg-xserver $ bitbake -e -b
xserver-xorg-conf_0.1.bb | grep ^OVERRIDES OVERRIDES="thumb:thumb-interwork:libc-glibc:pn-xserver-xorg-conf:fail-fast:build-linux:arm:linux-gnueabi:shr::om-gta02:local:armv4t:armv4t"that empty :: between shr and om-gta02 (where
MACHINE_OVERRIDESshould be) is breaking it for both orders (ie ignoring all after om-gta02 or after shr from with reversed order)
Even with those 2 patches I've just sent I still have wrong order of TARGET_ARCH OVERRIDES :/.
OE om-gta02@shr ~/dev/recipes/xorg-xserver $ bitbake -e -b xserver-xorg-conf_0.1.bb | grep ^FILESPATH= | sed "s/:/\n/g" | head -n 20
FILESPATH=" /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/local /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/om-gta02 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/shr /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/linux-gnueabi /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/arm /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/build-linux /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/fail-fast /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/pn-xserver-xorg-conf /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/libc-glibc /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb-interwork /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/local /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/om-gta02 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/shr /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/linux-gnueabi
.....
any hint?
Regards,
Quoted 58 lines · Martin Jansa
Quoted 19 lines · Martin Jansa
Quoted 10 lines · Chris Larson
Quoted 7 lines · Martin Jansa
Probably needs reversed OVERRIDES order also in bitbake.conf FILESPATH
FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in
d.getVar('FILESPATHBASE', 1).split(':') for p ind.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES',
1) + ':').split(':')])}"Quoted 5 lines
Yes, you're right. OVERRIDES in bitbake is used such that the *last* defined overridden variable is used, but FILESPATH uses the *first* file it finds. Reversing it there should indeed fix it. Nicely spotted, thanks. I have some errands to run, so won't have a chance to apply a fix until this evening, so if someone else wants to get it in, feel free.
It's a bit more complicated
Quoted 7 lines
OE om-gta02@shr ~/dev/recipes/xorg-xserver $ bitbake -e -b
xserver-xorg-conf_0.1.bb | grep ^OVERRIDES OVERRIDES="thumb:thumb-interwork:libc-glibc:pn-xserver-xorg-conf:fail-fast:build-linux:arm:linux-gnueabi:shr::om-gta02:local:armv4t:armv4t"that empty :: between shr and om-gta02 (where
MACHINE_OVERRIDESshould be) is breaking it for both orders (ie ignoring all after om-gta02 or after shr from with reversed order)Even with those 2 patches I've just sent I still have wrong order of
TARGET_ARCHOVERRIDES :/.OE om-gta02@shr ~/dev/recipes/xorg-xserver $ bitbake -e -b xserver-xorg-conf_0.1.bb | grep ^FILESPATH= | sed "s/:/\n/g" | head -n 20
FILESPATH=" /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/local /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/om-gta02 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/shr /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/linux-gnueabi /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/arm /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/build-linux /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/fail-fast /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/pn-xserver-xorg-conf /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/libc-glibc /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb-interwork /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/local /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/om-gta02 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/shr /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/linux-gnueabi
.....
Quoted 1 line
any hint?
Ah I have TARGET_ARCH (actually FEED_ARCH) twice in OVERRIDES, one from sane-toolchain.inc and second from sane-feed.inc (maybe we should drop one of them).
I have patch which preppends FEED_ARCH instead of appending it -OVERRIDES .= ":${FEED_ARCH}"
+OVERRIDES =. "${FEED_ARCH}:"
in few distro configs
# modified: ../../conf/distro/chinook-compat.conf # modified: ../../conf/distro/include/kaeilos-2010.inc # modified: ../../conf/distro/include/kaeilos.inc # modified: ../../conf/distro/include/sane-feed.inc # modified: ../../conf/distro/include/sane-toolchain.inc # modified: ../../conf/distro/maemo5-compat.conf
but now I'm quite confused if it's right fix, because with this reversed order of OVERRIDES it's not enough to change from append to preppend, because it also depends on order how bitbake.conf/sane-*.inc/distro.conf are included together :/.
So now I have
OE om-gta02@shr ~/dev/recipes/xorg-xserver $ bitbake -e -b
xserver-xorg-conf_0.1.bb | grep ^OVERRIDES OVERRIDES="thumb:thumb-interwork:libc-glibc:armv4t:armv4t:pn-xserver-xorg-conf:fail-fast:build-linux:arm:linux-gnueabi:shr:om-gta02:local"
OE om-gta02@shr ~/dev/recipes/xorg-xserver $ bitbake -e -b xserver-xorg-conf_0.1.bb | grep ^FILESPATH= | sed "s/:/\n/g" | head -n 20
FILESPATH=" /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/local /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/om-gta02 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/shr /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/linux-gnueabi /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/arm /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/build-linux /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/fail-fast /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/pn-xserver-xorg-conf /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/armv4t /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/libc-glibc /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb-interwork /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36/thumb /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1-r36 /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/local /OE/dev/recipes/xorg-xserver/xserver-xorg-conf-0.1/om-gta02
but it doesn't seem right again :/
Regards,
PATCH 1/1 bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
In reply to Chris Larson* empty MACHINE_OVERRIDES adds :: to OVERRIDES (then in FILESPATH skips every directory after this)
* strip() is needed to remove space in case some distribution has ie MACHINE_OVERRIDES ?= ""
and then
MACHINE_OVERRIDES += ""
or
MACHINE_OVERRIDES ?= "${MACHINE_CLASS}", where MACHINE_CLASS is empty again
--- conf/bitbake.conf | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
conf/bitbake.conf +3 -2
@@ -676,8 +676,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # 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. MACHINE_OVERRIDES ?= "" -OVERRIDES = "pn-${PN}:fail-fast:build-${BUILD_OS}:${TARGET_ARCH}:${TARGET_OS}:\ -${DISTRO}:${@':'.join(d.getVar('MACHINE_OVERRIDES', True).split())}:${MACHINE}:local" +OVERRIDES = "pn-${PN}:fail-fast:build-${BUILD_OS}:${TARGET_ARCH}:${TARGET_OS}:${DISTRO}:\ +${@[':'.join(d.getVar('MACHINE_OVERRIDES', True).split())+':',''][d.getVar('MACHINE_OVERRIDES', True).strip() == '']}\ +${MACHINE}:local" ################################################################## # Include the rest of the config files.
Signature · 1 line
1.7.3.1
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Jansa
Sent: Saturday, October 16, 2010 2:25 PM
To: [email protected]
Subject: [oe] [PATCH] bitbake.conf: don't appendMACHINE_OVERRIDESto OVERRIDES when it's empty
Quoted 9 lines
* empty
MACHINE_OVERRIDESadds :: to OVERRIDES (then in FILESPATH skips every directory after this)
*strip()is needed to remove space in case some distribution has ieMACHINE_OVERRIDES?= ""
and then
MACHINE_OVERRIDES+= ""
or
MACHINE_OVERRIDES?= "${MACHINE_CLASS}", whereMACHINE_CLASSis empty
again
I saw this issue in my overlay of having a "::" in my OVERRIDES which caused my parsing to fail in angstrom.inc. Applying this fix from Martin resolves the parsing issue. My OVERRIDES appear to be in the correct order with this change:
# OVERRIDES=${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}libc-glibc:pn-${PN}:fail-fast:build-${BUILD_OS}:${TARGET_ARCH}:${TARGET_OS}:${DISTRO}:${@[':'.join(d.getVar('MACHINE_OVERRIDES', True).split())+':',''][d.getVar('MACHINE_OVERRIDES', True).strip() == '']}${MACHINE}:local OVERRIDES="thumb-interwork:libc-glibc:pn-helloworld:fail-fast:build-linux:arm:linux-gnueabi:angstrom:armv7a:omap3:am37x-evm:local"
And my FILESPATH ordering is:
helloworld-1.0.0-r1/local
helloworld-1.0.0-r1/am37x-evm
helloworld-1.0.0-r1/omap3
helloworld-1.0.0-r1/armv7a
helloworld-1.0.0-r1/angstrom
helloworld-1.0.0-r1/linux-gnueabi
helloworld-1.0.0-r1/arm
helloworld-1.0.0-r1/build-linux
helloworld-1.0.0-r1/fail-fast
helloworld-1.0.0-r1/pn-helloworld
helloworld-1.0.0-r1/libc-glibc
helloworld-1.0.0-r1/thumb-interwork
helloworld-1.0.0-r1/
.
.
.
Quoted 34 lines
--- conf/bitbake.conf | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)conf/bitbake.conf +0
-0@@ -676,8 +676,9 @@ BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS" # Overrides are processed left to right, so the ones that are named latertake precedence.
# You generally want them to go from least to most specific.MACHINE_OVERRIDES?= ""
-OVERRIDES = "pn-${PN}:fail-fast:build- ${BUILD_OS}:${TARGET_ARCH}:${TARGET_OS}:\
-${DISTRO}:${@':'.join(d.getVar('MACHINE_OVERRIDES', True).split())}:${MACHINE}:local"
+OVERRIDES = "pn-${PN}:fail-fast:build- ${BUILD_OS}:${TARGET_ARCH}:${TARGET_OS}:${DISTRO}:\
+${@[':'.join(d.getVar('MACHINE_OVERRIDES', True).split())+':',''][d.getVar('MACHINE_OVERRIDES', True).strip() == '']}\
+${MACHINE}:local"##################################################################
# Include the rest of the config files.
--
1.7.3.1_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 19 lines · Chase
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Jansa
Sent: Saturday, October 16, 2010 2:25 PM
To: [email protected]
Subject: [oe] [PATCH] bitbake.conf: don't appendMACHINE_OVERRIDESto OVERRIDES when it's emptyQuoted 9 lines
* empty
MACHINE_OVERRIDESadds :: to OVERRIDES (then in FILESPATH skips every directory after this)
*strip()is needed to remove space in case some distribution has ieMACHINE_OVERRIDES?= ""
and then
MACHINE_OVERRIDES+= ""
or
MACHINE_OVERRIDES?= "${MACHINE_CLASS}", whereMACHINE_CLASSis empty
again
Quoted 4 lines
I saw this issue in my overlay of having a "::" in my OVERRIDES which caused my parsing to fail in angstrom.inc. Applying this fix from Martin resolves the parsing issue. My OVERRIDES appear to be in the correct order with this change:
Can you explain this? "caused my parsing to fail" is not very useful information. What exactly failed?
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 36 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Chris Larson
Sent: Tuesday, October 19, 2010 2:09 PM
To: [email protected]
Subject: Re: [oe] [PATCH] bitbake.conf: don't appendMACHINE_OVERRIDESto OVERRIDES when it's emptyQuoted 3 lines · Chase
Quoted 3 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On BehalfOf
Quoted 7 lines
Quoted 7 lines
Martin Jansa
Sent: Saturday, October 16, 2010 2:25 PM
To: [email protected]
Subject: [oe] [PATCH] bitbake.conf: don't appendMACHINE_OVERRIDESto OVERRIDES when it's empty* empty
MACHINE_OVERRIDESadds :: to OVERRIDES (then in FILESPATHskips
Quoted 7 lines
Quoted 7 lines
every directory after this)
*strip()is needed to remove space in case some distribution has ieMACHINE_OVERRIDES?= ""
and then
MACHINE_OVERRIDES+= ""
or
MACHINE_OVERRIDES?= "${MACHINE_CLASS}", whereMACHINE_CLASSisempty
Quoted 4 lines
Quoted 1 line
again
I saw this issue in my overlay of having a "::" in my OVERRIDES which caused my parsing to fail in angstrom.inc. Applying this fix from
Quoted 8 lines
Martin
Quoted 1 line
resolves the parsing issue. My OVERRIDES appear to be in the correct
order
Quoted 1 line
with this change:
Can you explain this? "caused my parsing to fail" is not very useful information. What exactly failed?
Chris,
Sorry, I thought this was an understood issue. I have put the error output I got below. Basically, when I got to line 509 of data.py the variables had the following values:
vars = set(['__functions_', '_', '__functions__'])
var = '__functions__'
overrides = ['pn-angstrom', 'fail-fast', 'build-linux', 'arm', 'INVALID', 'angstrom-2008.1', '', 'am37x-evm', 'local']
o = ''
OVERRIDES = 'pn-angstrom:fail-fast:build-linux:arm:INVALID:angstrom-2008.1::am37x-evm:local'
The current override being evaluated was the '' one.
The line being evaluated in my overlay was USERDISTRO := "${DISTRO}" in my copy of angstrom.inc
The output from my build was:
a0271661@sdit-build01:~/projects/arago-multi-build$ bitbake helloworldTraceback (most recent call last):
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/bin/bitbake", line 143, in <module>
main()
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/bin/bitbake", line 123, in main
cooker.parseConfiguration()
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/cooker.py", line 68, in parseConfiguration
self.parseConfigurationFile( os.path.join( "conf", "bitbake.conf" ) )
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/cooker.py", line 390, in parseConfigurationFile
self.configuration.data = bb.parse.handle( afile, self.configuration.data )
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/__init__.py", line 75, in handle
return h['handle'](fn, data, include)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 167, in handle
feeder(lineno, s, fn, data)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 215, in feeder
include(fn, s, data, False)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 114, in include
ret = handle(fn, data, True)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/__init__.py", line 75, in handle
return h['handle'](fn, data, include)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 167, in handle
feeder(lineno, s, fn, data)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 221, in feeder
include(fn, s, data, "include required")
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 114, in include
ret = handle(fn, data, True)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/__init__.py", line 75, in handle
return h['handle'](fn, data, include)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/BBHandler.py", line 175, in handle
feeder(lineno, s, fn, base_name, d)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/BBHandler.py", line 381, in feeder
return ConfHandler.feeder(lineno, s, fn, d)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 192, in feeder
bb.data.update_data(e)
File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/data.py", line 509, in update_data
for var in vars:
RuntimeError: Set changed size during iterationQuoted 10 lines
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 22 lines · Chase
Quoted 9 lines
Quoted 2 lines
I saw this issue in my overlay of having a "::" in my OVERRIDES which caused my parsing to fail in angstrom.inc. Applying this fix from
Martin
Quoted 1 line
resolves the parsing issue. My OVERRIDES appear to be in the correct
order
Quoted 1 line
with this change:
Can you explain this? "caused my parsing to fail" is not very useful information. What exactly failed?
Chris,
Sorry, I thought this was an understood issue. I have put the error output I got below. Basically, when I got to line 509 of
data.pythe variables had the following values:vars =
set(['__functions_', '_', '__functions__'])var = '
__functions__'overrides = ['pn-angstrom', 'fail-fast', 'build-linux', 'arm', 'INVALID', 'angstrom-2008.1', '', 'am37x-evm', 'local']
Quoted 8 lines
o = ''
OVERRIDES = 'pn-angstrom:fail-fast:build-linux:arm:INVALID:angstrom-2008.1::am37x-evm:local'
The current override being evaluated was the '' one.
The line being evaluated in my overlay was USERDISTRO := "${DISTRO}" in my copy of angstrom.inc
Chris,
FYI, the below "RuntimeError: Set changed size during iteration" exception happens in bitbake 1.8.18 but not the 1.10/mainline.
Signature · 1 line
Denys
Quoted 38 lines
The output from my build was:
a0271661@sdit-build01:~/projects/arago-multi-build$ bitbake helloworldTraceback (most recent call last): File "/home/a0271661/projects/arago-multi-build/arago-bitbake/bin/bitbake", line 143, in <module> main() File "/home/a0271661/projects/arago-multi-build/arago-bitbake/bin/bitbake", line 123, in main cooker.parseConfiguration() File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/cooker.py", line 68, in parseConfiguration self.parseConfigurationFile( os.path.join( "conf", "bitbake.conf" ) ) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/cooker.py", line 390, in parseConfigurationFile self.configuration.data = bb.parse.handle( afile, self.configuration.data ) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/__init__.py", line 75, in handle return h['handle'](fn, data, include) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 167, in handle feeder(lineno, s, fn, data) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 215, in feeder include(fn, s, data, False) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 114, in include ret = handle(fn, data, True) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/__init__.py", line 75, in handle return h['handle'](fn, data, include) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 167, in handle feeder(lineno, s, fn, data) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 221, in feeder include(fn, s, data, "include required") File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 114, in include ret = handle(fn, data, True) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/__init__.py", line 75, in handle return h['handle'](fn, data, include) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/BBHandler.py", line 175, in handle feeder(lineno, s, fn, base_name, d) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/BBHandler.py", line 381, in feeder return ConfHandler.feeder(lineno, s, fn, d) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 192, in feeder bb.data.update_data(e) File "/home/a0271661/projects/arago-multi-build/arago-bitbake/lib/bb/data.py", line 509, in update_data for var in vars: RuntimeError: Set changed size during iteration
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 29 lines · Denys Dmytriyenko
Quoted 28 lines · Chase
Quoted 9 lines
Quoted 2 lines
I saw this issue in my overlay of having a "::" in my OVERRIDES which caused my parsing to fail in angstrom.inc. Applying this fix from
Martin
Quoted 1 line
resolves the parsing issue. My OVERRIDES appear to be in the correct
order
Quoted 1 line
with this change:
Can you explain this? "caused my parsing to fail" is not very useful information. What exactly failed?
Chris,
Sorry, I thought this was an understood issue. I have put the error output I got below. Basically, when I got to line 509 of
data.pythe variables had the following values:vars =
set(['__functions_', '_', '__functions__'])var = '
__functions__'overrides = ['pn-angstrom', 'fail-fast', 'build-linux', 'arm', 'INVALID', 'angstrom-2008.1', '', 'am37x-evm', 'local']
o = ''
OVERRIDES = 'pn-angstrom:fail-fast:build-linux:arm:INVALID:angstrom-2008.1::am37x-evm:local'
The current override being evaluated was the '' one.
Quoted 7 lines
Quoted 2 lines
The line being evaluated in my overlay was USERDISTRO := "${DISTRO}" in my copy of angstrom.inc
Chris,
FYI, the below "RuntimeError: Set changed size during iteration" exception happens in bitbake 1.8.18 but not the 1.10/mainline.
Chris, Martin,
After more debugging, it seems the problem is caused by using bitbake 1.8.18 and conf/collections.inc at the same time, as that version of bitbake chokes on empty override "::", when it gets re-spawned from collections.inc. If I replace the use of COLLECTIONS with direct BBFILES/BBFILE_* assignments, bitbake parses everything just fine. It is reproducible right now on the latest OE mainline with bitbake 1.8.18 by just adding "require conf/collections.inc" in local.conf or bitbake.conf.
I see that Martin's patch was marked as "Superseded" and archived - is there a new patch coming? Or are there any side-effects of this patch? I would definitely like to push this patch ASAP to address our immediate problem. Thanks.
Signature · 1 line
Denys
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 5 lines · Denys Dmytriyenko
I see that Martin's patch was marked as "Superseded" and archived - is there a
new patch coming? Or are there any side-effects of this patch? I would definitely like to push this patch ASAP to address our immediate problem.
The original problem with empty overrides was the FILESPATH issue, which was fixed by the commit that sanitized FILESPATH, hence the superseded. Clearly there's another issue with them, so this patch is necessary. Feel free to apply it with modification and push it, we can always drop it when we bump the minimum bitbake version to 1.10.x.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 8 lines · Chris Larson
Quoted 5 lines · Denys Dmytriyenko
I see that Martin's patch was marked as "Superseded" and archived - is there a
new patch coming? Or are there any side-effects of this patch? I would definitely like to push this patch ASAP to address our immediate problem.
Quoted 5 lines
The original problem with empty overrides was the FILESPATH issue, which was fixed by the commit that sanitized FILESPATH, hence the superseded. Clearly there's another issue with them, so this patch is necessary. Feel free to apply it with modification and push it, we can always drop it when we bump the minimum bitbake version to 1.10.x.
Thanks. I will push this patch shortly - I actually have it in my local repository applied, but I'm now facing another issue and trying to solve it first...
Signature · 1 line
Denys
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
In reply to Denys DmytriyenkoQuoted 48 lines · Denys Dmytriyenko
Quoted 29 lines · Denys Dmytriyenko
Quoted 28 lines · Chase
Quoted 9 lines
Quoted 2 lines
I saw this issue in my overlay of having a "::" in my OVERRIDES which caused my parsing to fail in angstrom.inc. Applying this fix from
Martin
Quoted 1 line
resolves the parsing issue. My OVERRIDES appear to be in the correct
order
Quoted 1 line
with this change:
Can you explain this? "caused my parsing to fail" is not very useful information. What exactly failed?
Chris,
Sorry, I thought this was an understood issue. I have put the error output I got below. Basically, when I got to line 509 of
data.pythe variables had the following values:vars =
set(['__functions_', '_', '__functions__'])var = '
__functions__'overrides = ['pn-angstrom', 'fail-fast', 'build-linux', 'arm', 'INVALID', 'angstrom-2008.1', '', 'am37x-evm', 'local']
o = ''
OVERRIDES = 'pn-angstrom:fail-fast:build-linux:arm:INVALID:angstrom-2008.1::am37x-evm:local'
The current override being evaluated was the '' one.
Quoted 7 lines
Quoted 2 lines
The line being evaluated in my overlay was USERDISTRO := "${DISTRO}" in my copy of angstrom.inc
Chris,
FYI, the below "RuntimeError: Set changed size during iteration" exception happens in bitbake 1.8.18 but not the 1.10/mainline.
Chris, Martin,
After more debugging, it seems the problem is caused by using bitbake 1.8.18 and conf/collections.inc at the same time, as that version of bitbake chokes on empty override "::", when it gets re-spawned from collections.inc. If I replace the use of COLLECTIONS with direct BBFILES/BBFILE_* assignments, bitbake parses everything just fine. It is reproducible right now on the latest OE mainline with bitbake 1.8.18 by just adding "require conf/collections.inc" in local.conf or bitbake.conf.
Quoted 3 lines
I see that Martin's patch was marked as "Superseded" and archived - is there a new patch coming? Or are there any side-effects of this patch? I would definitely like to push this patch ASAP to address our immediate problem.
I've marked it as "Superseded" when Chris pushed that filtering and I've checked that it fixes my case.
Maybe we can resolve it by using limited OVERRIDES in FILESPATH as suggested in "[RFC] do we really need all OVERRIDES in FILESPATH?". Instead of creating more complicated constructs to be able to push more stuff to FILESPATH (without '::') and then never use it.
Regards,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
Quoted 9 lines · Martin Jansa
I've marked it as "Superseded" when Chris pushed that filtering and I've checked
that it fixes my case.Maybe we can resolve it by using limited OVERRIDES in FILESPATH as suggested in "[RFC] do we really need all OVERRIDES in FILESPATH?". Instead of creating more complicated constructs to be able to push more stuff to FILESPATH (without '::') and then never use it.
MACHINE_OVERRIDES aren't specific to FILESPATH, as far as I know.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Re: [PATCH] bitbake.conf: don't append MACHINE_OVERRIDES to OVERRIDES when it's empty
In reply to Chris LarsonQuoted 36 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Chris Larson
Sent: Tuesday, October 19, 2010 2:09 PM
To: [email protected]
Subject: Re: [oe] [PATCH] bitbake.conf: don't appendMACHINE_OVERRIDESto OVERRIDES when it's emptyQuoted 3 lines · Chase
Quoted 3 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On BehalfOf
Quoted 7 lines
Quoted 7 lines
Martin Jansa
Sent: Saturday, October 16, 2010 2:25 PM
To: [email protected]
Subject: [oe] [PATCH] bitbake.conf: don't appendMACHINE_OVERRIDESto OVERRIDES when it's empty* empty
MACHINE_OVERRIDESadds :: to OVERRIDES (then in FILESPATHskips
Quoted 7 lines
Quoted 7 lines
every directory after this)
*strip()is needed to remove space in case some distribution has ieMACHINE_OVERRIDES?= ""
and then
MACHINE_OVERRIDES+= ""
or
MACHINE_OVERRIDES?= "${MACHINE_CLASS}", whereMACHINE_CLASSisempty
Quoted 4 lines
Quoted 1 line
again
I saw this issue in my overlay of having a "::" in my OVERRIDES which caused my parsing to fail in angstrom.inc. Applying this fix from
Quoted 8 lines
Martin
Quoted 1 line
resolves the parsing issue. My OVERRIDES appear to be in the correct
order
Quoted 1 line
with this change:
Can you explain this? "caused my parsing to fail" is not very useful information. What exactly failed?
One other detail I forgot to mention is that I was actually using bitbake from the Arago project which is based on 1.8.18. I did not see this issue if I used bitbake 1.10 I did not see this issue. I kept this same fix in my tree and tried with bitbake 1.10 and it too worked so it didn't seem like the fix was negatively impacting the 1.10 version.
Quoted 10 lines
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
PATCH 1/1 bitbake.conf: reverse OVERRIDES order in FILESPATH definition
In reply to Chris Larson* directories in FILESPATH are search for first fit and we would expect ie ${PN}/local/a.patch to be used before ${PN}/ramses/a.patch
* moving last ':' before OVERRIDES makes FILESPATHBASE/FILESPATHPKG/ as last option instead of first
--- conf/bitbake.conf | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
conf/bitbake.conf +1 -1
@@ -271,7 +271,7 @@ FILES_${PN}-locale = "${datadir}/locale" FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}" FILESPATHBASE = "${FILE_DIRNAME}" FILESPATHPKG = "${PF}:${P}:${PN}:${BP}:${BPN}:files:." -FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', 1).split(':') for p in d.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES', 1) + ':').split(':')])}" +FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', 1).split(':') for p in d.getVar('FILESPATHPKG', 1).split(':') for o in (':' + d.getVar('OVERRIDES', 1)).split(':')[::-1]])}" FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}" ##################################################################
Signature · 1 line
1.7.3.1