Subject: Re: building a netbootable kernel
To: Rafal Boni <rafal.boni@eDial.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-sgimips
Date: 03/13/2002 11:25:19
On Tue, Mar 12, 2002 at 06:44:52PM -0500, Rafal Boni wrote:
> If you look in the early archives of port-sgimips, I mailed around sources
> to a modified elf2ecoff which seems to DTRT; I don't have the sources to
> the in-tree elf2ecoff in front of me, but certainly an SGI won't boot LE
> kernels (even if the prom tells you it must be one of MIPSEL or MIPSEB,
> I belive it really *does* need to be MIPSEB).

yea, this patch to elf2ecoff is enouth for me to get a bootable
kernel:

Index: elf2ecoff.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/elf2ecoff/elf2ecoff.c,v
retrieving revision 1.14
diff -u -r1.14 elf2ecoff.c
--- elf2ecoff.c	2000/03/13 23:22:51	1.14
+++ elf2ecoff.c	2002/03/13 10:20:49
@@ -288,7 +288,7 @@
 	memset(&ep.a.cprmask, 0, sizeof ep.a.cprmask);
 	ep.a.gp_value = 0;	/* unused. */
 
-	ep.f.f_magic = ECOFF_MAGIC_MIPSEL;
+	ep.f.f_magic = ECOFF_MAGIC_MIPSEB;
 	ep.f.f_nscns = 6;
 	ep.f.f_timdat = 0;	/* bogus */
 	ep.f.f_symptr = 0;

should I try to get elf2ecoff in a state where it works for both sgimips and
pmax (use the same byte order as in the ELF header), or is elf2ecoff
already dead, although objcopy isn't a working remplacement yet ?

Sigh, all this to discover that the internal disk of my new toy is dead ...

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--