Subject: Re: config & endianness
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 03/06/2006 18:55:16
--eYwrjeFR5b5I2bsF
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:
>=20
> Izumi Tsutsui wrote:
> > In article <440C62F8.8000808@tadpole.com>
> > garrett_damore@tadpole.com 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 build.sh myself.
And build.sh 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
build.sh 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/Makefile.inc?
> > =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.
--=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.
--eYwrjeFR5b5I2bsF
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBRAx3hNgoQloHrPnoAQL88gf+LV3RQKrQBaw0yZs7gBSHURfQPSLKNh4c
LMpri/Ik90rJn1z7QuEJqo/MA7JIYPFIQSy6rXSK/1aUCKgCYIwwaIQimRr/8NU/
BL+7s7EDjvHTE+WspAYQ0ngq8HEweV2ta7odKrIPnUvUcrBQOVhRufsLsKCEUJDn
CTAHpcq8n9cToBg1JvsU7MD6exHh2vvbzyRds41QcLuJ+mfYeRKv7K6UGX+gjXip
DMSshEMIjqHTPaH2B0V1y9pO0Dlripy5YOy6sEPhX9Jt1UBQiEmeE8FKRQzSLcS7
LVZRq64XSmbvcjguGRSzAf6J4+tpUuRFHtQ23CknIHVOROyVWDbHOQ==
=T0PT
-----END PGP SIGNATURE-----
--eYwrjeFR5b5I2bsF--