| Submitter | Richard Purdie |
|---|---|
| Date | May 10, 2011, 2 p.m. |
| Message ID | <0a007e99bacaaf9afaf3641635724fdb78974770.1305035617.git.richard.purdie@linuxfoundation.org> |
| Download | mbox | patch |
| Permalink | /patch/3649/ |
| State | New, archived |
| Headers | show |
Comments
Op 10 mei 2011, om 16:00 heeft Richard Purdie het volgende geschreven: > From: Richard Purdie <richard.purdie@linuxfoundation.org> > > The intent is to allow distros to share common core config but still allow > customisations. The core should work with no distro set but users > can still customise in any ways needed. > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > --- > meta/conf/bitbake.conf | 4 +- > meta/conf/distro/defaultsetup.conf | 23 ++++++++++ > .../include/{poky-eglibc.inc => tclibc-eglibc.inc} | 6 ++- > .../include/{poky-glibc.inc => tclibc-glibc.inc} | 6 ++- > .../include/{poky-uclibc.inc => tclibc-uclibc.inc} | 4 ++ > .../{poky-default.inc => tcmode-default.inc} | 13 +++--- > meta/conf/distro/poky.conf | 46 +++++-------------- > 7 files changed, 54 insertions(+), 48 deletions(-) > create mode 100644 meta/conf/distro/defaultsetup.conf > rename meta/conf/distro/include/{poky-eglibc.inc => tclibc-eglibc.inc} (92%) > rename meta/conf/distro/include/{poky-glibc.inc => tclibc-glibc.inc} (91%) > rename meta/conf/distro/include/{poky-uclibc.inc => tclibc-uclibc.inc} (86%) > rename meta/conf/distro/include/{poky-default.inc => tcmode-default.inc} (85%) > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf > index d843e70..ce74a9b 100644 > --- a/meta/conf/bitbake.conf > +++ b/meta/conf/bitbake.conf > @@ -627,9 +627,7 @@ include conf/build/${BUILD_SYS}.conf > include conf/target/${TARGET_SYS}.conf > include conf/machine/${MACHINE}.conf > include conf/machine-sdk/${SDKMACHINE}.conf > -include conf/distro/include/default-providers.inc > -include conf/distro/include/default-versions.inc > -include conf/distro/include/world-broken.inc > +include conf/distro/defaultsetup.conf > include conf/distro/${DISTRO}.conf Please include it after $DISTRO, otherwise ?= in $DISTRO won't work as intended. > include conf/documentation.conf > require conf/sanity.conf > diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf > new file mode 100644 > index 0000000..af5ef7b > --- /dev/null > +++ b/meta/conf/distro/defaultsetup.conf > @@ -0,0 +1,23 @@ > +include conf/distro/include/default-providers.inc > +include conf/distro/include/default-versions.inc > +include conf/distro/include/world-broken.inc > + > +TARGET_VENDOR ?= "-oecore" > + > +TARGET_FPU_arm ?= "soft" > +TARGET_FPU_armeb ?= "soft" Something more elaborate would be better, this is what angstrom has: conf/distro/include/angstrom.inc:TARGET_FPU_arm = "soft" conf/distro/include/angstrom.inc:TARGET_FPU_armeb = "soft" conf/distro/include/angstrom.inc:TARGET_FPU_ixp4xx = "soft" conf/distro/include/angstrom.inc:TARGET_FPU_ppc405 = "soft" conf/distro/include/angstrom.inc:TARGET_FPU_armv6 = "hard" conf/distro/include/angstrom.inc:TARGET_FPU_armv6-novfp = "soft" conf/distro/include/angstrom.inc:TARGET_FPU_armv7a = "hard" conf/distro/include/angstrom.inc:TARGET_FPU_ppc603e = "hard" you really want to use hard (don't confuse it with hardfp) on armv7a. > +INHERIT_INSANE ?= "insane" excellent! > > --- a/meta/conf/distro/include/poky-eglibc.inc > +++ b/meta/conf/distro/include/tclibc-eglibc.inc > @@ -2,6 +2,10 @@ > # eglibc specific configuration > # > > +TARGET_OS = "linux" > +TARGET_OS_arm = "linux-gnueabi" > +TARGET_OS_armeb = "linux-gnueabi" Maybe something like angstroms version: TARGET_OS = "linux" TARGET_OS .= "${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb']]}" TARGET_OS .= "${@['','-gnuspe'][bb.data.getVar('BASE_PACKAGE_ARCH',d,1) in ['ppce500', 'ppce500v2']]}" or the sane-toolchain version: def compute_os_portion_of_target_triplet (d): import bb arm_eabi_unsupported_arches = "armv1 armv2 armv3" ppc_spe_supporting_arches = "ppce500v2 ppce500" gnu_suffix = "" if bb.data.getVar('LIBC', d, 1) == "uclibc": libc_suffix = "uclibc" else: libc_suffix = "" if bb.data.getVar('TARGET_ARCH',d,1) in ['bfin']: if libc_suffix is not "uclibc": bb.fatal("bfin is not supported on glibc/eglibc. Please choose uclibc") else: os_suffix = "uclinux" else: os_suffix = "linux" bparch = bb.data.getVar('BASE_PACKAGE_ARCH', d,1) if bb.data.getVar('DISTRO_FEATURES',d,1) is not None and \ bparch is not None: if 'eabi' in bb.data.getVar('DISTRO_FEATURES',d,1).split() and \ bb.data.getVar('TARGET_ARCH', d, 1) in [ 'arm', 'armeb' ]: if bparch in arm_eabi_unsupported_arches.split(): bb.fatal("DISTRO requested EABI but selected machine does not support EABI") abi_suffix = "" else: if libc_suffix is not "uclibc": gnu_suffix = "gnu" abi_suffix = "eabi" elif bparch in ppc_spe_supporting_arches.split(): if libc_suffix is not "uclibc": gnu_suffix = "gnu" abi_suffix = "spe" else: abi_suffix = "" else: bb.note("DISTRO_FEATURES is not set abi suffix not set") abi_suffix = "" if bb.data.getVar('TOOLCHAIN_BRAND', d, 1) is not None and \ "csl" in bb.data.getVar('TOOLCHAIN_BRAND', d, 1): gnu_suffix = "gnu" if libc_suffix + gnu_suffix + abi_suffix is not "": return os_suffix + "-" + libc_suffix + gnu_suffix + abi_suffix else: return os_suffix > diff --git a/meta/conf/distro/include/poky-default.inc b/meta/conf/distro/include/tcmode-default.inc > similarity index 85% > rename from meta/conf/distro/include/poky-default.inc > rename to meta/conf/distro/include/tcmode-default.inc > index 91985b3..909d802 100644 > --- a/meta/conf/distro/include/poky-default.inc > +++ b/meta/conf/distro/include/tcmode-default.inc > @@ -1,18 +1,16 @@ > -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${POKYLIBC}" > +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "gcc-cross-intermediate" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime" > -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${POKYLIBC}-initial" > -PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${POKYLIBC}-nativesdk" > +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial" > +PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${TCLIBC}-nativesdk" Angstrom has this for *libc: # The things *libc can provide. PREFERRED_PROVIDER_virtual/libc = "${TCLIBC}" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}" # And the same as above for the nativesdk PREFERRED_PROVIDER_virtual/libc-nativesdk = "${TCLIBC}-nativesdk" PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk = "${TCLIBC}-initial-nativesdk" PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk = "${TCLIBC}-nativesdk" I needed the initial-nativesdk for meta-toolchain, but I can't recall the exact problem regards, Koen
On Tue, 2011-05-10 at 16:31 +0200, Koen Kooi wrote: > Op 10 mei 2011, om 16:00 heeft Richard Purdie het volgende geschreven: > > > From: Richard Purdie <richard.purdie@linuxfoundation.org> > > > > The intent is to allow distros to share common core config but still allow > > customisations. The core should work with no distro set but users > > can still customise in any ways needed. > > > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > > --- > > meta/conf/bitbake.conf | 4 +- > > meta/conf/distro/defaultsetup.conf | 23 ++++++++++ > > .../include/{poky-eglibc.inc => tclibc-eglibc.inc} | 6 ++- > > .../include/{poky-glibc.inc => tclibc-glibc.inc} | 6 ++- > > .../include/{poky-uclibc.inc => tclibc-uclibc.inc} | 4 ++ > > .../{poky-default.inc => tcmode-default.inc} | 13 +++--- > > meta/conf/distro/poky.conf | 46 +++++-------------- > > 7 files changed, 54 insertions(+), 48 deletions(-) > > create mode 100644 meta/conf/distro/defaultsetup.conf > > rename meta/conf/distro/include/{poky-eglibc.inc => tclibc-eglibc.inc} (92%) > > rename meta/conf/distro/include/{poky-glibc.inc => tclibc-glibc.inc} (91%) > > rename meta/conf/distro/include/{poky-uclibc.inc => tclibc-uclibc.inc} (86%) > > rename meta/conf/distro/include/{poky-default.inc => tcmode-default.inc} (85%) > > > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf > > index d843e70..ce74a9b 100644 > > --- a/meta/conf/bitbake.conf > > +++ b/meta/conf/bitbake.conf > > @@ -627,9 +627,7 @@ include conf/build/${BUILD_SYS}.conf > > include conf/target/${TARGET_SYS}.conf > > include conf/machine/${MACHINE}.conf > > include conf/machine-sdk/${SDKMACHINE}.conf > > -include conf/distro/include/default-providers.inc > > -include conf/distro/include/default-versions.inc > > -include conf/distro/include/world-broken.inc > > +include conf/distro/defaultsetup.conf > > include conf/distro/${DISTRO}.conf > > Please include it after $DISTRO, otherwise ?= in $DISTRO won't work as intended. Fixed, thanks. > > include conf/documentation.conf > > require conf/sanity.conf > > diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf > > new file mode 100644 > > index 0000000..af5ef7b > > --- /dev/null > > +++ b/meta/conf/distro/defaultsetup.conf > > @@ -0,0 +1,23 @@ > > +include conf/distro/include/default-providers.inc > > +include conf/distro/include/default-versions.inc > > +include conf/distro/include/world-broken.inc > > + > > +TARGET_VENDOR ?= "-oecore" > > + > > +TARGET_FPU_arm ?= "soft" > > +TARGET_FPU_armeb ?= "soft" > > Something more elaborate would be better, this is what angstrom has: > > conf/distro/include/angstrom.inc:TARGET_FPU_arm = "soft" > conf/distro/include/angstrom.inc:TARGET_FPU_armeb = "soft" > conf/distro/include/angstrom.inc:TARGET_FPU_ixp4xx = "soft" > conf/distro/include/angstrom.inc:TARGET_FPU_ppc405 = "soft" > conf/distro/include/angstrom.inc:TARGET_FPU_armv6 = "hard" > conf/distro/include/angstrom.inc:TARGET_FPU_armv6-novfp = "soft" > conf/distro/include/angstrom.inc:TARGET_FPU_armv7a = "hard" > conf/distro/include/angstrom.inc:TARGET_FPU_ppc603e = "hard" > > you really want to use hard (don't confuse it with hardfp) on armv7a. Agreed but we have a problem here as the default OVERRIDES in OECore don't include BASE_PACKAGE_ARCH. I'm kind of reluctant to do so too as the number of cases we need this are small and the strings aren't very unique. I'b feel happier if the override was something like parch-${BASE_PACKAGE_ARCH} as you could at least easily spot where it was being used. I appreciate we need to do something here, its just a question of what. > > --- a/meta/conf/distro/include/poky-eglibc.inc > > +++ b/meta/conf/distro/include/tclibc-eglibc.inc > > @@ -2,6 +2,10 @@ > > # eglibc specific configuration > > # > > > > +TARGET_OS = "linux" > > +TARGET_OS_arm = "linux-gnueabi" > > +TARGET_OS_armeb = "linux-gnueabi" > > Maybe something like angstroms version: > > TARGET_OS = "linux" > TARGET_OS .= "${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb']]}" > TARGET_OS .= "${@['','-gnuspe'][bb.data.getVar('BASE_PACKAGE_ARCH',d,1) in ['ppce500', 'ppce500v2']]}" I decided the _arm was more readable. Once we address the OVERRIDE issue, we can add the spe bits. > or the sane-toolchain version: > > def compute_os_portion_of_target_triplet (d): > import bb > arm_eabi_unsupported_arches = "armv1 armv2 armv3" > ppc_spe_supporting_arches = "ppce500v2 ppce500" > gnu_suffix = "" > if bb.data.getVar('LIBC', d, 1) == "uclibc": > libc_suffix = "uclibc" > else: > libc_suffix = "" > > if bb.data.getVar('TARGET_ARCH',d,1) in ['bfin']: > if libc_suffix is not "uclibc": > bb.fatal("bfin is not supported on glibc/eglibc. Please choose uclibc") > else: > os_suffix = "uclinux" > else: > os_suffix = "linux" > bparch = bb.data.getVar('BASE_PACKAGE_ARCH', d,1) > > if bb.data.getVar('DISTRO_FEATURES',d,1) is not None and \ > bparch is not None: > if 'eabi' in bb.data.getVar('DISTRO_FEATURES',d,1).split() and \ > bb.data.getVar('TARGET_ARCH', d, 1) in [ 'arm', 'armeb' ]: > if bparch in arm_eabi_unsupported_arches.split(): > bb.fatal("DISTRO requested EABI but selected machine does not support EABI") > abi_suffix = "" > else: > if libc_suffix is not "uclibc": > gnu_suffix = "gnu" > abi_suffix = "eabi" > elif bparch in ppc_spe_supporting_arches.split(): > if libc_suffix is not "uclibc": > gnu_suffix = "gnu" > abi_suffix = "spe" > else: > abi_suffix = "" > else: > bb.note("DISTRO_FEATURES is not set abi suffix not set") > abi_suffix = "" > > if bb.data.getVar('TOOLCHAIN_BRAND', d, 1) is not None and \ > "csl" in bb.data.getVar('TOOLCHAIN_BRAND', d, 1): > gnu_suffix = "gnu" > > if libc_suffix + gnu_suffix + abi_suffix is not "": > return os_suffix + "-" + libc_suffix + gnu_suffix + abi_suffix > else: > return os_suffix My eyes! We must be able to something more readable than that. Do we even support armv1? > > diff --git a/meta/conf/distro/include/poky-default.inc b/meta/conf/distro/include/tcmode-default.inc > > similarity index 85% > > rename from meta/conf/distro/include/poky-default.inc > > rename to meta/conf/distro/include/tcmode-default.inc > > index 91985b3..909d802 100644 > > --- a/meta/conf/distro/include/poky-default.inc > > +++ b/meta/conf/distro/include/tcmode-default.inc > > @@ -1,18 +1,16 @@ > > > -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${POKYLIBC}" > > +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}" > > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross" > > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial" > > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "gcc-cross-intermediate" > > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross" > > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross" > > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime" > > -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${POKYLIBC}-initial" > > -PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${POKYLIBC}-nativesdk" > > +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial" > > +PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${TCLIBC}-nativesdk" > > Angstrom has this for *libc: > > # The things *libc can provide. > PREFERRED_PROVIDER_virtual/libc = "${TCLIBC}" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial" > PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}" > > # And the same as above for the nativesdk > PREFERRED_PROVIDER_virtual/libc-nativesdk = "${TCLIBC}-nativesdk" > PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk = "${TCLIBC}-initial-nativesdk" > PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk = "${TCLIBC}-nativesdk" > > I needed the initial-nativesdk for meta-toolchain, but I can't recall the exact problem These are partly in tcmode-default.inc and partly in in tclibc-*.inc. I've fixed this for them all to be in tcmode-default.inc :) Cheers, Richard
On (11/05/11 10:37), Richard Purdie wrote: > On Tue, 2011-05-10 at 16:31 +0200, Koen Kooi wrote: > > Op 10 mei 2011, om 16:00 heeft Richard Purdie het volgende geschreven: > > > > > From: Richard Purdie <richard.purdie@linuxfoundation.org> > > > > > > The intent is to allow distros to share common core config but still allow > > > customisations. The core should work with no distro set but users > > > can still customise in any ways needed. > > > > > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > > > --- > > > meta/conf/bitbake.conf | 4 +- > > > meta/conf/distro/defaultsetup.conf | 23 ++++++++++ > > > .../include/{poky-eglibc.inc => tclibc-eglibc.inc} | 6 ++- > > > .../include/{poky-glibc.inc => tclibc-glibc.inc} | 6 ++- > > > .../include/{poky-uclibc.inc => tclibc-uclibc.inc} | 4 ++ > > > .../{poky-default.inc => tcmode-default.inc} | 13 +++--- > > > meta/conf/distro/poky.conf | 46 +++++-------------- > > > 7 files changed, 54 insertions(+), 48 deletions(-) > > > create mode 100644 meta/conf/distro/defaultsetup.conf > > > rename meta/conf/distro/include/{poky-eglibc.inc => tclibc-eglibc.inc} (92%) > > > rename meta/conf/distro/include/{poky-glibc.inc => tclibc-glibc.inc} (91%) > > > rename meta/conf/distro/include/{poky-uclibc.inc => tclibc-uclibc.inc} (86%) > > > rename meta/conf/distro/include/{poky-default.inc => tcmode-default.inc} (85%) > > > > > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf > > > index d843e70..ce74a9b 100644 > > > --- a/meta/conf/bitbake.conf > > > +++ b/meta/conf/bitbake.conf > > > @@ -627,9 +627,7 @@ include conf/build/${BUILD_SYS}.conf > > > include conf/target/${TARGET_SYS}.conf > > > include conf/machine/${MACHINE}.conf > > > include conf/machine-sdk/${SDKMACHINE}.conf > > > -include conf/distro/include/default-providers.inc > > > -include conf/distro/include/default-versions.inc > > > -include conf/distro/include/world-broken.inc > > > +include conf/distro/defaultsetup.conf > > > include conf/distro/${DISTRO}.conf > > > > Please include it after $DISTRO, otherwise ?= in $DISTRO won't work as intended. > > Fixed, thanks. > > > > > include conf/documentation.conf > > > require conf/sanity.conf > > > diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf > > > new file mode 100644 > > > index 0000000..af5ef7b > > > --- /dev/null > > > +++ b/meta/conf/distro/defaultsetup.conf > > > @@ -0,0 +1,23 @@ > > > +include conf/distro/include/default-providers.inc > > > +include conf/distro/include/default-versions.inc > > > +include conf/distro/include/world-broken.inc > > > + > > > +TARGET_VENDOR ?= "-oecore" > > > + > > > +TARGET_FPU_arm ?= "soft" > > > +TARGET_FPU_armeb ?= "soft" > > > > Something more elaborate would be better, this is what angstrom has: > > > > conf/distro/include/angstrom.inc:TARGET_FPU_arm = "soft" > > conf/distro/include/angstrom.inc:TARGET_FPU_armeb = "soft" > > conf/distro/include/angstrom.inc:TARGET_FPU_ixp4xx = "soft" > > conf/distro/include/angstrom.inc:TARGET_FPU_ppc405 = "soft" > > conf/distro/include/angstrom.inc:TARGET_FPU_armv6 = "hard" > > conf/distro/include/angstrom.inc:TARGET_FPU_armv6-novfp = "soft" > > conf/distro/include/angstrom.inc:TARGET_FPU_armv7a = "hard" > > conf/distro/include/angstrom.inc:TARGET_FPU_ppc603e = "hard" > > > > you really want to use hard (don't confuse it with hardfp) on armv7a. > > Agreed but we have a problem here as the default OVERRIDES in OECore > don't include BASE_PACKAGE_ARCH. I'm kind of reluctant to do so too as > the number of cases we need this are small and the strings aren't very > unique. I'b feel happier if the override was something like > parch-${BASE_PACKAGE_ARCH} as you could at least easily spot where it > was being used. > > I appreciate we need to do something here, its just a question of what. > > > > --- a/meta/conf/distro/include/poky-eglibc.inc > > > +++ b/meta/conf/distro/include/tclibc-eglibc.inc > > > @@ -2,6 +2,10 @@ > > > # eglibc specific configuration > > > # > > > > > > +TARGET_OS = "linux" > > > +TARGET_OS_arm = "linux-gnueabi" > > > +TARGET_OS_armeb = "linux-gnueabi" > > > > Maybe something like angstroms version: > > > > TARGET_OS = "linux" > > TARGET_OS .= "${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb']]}" > > TARGET_OS .= "${@['','-gnuspe'][bb.data.getVar('BASE_PACKAGE_ARCH',d,1) in ['ppce500', 'ppce500v2']]}" > > I decided the _arm was more readable. Once we address the OVERRIDE > issue, we can add the spe bits. > > > or the sane-toolchain version: > > > > def compute_os_portion_of_target_triplet (d): > > import bb > > arm_eabi_unsupported_arches = "armv1 armv2 armv3" > > ppc_spe_supporting_arches = "ppce500v2 ppce500" > > gnu_suffix = "" > > if bb.data.getVar('LIBC', d, 1) == "uclibc": > > libc_suffix = "uclibc" > > else: > > libc_suffix = "" > > > > if bb.data.getVar('TARGET_ARCH',d,1) in ['bfin']: > > if libc_suffix is not "uclibc": > > bb.fatal("bfin is not supported on glibc/eglibc. Please choose uclibc") > > else: > > os_suffix = "uclinux" > > else: > > os_suffix = "linux" > > bparch = bb.data.getVar('BASE_PACKAGE_ARCH', d,1) > > > > if bb.data.getVar('DISTRO_FEATURES',d,1) is not None and \ > > bparch is not None: > > if 'eabi' in bb.data.getVar('DISTRO_FEATURES',d,1).split() and \ > > bb.data.getVar('TARGET_ARCH', d, 1) in [ 'arm', 'armeb' ]: > > if bparch in arm_eabi_unsupported_arches.split(): > > bb.fatal("DISTRO requested EABI but selected machine does not support EABI") > > abi_suffix = "" > > else: > > if libc_suffix is not "uclibc": > > gnu_suffix = "gnu" > > abi_suffix = "eabi" > > elif bparch in ppc_spe_supporting_arches.split(): > > if libc_suffix is not "uclibc": > > gnu_suffix = "gnu" > > abi_suffix = "spe" > > else: > > abi_suffix = "" > > else: > > bb.note("DISTRO_FEATURES is not set abi suffix not set") > > abi_suffix = "" > > > > if bb.data.getVar('TOOLCHAIN_BRAND', d, 1) is not None and \ > > "csl" in bb.data.getVar('TOOLCHAIN_BRAND', d, 1): > > gnu_suffix = "gnu" > > > > if libc_suffix + gnu_suffix + abi_suffix is not "": > > return os_suffix + "-" + libc_suffix + gnu_suffix + abi_suffix > > else: > > return os_suffix > > My eyes! We must be able to something more readable than that. Do we > even support armv1? oe had lot of combinations to consider e.g. oabi/eabi/spe/uclinux/uclibc/external-toolchain when it came to compute the TARGET_OS and while not so readable may be it did address all of the combinations and permutations well. oe-core may not *yet* worry for many of them and some like oabi can be dropped but eventually it might need something handy to compute TARGET_OS may be a map would be more readable. -Khem
Patch
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index d843e70..ce74a9b 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -627,9 +627,7 @@ include conf/build/${BUILD_SYS}.conf include conf/target/${TARGET_SYS}.conf include conf/machine/${MACHINE}.conf include conf/machine-sdk/${SDKMACHINE}.conf -include conf/distro/include/default-providers.inc -include conf/distro/include/default-versions.inc -include conf/distro/include/world-broken.inc +include conf/distro/defaultsetup.conf include conf/distro/${DISTRO}.conf include conf/documentation.conf require conf/sanity.conf diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf new file mode 100644 index 0000000..af5ef7b --- /dev/null +++ b/meta/conf/distro/defaultsetup.conf @@ -0,0 +1,23 @@ +include conf/distro/include/default-providers.inc +include conf/distro/include/default-versions.inc +include conf/distro/include/world-broken.inc + +TARGET_VENDOR ?= "-oecore" + +TARGET_FPU_arm ?= "soft" +TARGET_FPU_armeb ?= "soft" + +TCMODE ?= "default" +require conf/distro/include/tcmode-${TCMODE}.inc + +TCLIBC ?= "eglibc" +require conf/distro/include/tclibc-${TCLIBC}.inc + +CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}${@['', '/' + str(bb.data.getVar('SDKMACHINE', d, 1))][bool(bb.data.getVar('SDKMACHINE', d, 1))]}" + +USER_CLASSES ?= "" +PACKAGE_CLASSES ?= "package_ipk" +INHERIT_INSANE ?= "insane" +INHERIT_DISTRO ?= "debian devshell sstate license" +INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_INSANE} ${INHERIT_DISTRO}" + diff --git a/meta/conf/distro/include/poky-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc similarity index 92% rename from meta/conf/distro/include/poky-eglibc.inc rename to meta/conf/distro/include/tclibc-eglibc.inc index 3d2c362..16625e3 100644 --- a/meta/conf/distro/include/poky-eglibc.inc +++ b/meta/conf/distro/include/tclibc-eglibc.inc @@ -2,6 +2,10 @@ # eglibc specific configuration # +TARGET_OS = "linux" +TARGET_OS_arm = "linux-gnueabi" +TARGET_OS_armeb = "linux-gnueabi" + # Add glibc overrides to the overrides for eglibc. OVERRIDES .= ":libc-glibc" @@ -17,8 +21,6 @@ PREFERRED_PROVIDER_virtual/libiconv-nativesdk ?= "eglibc-nativesdk" PREFERRED_PROVIDER_virtual/libc-nativesdk ?= "eglibc-nativesdk" PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk ?= "eglibc-initial-nativesdk" -TARGET_OS = "${GLIBCTARGETOS}" - CXXFLAGS += "-fvisibility-inlines-hidden" LIBC_DEPENDENCIES = "libsegfault \ diff --git a/meta/conf/distro/include/poky-glibc.inc b/meta/conf/distro/include/tclibc-glibc.inc similarity index 91% rename from meta/conf/distro/include/poky-glibc.inc rename to meta/conf/distro/include/tclibc-glibc.inc index 4be7122..79da986 100644 --- a/meta/conf/distro/include/poky-glibc.inc +++ b/meta/conf/distro/include/tclibc-glibc.inc @@ -2,6 +2,10 @@ # glibc specific configuration # +TARGET_OS = "linux" +TARGET_OS_arm = "linux-gnueabi" +TARGET_OS_armeb = "linux-gnueabi" + # Add glibc to the overrides. OVERRIDES =. "libc-glibc:" @@ -16,8 +20,6 @@ PREFERRED_PROVIDER_virtual/libiconv-nativesdk ?= "glibc-nativesdk" PREFERRED_PROVIDER_virtual/libc-nativesdk ?= "glibc-nativesdk" PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk ?= "glibc-initial-nativesdk" -TARGET_OS = "${GLIBCTARGETOS}" - CXXFLAGS += "-fvisibility-inlines-hidden" LIBC_DEPENDENCIES = "\ diff --git a/meta/conf/distro/include/poky-uclibc.inc b/meta/conf/distro/include/tclibc-uclibc.inc similarity index 86% rename from meta/conf/distro/include/poky-uclibc.inc rename to meta/conf/distro/include/tclibc-uclibc.inc index def9dfe..18748fa 100644 --- a/meta/conf/distro/include/poky-uclibc.inc +++ b/meta/conf/distro/include/tclibc-uclibc.inc @@ -2,6 +2,10 @@ # uclibc specific configuration # +TARGET_OS = "linux-uclibc" +TARGET_OS_arm = "linux-uclibceabi" +TARGET_OS_armeb = "linux-uclibceabi" + # Add uclibc overrides to the overrides. OVERRIDES =. "libc-uclibc:" diff --git a/meta/conf/distro/include/poky-default.inc b/meta/conf/distro/include/tcmode-default.inc similarity index 85% rename from meta/conf/distro/include/poky-default.inc rename to meta/conf/distro/include/tcmode-default.inc index 91985b3..909d802 100644 --- a/meta/conf/distro/include/poky-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc @@ -1,18 +1,16 @@ # -# Poky's default configuration +# Default toolchain configuration # -TARGET_VENDOR = "-poky" - -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${POKYLIBC}" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "gcc-cross-intermediate" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime" -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${POKYLIBC}-initial" -PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${POKYLIBC}-nativesdk" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial" +PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk ?= "${TCLIBC}-nativesdk" PREFERRED_PROVIDER_virtual/gettext ??= "gettext" @@ -50,6 +48,7 @@ PREFERRED_VERSION_elfutils ?= "0.148" # some packages using an archive format incompatible with earlier gzip PREFERRED_VERSION_gzip-native ?= "1.4" +# Setup suitable toolchain flags require conf/distro/include/as-needed.inc - +TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH', d, True) in ['mips', 'mipsel', 'mips64', 'mips64el']]}" diff --git a/meta/conf/distro/poky.conf b/meta/conf/distro/poky.conf index 2e9d327..f13a67f 100644 --- a/meta/conf/distro/poky.conf +++ b/meta/conf/distro/poky.conf @@ -1,56 +1,29 @@ - DISTRO = "poky" -DISTRO_NAME = "Yocto (Built by Poky 4.0)" -DISTRO_VERSION = "0.9+snapshot-${DATE}" +DISTRO_NAME = "Yocto (Built by Poky 5.0)" +DISTRO_VERSION = "1.0+snapshot-${DATE}" +SDK_VENDOR = "-pokysdk" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" MAINTAINER = "Poky <poky@yoctoproject.org>" -USER_CLASSES ?= "" - -PACKAGE_CLASSES ?= "package_ipk" -INHERIT_INSANE ?= "insane" -INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} debian devshell ${INHERIT_INSANE} sstate license" -# For some reason, this doesn't work -# TARGET_OS ?= "linux" -# TARGET_VENDOR ?= "-poky" -# Set by POKYMODE instead -TARGET_OS = "linux" -TARGET_FPU_arm ?= "soft" -TARGET_FPU_armeb ?= "soft" -TARGET_FPU_nokia800 = "hard" - -TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH', d, True) in ['mips', 'mipsel', 'mips64', 'mips64el']]}" +TARGET_VENDOR = "-poky" QA_LOGFILE = "${TMPDIR}/qa.log" IMAGE_ROOTFS_SIZE_ext2 ?= "131072" +LOCALCONF_VERSION = "1" + OEINCLUDELOGS = "yes" KERNEL_CONSOLE = "ttyS0" -# Default to TARGETOS values for EABI on arm -GLIBCTARGETOS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb']]}" -UCLIBCTARGETOS = "linux${@['-uclibc','-uclibceabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb']]}" - -POKYMODE ?= "default" -require conf/distro/include/poky-${POKYMODE}.inc - -POKYLIBC ?= "eglibc" -require conf/distro/include/poky-${POKYLIBC}.inc - -SDK_NAME = "${DISTRO}-${POKYLIBC}-${SDK_ARCH}-${TARGET_ARCH}" +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" -CACHE = "${TMPDIR}/cache/${POKYMODE}-${POKYLIBC}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}${@['', '/' + str(bb.data.getVar('SDKMACHINE', d, 1))][bool(bb.data.getVar('SDKMACHINE', d, 1))]}" - - require conf/distro/include/preferred-xorg-versions.inc PCMCIA_MANAGER ?= "pcmciautils" -#IMAGE_LINGUAS ?= "en-gb en-us" -#LIMIT_BUILT_LOCALES ?= "en_GB en_US" IMAGE_LINGUAS ?= "en-us en-gb" LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB" ENABLE_BINARY_LOCALE_GENERATION ?= "1" @@ -62,6 +35,8 @@ POKY_EXTRA_RDEPENDS = "task-core-boot" POKY_EXTRA_RDEPENDS_qemuarm = "qemu-config" POKY_EXTRA_RDEPENDS_qemuarmv6 = "qemu-config" POKY_EXTRA_RDEPENDS_qemuarmv7 = "qemu-config" +POKY_EXTRA_RDEPENDS_qemumips = "qemu-config" +POKY_EXTRA_RDEPENDS_qemuppc = "qemu-config" POKY_EXTRA_RDEPENDS_qemux86 = "qemu-config" POKY_EXTRA_RDEPENDS_qemux86-64 = "qemu-config" @@ -93,6 +68,9 @@ COMMON_LICENSE_DIR ??= "${COREBASE}/meta/files/common-licenses" BB_GENERATE_MIRROR_TARBALLS ??= "0" +QEMU_TARGETS ?= "arm i386 mips mipsel ppc x86_64" +# Other QEMU_TARGETS "mips64 mips64el sh4" + PREMIRRORS ?= "\ bzr://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \ cvs://.*/.* http://autobuilder.yoctoproject.org/sources/ \n \