Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2003 18:30:59 -0600
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        freebsd-mips@FreeBSD.org
Subject:   Building MIPS kernels; Misc. notes/info on other things.
Message-ID:  <20030306183059.A18580@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Since there's a lot of confusion from people building with a tree from P4,
here's more or less the steps:

	1. set TARGET_ARCH to mips, TARGET to sgimips, and do buildworld
	2. if it fails for something sys/boot related (as it will for the
	   time being), mkdir sys/boot/sgimips
	3. buildworld (it should break after step 4: building libraries,
	   anything else is a bug)
	4. buildkernel

For all of these you'll need MAKEOBJDIRPREFIX set appropriately, and
if you like, a shared DESTDIR.  Using whatever things default to should
be fine, unless your default is /usr/obj and you don't want things
there :)

-From within the kernel build directory, ../../HOST_MACHINE_ARCH/usr/bin
contains most of the tools, if you need to use mips objdump or whatever.
For me, HOST_MACHINE_ARCH is i386, for example.  That's not a real
variable, just me trying to codify this, btw.

Note that to try to be compatible with NetBSD in a lot of important ways,
even though we don't support !MIP3_PLUS of course, we default (on sgimips)
to using the O2 link address.  Uncomment the INDY line in GENERIC or make
your own kernel config and use that, to use something better for IP22 and
such.  Note that the link addresses include space for symmon, not the
production link address.  AFAICT this isn't an issue right now.

We link 32-bit BE elf, this is kinda wrong.  We want to compile for ELF64
and then at the link step make it 32 bits, and then (possibly) do elf2ecoff
I think.  Linux does this as far as I can tell, too.  NetBSD doesn't really
care about 64-bitness as far as I know.  Note that for now if you need an
ecoff kernel, you need to use elf2ecoff of some sort.  In the future, we will
have that in the build tools for FreeBSD.  However, around that time, we will
probably be using the FreeBSD loader, and that will probably be ECOFF, and
load ELF64 binaries.  One thing I am trying to decide about for elf2ecoff is
whether to put ECOFF headers and such in our system tree, or to just put them
with elf2ecoff.  I am leaning to the latter, as I don't really want to support
ECOFF binaries in userland, either.

I'd like to hear any feedback or problems with the build process, as I plan
to do a lot of stuff with this next week; picking up a bunch of my old SGI
stuff and bringing it back home with me, and going to try to sort out a good
ARC loader and so on.

Thanx,
juli [your humble narrator].
-- 
juli mallett. email: jmallett@freebsd.org; aim: bsdflata; efnet: juli;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mips" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030306183059.A18580>