Subject: Re: config & endianness
To: Garrett D'Amore <>
From: Quentin Garnier <>
List: tech-kern
Date: 03/06/2006 18:55:16
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 06, 2006 at 09:36:08AM -0800, Garrett D'Amore wrote:
> Izumi Tsutsui wrote:
> > In article <>
> > wrote:
> >
> >  =20
> >> 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
> >
> > config(1) doesn't care ${MACHINE_ARCH} at all, and
> > AFAIK the binary format is determined by your toolchain
> > though improper toolchain might cause build errors.
> >
> > We could add some assertion in the board specific source files,
> > but I don't know if there is some similar way for config(1) to
> > generate such assertions.
> >  =20
> Maybe in the Makefiles?   I didn't realize that config doesn't know
> about this.  I use myself.

And uses config, of course.  That doesn't mean config(1) must
not know about this.  As a part of the toolchain, I don't see any
compelling reason not to allow it to know about the arch it is supposed
to work for.  I'd simply use a flag for that;  people running config(1)
directly (even if it is a "cross-compile" version, i.e. the result of tools) usually know enough about what they do.

> >>     2) the master releng Makefiles/scripts only bother to build the
> >> kernels that make sense for a particular endianness
> >>    =20
> >
> > For release kernel sets, maybe you could add
> > .if ${MACHINE_ARCH} =3D=3D "mipsel" (or something)
> > in etc/etc.evbmips/
> >  =20
> That sounds like very helpful advice.  I'll look into it.  Thank-you.

And this is the best anyway.  Making config(1) bail as part of the
normal build process doesn't sound too good :-)  But driving away users
from building inoperable kernels is probably useful.

I don't seem to be not using many double-negations.

Quentin Garnier - -
"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.

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

Version: GnuPG v1.2.6 (NetBSD)