Subject: Re: config & endianness
To: None <>
From: Izumi Tsutsui <>
List: tech-kern
Date: 03/07/2006 02:29:52
In article <> wrote:

> 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

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.

>     2) the master releng Makefiles/scripts only bother to build the
> kernels that make sense for a particular endianness

For release kernel sets, maybe you could add
.if ${MACHINE_ARCH} == "mipsel" (or something)
in etc/etc.evbmips/

> I also have another question relating to the atheros HAL and endianness
> in Makefiles.  Is there a way to detect in the kernel Makefiles what
> endianness is being used and use different dependencies based on that? 
> (I.e. pick either the big or the little endian HAL properly.)

According to i386/conf/files.i386, we have to specify the object
file explicitly, but no mips ports have the entry in -current (yet?).
Izumi Tsutsui