Subject: Success re: PowerMac 4400/200 install trouble
To: None <port-macppc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-macppc
Date: 12/30/2000 01:53:35
Writing about trouble isntalling on a PowerMac 4400/200, I wrote

> I'm now trying to build a bootable zipdisk by making the filesystem
> on a SPARC (also big-endian) and using the macppc installboot to
> install bootblocks.  I don't know how easy this will be, but I'm not
> sure what else to try at this point.

Well, the only difficult parts were (a) I had to patch the machine type
in bootxx to get a SPARC-compiled installboot to nlist() it, (b)
installboot.c overwrites its stack by reading 512 bytes into a 256-byte
structure, and (c) it's not clear what the correct thing to use as the
second-stage boot program is; there doesn't seem to be a macppc
installboot manpage.  (Indeed, there isn't even any
/usr/src/share/man/man8/man8.macppc.)

(a) was fairly straightforward; the macppc and sparc are close enough
for it to Just Work.

(b) was a bit disturbing; installboot coredumped.  gdb showed me that
the stack was being trashed.  From there it was a straightforward
debugging job.

(c) was nasty.  At first I copied ofwboot.elf to the zipdisk root and
passed that to installboot.  The resulting disk gave me

 ok
0 > boot scsi/sd@5:0 -as DEFAULT CATCH!, code=FFF00700 at   %SRR0: 006C0000   %SRR1: 00083070 
 ok
0 > 

The 006C0000 looked familiar - it's the DEFAULT_ENTRY figure in
installboot.c - so on a hunch, I checked its contents ("6c0000 @ .")
and it was 7F454C46, which is the ELF header magic number.  With that
hint, I used ofwboot instead of ofwboot.elf (from the macppc /usr/mdec)
and I got the kernel to load.

Whew.  I was beginning to wonder.  Okay, now to "bring it into the
fold", as it were, to make it one of the house machines....

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B