Subject: cross-compiling a macppc kernel on an alpha
To: None <port-macppc@netbsd.org>
From: Michael G. Schabert <mikeride@mac.com>
List: port-macppc
Date: 05/10/2003 11:48:00
Hi there,
I'm having an issue while trying to cross-compile a -current kernel 
(May 3 sources) for port-macppc on my fairly-current (Mar 30) alpha. 
I have never cross-compiled NetBSD before. I first did:

./build.sh -m macppc -O /usr/obj -D /usr/destdir tools

to build toolchain. Then I did:

./build.sh -m macppc -O /usr/obj -D /usr/destdir kernel=GENERIC

and that failed. Finally, I've been paring down the GENERIC getting 
rid of most things in case it was barfing on one particular thing. 
Here's how it ends at the moment:

=====
/usr/obj/tools/tools.NetBSD-1.6Q-alpha/bin/powerpc--netbsd-gcc 
-msoft-float  -f
freestanding  -O2 -Wreturn-type -Werror -Wall -Wno-main -Wno-format-zero-length
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes 
-Wno-sign-compare -Wno-
uninitialized  -Dmacppc -I.  -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM
-DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT   -c /usr/src/sys/netinet/igmp.c
powerpc--netbsd-gcc: Internal compiler error: program cc1 got fatal signal 11
*** Error code 1

Stop.
nbmake: stopped in /usr/obj/sys/arch/macppc/compile/prez

ERROR: make all failed in /usr/obj/sys/arch/macppc/compile/prez
*** BUILD ABORTED ***
=====

The failure is always the same, just the file being worked on is 
changing as I change the config file.

The reason that I'm doing this is that I got a 7300 and want to set 
it up to dual-boot from a single hard drive. Of course, OF1.05 won't 
let me have bootable NetBSD (part0) and bootable MacOS at the same 
time, so I'm intending to use my alpha to netboot the ofwboot and 
kernel and have a local root. To do this, I need a kernel with 
hardcoded root at sd0a swap at sd0b. I have successfully set up the 
netboot environment and have used it to boot the installation kernel 
(releng 5/2/2003), and I can mount my sd0a on mnt when in the shell 
from the install kernel. So everything is in place except getting a 
kernel that knows to use the local root.

Any help greatly appreciated.

Mike
-- 
Bikers don't *DO* taglines.