Re: config & endianness
"Garrett D'Amore" <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.evbmips,gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
Izumi Tsutsui wrote: > In article <[email protected]> > [email protected] 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. > Maybe in the Makefiles? I didn't realize that config doesn't know about this. I use build.sh myself. > >> 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/Makefile.inc? > That sounds like very helpful advice. I'll look into it. Thank-you. > >> 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?). > Yeah, I've looked at the i386 rules. They are ugly, ugly, ugly. I have built a kernel with ath support on MIPS before. It was not pleasant figuring out how to do it "properly". But I think the .if ${MACHINE_ARCH} logic you suggested above will help with this. I hope so anyway. Stay tuned, because I *will* be adding ath support for the Atheros AR5312 kernel configs when I add them. (They have one or two onboard "ath" devices.) -- Garrett > --- > Izumi Tsutsui > -- Garrett D'Amore, Principal Software Engineer Tadpole Computer / Computing Technologies Division, General Dynamics C4 Systems http://www.tadpolecomputer.com/ Phone: 951 325-2134 Fax: 951 325-2191