Subject: Re: cross-compiling a macppc kernel on an alpha
To: Michael G. Schabert <mikeride@mac.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 05/13/2003 17:00:55
On Sat, 10 May 2003, Michael G. Schabert wrote:

> 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:

Something is ill with gcc cross-compiling on alpha. I'm not sure what it
is, but it just doesn't seem to work.

> ./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.

Try nfs root for a bit, then let the macppc compile its own kernel. I know
that's not what you want to know, but I'm not sure how to fix things w/
the alpha.

Take care,

Bill