All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/3] Add ARM tune file overhaul based largely on work from Mark Hatle
Date: Thu, 28 Jul 2011 09:24:50 +0200	[thread overview]
Message-ID: <20110728072450.GE15286@jama.jama.net> (raw)
In-Reply-To: <4E30489A.100@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 5547 bytes --]

On Wed, Jul 27, 2011 at 12:19:22PM -0500, Mark Hatle wrote:
> On 7/27/11 10:25 AM, Phil Blundell wrote:
> > On Wed, 2011-07-27 at 09:58 -0500, Mark Hatle wrote:
> >> For the tune names..  armv5 means I want classic ARM instructions, while armv5t
> >> means I was thumb instructions.
> >>
> >> So armv5 and armv5t are distinct in the contents of the tunings.
> > 
> > Ah, I see.  Does that go for v4t too?  I can imagine cases where you
> > would want to say "select the v4T ISA but generate ARM code not Thumb".
> 
> Yes, for all of them, the TUNENAME selects the features that you want to use to
> compile, and suggests the other information like compatible architectures.
> 
> In the case where you want to build primarily one, and optionally the other the
> tunename makes it easy..
> 
> Say you want all of your system thumb, except for a few specific programs..
> 
> TUNENAME = "armv4t"
> 
> TUNENAME_pn-mysql = "armv4"
> 
> In the opposite case, where you want everything ARM, except for a few thumb:
> 
> TUNENAME = "armv7"
> TUNENAME_pn-bash = "armv7t"
> 
> PACKAGE_EXTRA_ARCHS_tune-armv7 = ${PACKAGE_EXTRA_ARCHS_tune-armv7t}

We've discussed this yesterday on #yocto and there is problem with this

Before tune-* overhaul we had ARM_INSTRUCTION_SET option to force arm
mode from recipe even for architectures supporting thumb (ie armv4t).

Mark is right that if we have PACKAGE_ARCH = "armv4t" and we force
no-thumb with ARM_INSTRUCTION_SET = "arm" then PACKAGE_ARCH should be
switched to "armv4" only to indicate that.

But ARM_INSTRUCTION_SET worked for all ARM architectures, but now I
would need to set
TUNENAME_pn-eglibc = "armv4" in openembedded-core/meta/conf/machine/include/arm/arch-armv4.inc
TUNENAME_pn-eglibc = "armv5" in openembedded-core/meta/conf/machine/include/arm/arch-armv5.inc
TUNENAME_pn-eglibc = "armv6" in openembedded-core/meta/conf/machine/include/arm/arch-armv6.inc
TUNENAME_pn-eglibc = "armv7" in openembedded-core/meta/conf/machine/include/arm/arch-armv7.inc
etc.. because I cannot disable thumb (while keeping thumb-interwork
enabled) from recipe globally for all as 
openembedded-core/meta/conf/machine/include/tune-thumb.inc
does, but that's not used and 
ARM_THUMB_M_OPT = "${@['-mno-thumb','-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
is not respected anymore in
openembedded-core/meta/conf/machine/include/arm/feature-arm-thumb.inc

ARM_INSTRUCTION_SET = "arm" is used in some recipes because with thumb
enabled it fails to build and maybe such recipes can be fixed
(ie eglibc now fails for armv4t and armv7a)
and for some recipes it's set because it's producing faster code (where
binary size was more important).

Another problem with setting TUNENAME_pn-foo for every arch is when
foo_1.0.bb is in some obscure layer somewhere and maintainer of that
layer would need to alter all arch-armv[4567]*.inc files to keep foo
from using thumb. Maybe something like this in recipe should work?
TUNENAME_pn-eglibc_armv4t = "armv4"
TUNENAME_pn-eglibc_armv5t = "armv5"

And scale of ARM_INSTRUCTION_SET now ignored with oe-core:
OE om-gta02@shr ~/shr-core/openembedded-core $ git grep ARM_INSTRUCTION_SET
meta/classes/qt4e.bbclass:ARM_INSTRUCTION_SET = "arm"
meta/classes/qt4x11.bbclass:ARM_INSTRUCTION_SET = "arm"
meta/conf/machine/include/tune-thumb.inc:ARM_INSTRUCTION_SET ?= "arm"
meta/conf/machine/include/tune-thumb.inc:OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
meta/conf/machine/include/tune-thumb.inc:ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
meta/recipes-core/eglibc/eglibc.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-core/glib-2.0/glib.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-core/glibc/glibc.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-core/glibc/glibc_2.10.1.bb:ARM_INSTRUCTION_SET = "arm"
meta/recipes-core/uclibc/uclibc.inc:                ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][bb.data.getVar("ARM_INSTRUCTION_SET", d, 1) != "arm"]} \
meta/recipes-devtools/gcc/gcc-csl-arm-2008q1.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-graphics/xorg-xserver/xserver-kdrive.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb:ARM_INSTRUCTION_SET = "arm"
meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.21.bb:ARM_INSTRUCTION_SET = "arm"
meta/recipes-multimedia/libmad/libmad_0.15.1b.bb:ARM_INSTRUCTION_SET = "arm"
meta/recipes-multimedia/tremor/tremor_20101121.bb:ARM_INSTRUCTION_SET = "arm"
meta/recipes-qt/qt4/qt4_arch.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-support/boost/boost-36.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-support/gmp/gmp.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-support/libgcrypt/libgcrypt.inc:ARM_INSTRUCTION_SET = "arm"
meta/recipes-support/liboil/liboil_0.3.17.bb:ARM_INSTRUCTION_SET = "arm"

OE om-gta02@shr ~/shr-core/meta-openembedded $ git grep ARM_INSTRUCTION_SET
meta-efl/classes/e-base.bbclass:ARM_INSTRUCTION_SET = "arm"
meta-efl/recipes-efl/webkit/webkit-efl_svn.bb:ARM_INSTRUCTION_SET = "arm"
meta-oe/recipes-core/glib-2.0/glib.inc:ARM_INSTRUCTION_SET = "arm"
meta-oe/recipes-devtools/gcc/gcc-4.5.inc:ARM_INSTRUCTION_SET = "arm"
meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc:ARM_INSTRUCTION_SET = "arm"
meta-oe/recipes-support/postgresql/postgresql.inc:ARM_INSTRUCTION_SET = "arm"

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  parent reply	other threads:[~2011-07-28  7:30 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1311683981.git.richard.purdie@linuxfoundation.org>
2011-07-26 12:44 ` [PATCH 1/3] Add ARM tune file overhaul based largely on work from Mark Hatle Richard Purdie
2011-07-26 12:46   ` Koen Kooi
2011-07-27 12:17   ` Phil Blundell
2011-07-27 13:33     ` Richard Purdie
2011-07-27 14:27       ` Mark Hatle
2011-07-27 14:33         ` Koen Kooi
2011-07-27 14:49           ` Mark Hatle
2011-07-27 14:57             ` Phil Blundell
2011-07-27 15:01               ` Koen Kooi
2011-07-27 15:08                 ` Phil Blundell
2011-07-27 15:13                   ` Koen Kooi
2011-07-27 15:17                     ` Phil Blundell
2011-07-29  6:31                   ` Khem Raj
2011-07-29  6:20             ` Khem Raj
2011-07-27 14:34         ` Richard Purdie
2011-07-27 14:44         ` Phil Blundell
2011-07-27 14:55           ` Mark Hatle
2011-07-29  6:18           ` Khem Raj
2011-07-29  7:15             ` Phil Blundell
2011-07-29  6:08       ` Khem Raj
2011-07-29  6:47         ` Phil Blundell
2011-07-29  6:51         ` Khem Raj
2011-07-27 14:34   ` Phil Blundell
2011-07-27 14:58     ` Mark Hatle
2011-07-27 15:25       ` Phil Blundell
2011-07-27 15:29         ` Richard Purdie
2011-07-27 15:49           ` Phil Blundell
2011-07-27 17:19         ` Mark Hatle
2011-07-27 19:31           ` Phil Blundell
2011-07-27 20:48             ` Mark Hatle
2011-07-27 21:16               ` Phil Blundell
2011-07-28  0:43                 ` Khem Raj
2011-07-28  7:24           ` Martin Jansa [this message]
2011-07-28  8:54             ` Phil Blundell
2011-07-28 18:17               ` Martin Jansa
2011-07-29  6:41           ` Khem Raj
2011-07-29  6:38         ` Khem Raj
2011-07-29  7:13           ` Phil Blundell
2011-07-29  6:27       ` Khem Raj
2011-07-27 17:31   ` do_rootfs broken, was: " Koen Kooi
2011-07-27 18:19     ` Koen Kooi
2011-07-28 11:39   ` Phil Blundell
2011-07-29  5:59   ` Khem Raj
2011-07-29  7:25     ` Phil Blundell
2011-07-29  8:22       ` Koen Kooi
2011-07-26 12:44 ` [PATCH 2/3] Add basic Mips core tune config Richard Purdie
2011-07-26 14:41   ` Mark Hatle
2011-07-26 16:51     ` Richard Purdie
2011-07-26 17:08       ` Mark Hatle
2011-07-26 19:47   ` Khem Raj
2011-08-11 11:25   ` Phil Blundell
2011-08-11 12:08     ` Richard Purdie
2011-08-11 12:29       ` Phil Blundell
2011-08-11 14:28         ` Richard Purdie
2011-08-11 14:49         ` Khem Raj
2011-08-12 14:35           ` Phil Blundell
2011-08-12 15:28             ` Khem Raj
2011-08-11 15:54     ` Mark Hatle
2011-07-26 12:44 ` [PATCH 3/3] Add basic PowerPC " Richard Purdie
2011-07-26 13:47   ` Kumar Gala
2011-07-26 13:59     ` Richard Purdie
2011-07-26 14:59       ` Mark Hatle
2011-07-26 15:22       ` Kumar Gala
2011-07-26 16:18         ` Richard Purdie
2011-07-26 21:56           ` Kumar Gala
2011-07-26 22:02           ` Kumar Gala
2011-07-26 22:29             ` Khem Raj
2011-07-26 22:52             ` Richard Purdie
2011-07-27  3:23               ` Kumar Gala
2011-07-27  8:36                 ` Richard Purdie
2011-07-27  8:44                   ` Koen Kooi
2011-07-27  9:30                     ` Richard Purdie
2011-07-28  5:25                       ` Add basic PowerPC core tune config (bug?) Kumar Gala
2011-07-28  6:09                         ` Saul Wold
2011-07-28  7:48                           ` Cui, Dexuan
2011-07-28  8:47                             ` Paul Eggleton
2011-07-28  8:57                               ` Koen Kooi
2011-07-28  9:20                                 ` Phil Blundell
2011-07-28 10:00                                   ` Koen Kooi
2011-07-28 10:03                                     ` Phil Blundell
2011-07-27  9:35                     ` [PATCH 3/3] Add basic PowerPC core tune config Phil Blundell
2011-07-26 22:03           ` Kumar Gala
2011-07-27  8:31             ` Richard Purdie
2011-07-26 20:03         ` Khem Raj
2011-07-26 14:57   ` Mark Hatle
2011-07-26 16:36     ` Richard Purdie
2011-07-26 16:53       ` Mark Hatle
2011-07-26 17:05         ` Richard Purdie
2011-07-26 17:15           ` Mark Hatle
2011-07-26 19:21             ` Richard Purdie
2011-07-26 20:28               ` Richard Purdie
2011-07-26 20:13       ` Khem Raj

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=20110728072450.GE15286@jama.jama.net \
    --to=martin.jansa@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.