Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/6] distro: Add defaultsetup.conf, a set of default configuration providing sane overrridable default for commonly used options
Date: Wed, 11 May 2011 10:37:50 +0100	[thread overview]
Message-ID: <1305106670.30391.321.camel@rex> (raw)
In-Reply-To: <3299F82E-BAF4-4CB9-9269-4CB36045E385@dominion.thruhere.net>

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




  reply	other threads:[~2011-05-11  9:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 14:00 [PATCH 0/6] RFC Distro config changes Richard Purdie
2011-05-10 14:00 ` [PATCH 2/6] bitbake.conf: Include the new default-providers.inc and default-versions.inc files Richard Purdie
2011-05-10 14:20   ` Koen Kooi
2011-05-11  9:09     ` Richard Purdie
2011-05-11 10:08       ` Koen Kooi
2011-05-11 11:24         ` Richard Purdie
2011-05-11 11:43           ` Koen Kooi
2011-05-11 13:34             ` Richard Purdie
2011-05-10 14:00 ` [PATCH 1/6] Drop poky-floating-revisions.inc, poky-bleeding.conf and poky-lsb.conf Richard Purdie
2011-05-10 14:00 ` [PATCH 6/6] preferred-xorg-versions.inc: Drop this, it makes no sense given we only have one version of these recipes Richard Purdie
2011-05-10 14:00 ` [PATCH 5/6] conf/distro/include/default-distrovars.inc: Create set of default 'distro' variable values Richard Purdie
2011-05-10 14:26   ` Frans Meulenbroeks
2011-05-10 19:26     ` Richard Purdie
2011-05-11 11:51       ` Frans Meulenbroeks
2011-05-15 20:48   ` Khem Raj
2011-05-19 22:51     ` Richard Purdie
2011-05-10 14:00 ` [PATCH 4/6] machine/qemu: Add qemu-config as an essential machine speicfic dependency and drop specific distro config Richard Purdie
2011-05-10 14:00 ` [PATCH 3/6] distro: Add defaultsetup.conf, a set of default configuration providing sane overrridable default for commonly used options Richard Purdie
2011-05-10 14:31   ` Koen Kooi
2011-05-11  9:37     ` Richard Purdie [this message]
2011-05-15 22:28       ` Khem Raj
2011-05-10 14:05 ` [PATCH 0/6] RFC Distro config changes Frans Meulenbroeks
2011-05-10 14:08   ` Richard Purdie
     [not found]     ` <BANLkTi=uvN8_u6SQhKfs2BwOnSOCQApKSQ@mail.gmail.com>
2011-05-11  3:42       ` Khem Raj
2011-05-10 15:58 ` Koen Kooi
2011-05-11  9:45   ` Richard Purdie
2011-05-11 10:13     ` Koen Kooi
2011-05-11 10:54       ` Richard Purdie
2011-05-11 11:45         ` Koen Kooi
2011-05-15 21:31           ` Khem Raj
2011-05-15 20:22     ` Khem Raj
2011-05-15 21:34       ` Khem Raj
2011-05-11 13:30 ` Richard Purdie
2011-05-15 20:27   ` Otavio Salvador
2011-05-16 12:24     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305106670.30391.321.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox