Subject: Re: config & endianness
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Quentin Garnier <cube@cubidou.net>
List: port-evbmips
Date: 03/06/2006 17:55:33
--VP5QyDw/Nx1A2h9y
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 06, 2006 at 08:46:03AM -0800, Garrett D'Amore wrote:
> Quentin Garnier wrote:
> > On Mon, Mar 06, 2006 at 08:27:36AM -0800, Garrett D'Amore wrote:
> >  =20
> >> Hmm.... we now have some kernel configs in evbmips that do not make
> >> sense for either big or little endian.
> >>
> >>     * OMSAL and MTX-1 are always little endian
> >>     * forthcoming ATHEROS AR531x based systems will always be big endi=
an
> >>     * DBAU1XXX can be either endian (jumper selectable)
> >>     * Malta/PB1XXX?  probably also jumper selectable
> >>
> >> Is there a way to establish stuff in config so that:
> >>
> >>     1) an attempt to build a kernel with endianness that doesn't make
> >> sense fails in config(8), AND
> >>    =20
> >
> > I don't really understand that.  How is config(1) supposed to know what
> > endianness it is supposed to build for?  You want to flag it when it is
> > compiled?  Currently, config(1) is arch-agnostic, i.e. you can use the
> > same binary for any arch.
> >
> >  =20
> I'm not talking about config(1) itself, rather I'm talking about having
> the machinery in the kernel configuration files for this.  So if you try
> to build an evbmips-eb kernel using an MTX-1 config, it should fail.=20
> Because this architecture (MTX-1) can *only* run little endian.

But at which point do you know you're building an evbmips-eb kernel?
If you want the information in the configuration files to conflict, it
has to conflict with *something*.

At the moment the user (or build.sh) does:

$ config MYMIPSBOARD

how is it supposed to know whether the rest of the toolchain uses the
same endianness?

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--VP5QyDw/Nx1A2h9y
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBRAxphdgoQloHrPnoAQJfsQf/fsvza+mPrlLP70Cl8Ixg/wsRzBwKZJ5K
ScCtygFrorsN+L/EmaOqj2920MYu2f8no4gGsBxNY4IIEuh35q5n+WVwMZiEakK1
IZTSPE36EjdAuMpvmqUGrgEopi0AxoBduR3O3kZJrv/Md9ZfYw7ljBpjrIvOGy5x
yynNGOHWN3V2To1/sbNwNlZJMdAdQau0gSRgQ6ktT4RonWSw3OS3GVk0ma0JgGx1
PEG83OZ05M+nN63HIjBozDWpfdE785WeOESGcBtfyVG9A2B5C4IkbSJmROJZES09
Yn8Jaf0fOsC9EwtbI8s6IlIZCQlDPY67sLhMKuVkIbwspVsCDq4keA==
=bxTM
-----END PGP SIGNATURE-----

--VP5QyDw/Nx1A2h9y--