Patchwork [3/7] conf/machine/include: Cleanup MIPS tunings to match README

login
register
mail settings
Submitter Mark Hatle
Date April 3, 2012, 7:47 p.m.
Message ID <c1765e7544603baa60bec27185a947aeee404bee.1333481624.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/25119/
State New
Headers show

Comments

Mark Hatle - April 3, 2012, 7:47 p.m.
Cleanup the MIPS tunings to match the new tuning README file.  Also
add a MIPS specific README file to explain the MIPS specifical
architectural issues.

Finally correct the variant configurations within the tune-mips32.inc.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/conf/machine/include/mips/README        |   36 ++++++++++++++++++++++++
 meta/conf/machine/include/mips/arch-mips.inc |   38 ++++++++++++++++++++++++-
 meta/conf/machine/include/tune-mips32.inc    |   17 ++++++++---
 3 files changed, 84 insertions(+), 7 deletions(-)
 create mode 100644 meta/conf/machine/include/mips/README
Phil Blundell - April 3, 2012, 7:51 p.m.
On Tue, 2012-04-03 at 14:47 -0500, Mark Hatle wrote:
> +MIPSPKGSFX_FPU - This defines if the floating point hardware is used by
> +this tuning.  A "-nf" is added to the PKGARCH in this case.

That's backwards, surely?

p.
Mark Hatle - April 3, 2012, 7:57 p.m.
On 4/3/12 2:51 PM, Phil Blundell wrote:
> On Tue, 2012-04-03 at 14:47 -0500, Mark Hatle wrote:
>> +MIPSPKGSFX_FPU - This defines if the floating point hardware is used by
>> +this tuning.  A "-nf" is added to the PKGARCH in this case.
>
> That's backwards, surely?

I can restate it to be more clear.. but we only add "-nf" if soft-float is 
defined.  If floating point hardware is enabled we set it to "".

--Mark

> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Andreas Oberritter - April 4, 2012, 10:10 p.m.
On 03.04.2012 21:47, Mark Hatle wrote:
> Cleanup the MIPS tunings to match the new tuning README file.  Also
> add a MIPS specific README file to explain the MIPS specifical
> architectural issues.
> 
> Finally correct the variant configurations within the tune-mips32.inc.

What was mipsel-oe-linux before now became mips32el-oe-linux, i.e.
tmp/work/mipsel-oe-linux now is tmp/work/mips32el-oe-linux. I'm not sure
what else broke.

Was this intentional?

Regards,
Andreas
Khem Raj - April 5, 2012, 4:17 a.m.
On Wed, Apr 4, 2012 at 3:10 PM, Andreas Oberritter <obi@opendreambox.org> wrote:
>
> What was mipsel-oe-linux before now became mips32el-oe-linux, i.e.
> tmp/work/mipsel-oe-linux now is tmp/work/mips32el-oe-linux. I'm not sure
> what else broke.
>
> Was this intentional?

I dont think so. mips-*-* in general indicates 32bit BE mips and
mipsel-*-* indicates
32bit LE mips so devicing mips32 and mips32el may be more explicit but
is not widely
used norm
Mark Hatle - April 6, 2012, 5:33 p.m.
On 4/4/12 11:17 PM, Khem Raj wrote:
> On Wed, Apr 4, 2012 at 3:10 PM, Andreas Oberritter<obi@opendreambox.org>  wrote:
>>
>> What was mipsel-oe-linux before now became mips32el-oe-linux, i.e.
>> tmp/work/mipsel-oe-linux now is tmp/work/mips32el-oe-linux. I'm not sure
>> what else broke.
>>
>> Was this intentional?
>
> I dont think so. mips-*-* in general indicates 32bit BE mips and
> mipsel-*-* indicates
> 32bit LE mips so devicing mips32 and mips32el may be more explicit but
> is not widely
> used norm

If that has changed it was certainly not intentional.  As Khem said the expected 
GNU canonical archs are:

mips-*-*
mipsel-*-*
mips64-*-*
mips64el-*-*

mips32 should work, but it was not expected to have changed.

Looking through, the GNU canonical arch should only match the above.  The 
namings in the tmp/work directory are strictly following the -package arch- 
namings, which don't affect system configuration.

I checked the logs from my test builds, and the mips32* reused the mips* builds 
because the canonical arch of the configuration and such were the same.

(Looked at config.log in a couple of packages...)  if you see mips32-* in the 
config.log, let me know.

--Mark

> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Khem Raj - April 6, 2012, 9:30 p.m.
On Fri, Apr 6, 2012 at 10:33 AM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 4/4/12 11:17 PM, Khem Raj wrote:
>>
>> On Wed, Apr 4, 2012 at 3:10 PM, Andreas Oberritter<obi@opendreambox.org>
>>  wrote:
>>>
>>>
>>> What was mipsel-oe-linux before now became mips32el-oe-linux, i.e.
>>> tmp/work/mipsel-oe-linux now is tmp/work/mips32el-oe-linux. I'm not sure
>>> what else broke.
>>>
>>> Was this intentional?
>>
>>
>> I dont think so. mips-*-* in general indicates 32bit BE mips and
>> mipsel-*-* indicates
>> 32bit LE mips so devicing mips32 and mips32el may be more explicit but
>> is not widely
>> used norm
>
>
> If that has changed it was certainly not intentional.  As Khem said the
> expected GNU canonical archs are:
>
> mips-*-*
> mipsel-*-*
> mips64-*-*
> mips64el-*-*
>
> mips32 should work, but it was not expected to have changed.
>
> Looking through, the GNU canonical arch should only match the above.  The
> namings in the tmp/work directory are strictly following the -package arch-
> namings, which don't affect system configuration.
>
> I checked the logs from my test builds, and the mips32* reused the mips*
> builds because the canonical arch of the configuration and such were the
> same.
>
> (Looked at config.log in a couple of packages...)  if you see mips32-* in
> the config.log, let me know.

see angstrom buildhistory its all filled with changes from mips -> mips32
its unwanted.
Mark Hatle - April 7, 2012, 12:10 a.m.
Just ran a local build with the qemumips machine, this is a standard mips32 target.

 From the configure line for eglibc:

/msp-lpggp1/mhatle/git/oe-core/build-mips32/tmp-eglibc/work/mips32-oe-linux/eglibc-2.13-r23+svnr15508/eglibc-2_13/libc/configure 
--build=x86_64-linux --host=mips-oe-linux --target=mips-oe-linux --prefix=/usr 
--exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin 
--libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc 
--sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib 
--includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info 
--mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking 
--with-libtool-sysroot=/msp-lpggp1/mhatle/git/oe-core/build-mips32/tmp-eglibc/sysroots/qemumips 
--enable-kernel=2.6.16 --without-cvs --disable-profile --disable-debug 
--without-gd --enable-clocale=gnu --enable-add-ons=ports,nptl,libidn,ports 
--with-headers=/msp-lpggp1/mhatle/git/oe-core/build-mips32/tmp-eglibc/sysroots/qemumips/usr/include 
--without-selinux

The system is correctly setting the target to "mips-oe-linux".

I checked and bash is the same way.

So the canonical arch is correct, the mips32 is only the packaging arch.  It was 
always intended that the packaging arch be used in full on MIPS.  (This will 
allow us to specify mips32r2, mipsiii, mipsiv, etc as necessary if we expand the 
mips tunings.)

So right now, I don't see any failure conditions with an oe-core build.  (This 
is oe-core as of earlier today.)

--Mark

On 4/6/12 4:30 PM, Khem Raj wrote:
> On Fri, Apr 6, 2012 at 10:33 AM, Mark Hatle<mark.hatle@windriver.com>  wrote:
>> On 4/4/12 11:17 PM, Khem Raj wrote:
>>>
>>> On Wed, Apr 4, 2012 at 3:10 PM, Andreas Oberritter<obi@opendreambox.org>
>>>   wrote:
>>>>
>>>>
>>>> What was mipsel-oe-linux before now became mips32el-oe-linux, i.e.
>>>> tmp/work/mipsel-oe-linux now is tmp/work/mips32el-oe-linux. I'm not sure
>>>> what else broke.
>>>>
>>>> Was this intentional?
>>>
>>>
>>> I dont think so. mips-*-* in general indicates 32bit BE mips and
>>> mipsel-*-* indicates
>>> 32bit LE mips so devicing mips32 and mips32el may be more explicit but
>>> is not widely
>>> used norm
>>
>>
>> If that has changed it was certainly not intentional.  As Khem said the
>> expected GNU canonical archs are:
>>
>> mips-*-*
>> mipsel-*-*
>> mips64-*-*
>> mips64el-*-*
>>
>> mips32 should work, but it was not expected to have changed.
>>
>> Looking through, the GNU canonical arch should only match the above.  The
>> namings in the tmp/work directory are strictly following the -package arch-
>> namings, which don't affect system configuration.
>>
>> I checked the logs from my test builds, and the mips32* reused the mips*
>> builds because the canonical arch of the configuration and such were the
>> same.
>>
>> (Looked at config.log in a couple of packages...)  if you see mips32-* in
>> the config.log, let me know.
>
> see angstrom buildhistory its all filled with changes from mips ->  mips32
> its unwanted.
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Andreas Oberritter - April 8, 2012, 9:34 p.m.
On 07.04.2012 02:10, Mark Hatle wrote:
> Just ran a local build with the qemumips machine, this is a standard
> mips32 target.
> 
> From the configure line for eglibc:
> 
> /msp-lpggp1/mhatle/git/oe-core/build-mips32/tmp-eglibc/work/mips32-oe-linux/eglibc-2.13-r23+svnr15508/eglibc-2_13/libc/configure
> --build=x86_64-linux --host=mips-oe-linux --target=mips-oe-linux
> --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
> --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc
> --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib
> --includedir=/usr/include --oldincludedir=/usr/include
> --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules
> --disable-dependency-tracking
> --with-libtool-sysroot=/msp-lpggp1/mhatle/git/oe-core/build-mips32/tmp-eglibc/sysroots/qemumips
> --enable-kernel=2.6.16 --without-cvs --disable-profile --disable-debug
> --without-gd --enable-clocale=gnu
> --enable-add-ons=ports,nptl,libidn,ports
> --with-headers=/msp-lpggp1/mhatle/git/oe-core/build-mips32/tmp-eglibc/sysroots/qemumips/usr/include
> --without-selinux
> 
> The system is correctly setting the target to "mips-oe-linux".
> 
> I checked and bash is the same way.
> 
> So the canonical arch is correct, the mips32 is only the packaging
> arch.  It was always intended that the packaging arch be used in full on
> MIPS.  (This will allow us to specify mips32r2, mipsiii, mipsiv, etc as
> necessary if we expand the mips tunings.)

I don't think such a change should be done only few days before a
release. Until this patch was applied, the packaging arch has always
been mipsel, not mips32el. Please, revert or fix this!

> So right now, I don't see any failure conditions with an oe-core build. 
> (This is oe-core as of earlier today.)
> 
> --Mark

Patch

diff --git a/meta/conf/machine/include/mips/README b/meta/conf/machine/include/mips/README
new file mode 100644
index 0000000..6a22739
--- /dev/null
+++ b/meta/conf/machine/include/mips/README
@@ -0,0 +1,36 @@ 
+2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
+  - Initial Version
+
+MIPS currently defines 12 ABIs.  Combinations of:
+ *) Big/Little Endian
+ *) Hardware/Software Floating Point
+ *) o32, n32, n64 ABI
+
+TUNE_ARCH, the GNU canonical arch, is defined as:
+
+mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}
+
+The package arch is defined in such a way to generated a standard naming
+scheme.  The scheme is: <mips variant>[-nf][-n32]
+
+TUNE_PKGARCH is defined as:
+
+${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}
+
+The following is a list of MIPS specific variables:
+
+MIPSPKGSFX_BYTE - This is defined as either blank and "64" for MIPS64 CPUs.
+
+MIPSPKGSFX_ENDIAN - For bigendian hardware this is blank, otherwise it's
+defined as "el".
+
+MIPSPKGSFX_VARIANT_tune-<tune> - In the default tunings it is set to the
+same value as TUNE_ARCH.  In custom, optimized tunings, the value should
+be modified to more precisely describe the tuning.
+
+MIPSPKGSFX_FPU - This defines if the floating point hardware is used by
+this tuning.  A "-nf" is added to the PKGARCH in this case.
+
+MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous
+values are not enough to distringuish the package.  "-n32" is added when
+building for N32 ABI.
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index b7ded76..8758ecd 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -36,32 +36,66 @@  MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf",
 MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}"
 
 TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
-TUNE_PKGARCH ?= "${TUNE_ARCH}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
+TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
 
 # Base tunes
 AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
 TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
 BASE_LIB_tune-mips = "lib"
+MIPSPKGSFX_VARIANT_tune-mips = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips = "mips"
+
 TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard"
 BASE_LIB_tune-mips64-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-n32 = "mips64-n32"
+
 TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard"
 BASE_LIB_tune-mips64 = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64 = "mips64"
+
 TUNE_FEATURES_tune-mipsel = "o32 fpu-hard"
 BASE_LIB_tune-mipsel = "lib"
+MIPSPKGSFX_VARIANT_tune-mipsel = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsel = "mipsel"
+
 TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard"
 BASE_LIB_tune-mips64el-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64el-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-n32 = "mips64el-n32"
+
 TUNE_FEATURES_tune-mips64el = "n64 fpu-hard"
 BASE_LIB_tune-mips64el = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64el = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el = "mips64el"
+
 TUNE_FEATURES_tune-mips-nf = "o32 bigendian"
 BASE_LIB_tune-mips-nf = "lib"
+MIPSPKGSFX_VARIANT_tune-mips-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips-nf = "mips-nf"
+
 TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian"
 BASE_LIB_tune-mips64-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-nf-n32 = "mips64-nf-n32"
+
 TUNE_FEATURES_tune-mips64-nf = "n64 bigendian"
 BASE_LIB_tune-mips64-nf = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-nf = "mips64-nf"
+
 TUNE_FEATURES_tune-mipsel-nf = "o32"
 BASE_LIB_tune-mipsel-nf = "lib"
+MIPSPKGSFX_VARIANT_tune-mipsel-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsel-nf = "mipsel-nf"
+
 TUNE_FEATURES_tune-mips64el-nf-n32 = "n32"
 BASE_LIB_tune-mips64el-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64el-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-n32 = "mips64el-nf-n32"
+
 TUNE_FEATURES_tune-mips64el-nf = "n64"
 BASE_LIB_tune-mips64el-nf = "lib64"
-
+MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf"
diff --git a/meta/conf/machine/include/tune-mips32.inc b/meta/conf/machine/include/tune-mips32.inc
index 45d865e..93ed5ee 100644
--- a/meta/conf/machine/include/tune-mips32.inc
+++ b/meta/conf/machine/include/tune-mips32.inc
@@ -7,12 +7,19 @@  TUNE_CONFLICTS[mips32] = "n64 n32"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips32", "-march=mips32", "", d)}"
 
 AVAILTUNES += "mips32 mips32el mips32-nf mips32el-nf"
+
 TUNE_FEATURES_tune-mips32 = "${TUNE_FEATURES_tune-mips} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32 = "mips"
+MIPSPKGSFX_VARIANT_tune-mips32 = "mips32"
+PACKAGE_EXTRA_ARCHS_tune-mips32 = "mips mips32"
+
 TUNE_FEATURES_tune-mips32el = "${TUNE_FEATURES_tune-mipsel} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32el = "mipsel"
+MIPSPKGSFX_VARIANT_tune-mips32el = "mips32el"
+PACKAGE_EXTRA_ARCHS_tune-mips32el = "mipsel mips32el"
+
 TUNE_FEATURES_tune-mips32-nf = "${TUNE_FEATURES_tune-mips-nf} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32-nf = "mips-nf"
-TUNE_FEATURES_tune-mips32el-nf = "${TUNE_FEATURES_tune-mipsel-nf} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32el-nf = "mipsel-nf"
+MIPSPKGSFX_VARIANT_tune-mips32-nf = "mips32"
+PACKAGE_EXTRA_ARCHS_tune-mips32-nf = "mips-nf mips32-nf"
 
+TUNE_FEATURES_tune-mips32el-nf = "${TUNE_FEATURES_tune-mipsel-nf} mips32"
+MIPSPKGSFX_VARIANT_tune-mips32el-nf = "mips32el"
+PACKAGE_EXTRA_ARCHS_tune-mips32el-nf = "mipsel-nf mips32el-nf"