Subject: Re: SV: Re: MPC860 or the mpc850de
To: None <tech-embed@netbsd.org>
From: David Querbach <querbach@realtime.bc.ca>
List: tech-embed
Date: 02/21/2000 10:48:41
Roger:

> Well! Lets go with sharing.  :-)

Sounds good!
 
> We planed too use a Mac6100 to handle the Cross compiler env.
> (we got that machine for free, low budget 5000 for Dev board, 50000 for 
> 10 prototyps)
> The problem we faced was:
> No Monitor for the Mac ie. doesn't start.
> We don't now what typ of memory model the mac use, like Big-endian ocg 
> PPC-endian or Little-endian.

I'll be using big-endian, since the PowerPC architechture supports it
the best.

> (endian-ness is a problem for us).

Endianness is a problem for everyone.  :)

> Netbsd can't run on that old mac, so we where going to use MkLinux.

We are using NetBSD on i386 as our host platform, and an MBX821 development
board from Motorola as the target.  Even though we usually run i386 Linux, I
decided it would probably be easier to build a new NetBSD system using an
existing NetBSD system.
 
> So, to get going we dug up some old A3000 with 2*1 GB HD.
> Benefit: well we have all doc on A3000, it use Big-endian model the 
> same as we are going to use and we 
> 	can run Netbsd
> Problem: No Network card (useing Serial), Low memory, slow. Take like 
> 2-6 to compile GCC and BINUTILS
> We use a Win95 to edit the files on the A3000 and to burn Flash proms.
> BUT is do what you tell it to do. 
> I will read about the MPC821, so we can discuss general porting of the 
> Netbsd.

I have studied the data books on the MPC821/860.  The memory management
hardware is simpler than the 600 series, but Motorola made an effort to make
it compatible.
 
> My previous crosscompiler env was gcc 2.7.2.
> Have you find any problem to make a cross compiler with gcc2.9.1-2 ?
> If it's all goes well i will have a working env to night.

I have not tried gcc-2.9x.  The NetBSD "cross" packages use EGCS-1.1.1,
which we nearly have working as a cross-complier from i386-aout to i386-elf.
 
> Have you found any more Doc or howto than this:
> http://tofu.alt.net/~lk/291.paper/291.paper.html

I followed these links:

	http://www.netbsd.org/Documentation/
	http://www.netbsd.org/Documentation/kernel/
	http://www.netbsd.org/Documentation/kernel/programming.html

You might also try www.openbsd.org.

> Are there any DOC that descripes what functions that should reside in:
> locore.s
> pmap.c
> machdep.c
> ?

Other than 291.paper.html, I've been looking at the other ports source code
for examples.

> Have you any experience with psim (ppc simulator) ?
> I will try it out any way.

Not yet.
 
> Have you pinked a starting point?
> I will pick Macppc i belive and with alot of looking on the Amiga port.
> I'm new too PPC asm, but not for long.. ;-)

I am proceeding as follows:

  1. Build native NetBSD-1.4.1 system, host=i386-aout, target=1386-aout
     -- done
  2. Build native NetBSD-current system, host=i386-aout, target=i386-elf
     -- in progress
  3. Build cross NetBSD-current system, host=i386-aout, target=ofppc
     -- still to do
  4. Copy ofppc to a new directory, say "m8xxppc", and begin modifying boot
     sequence, memory management, and I/O drivers.

I think that the ofppc port may be simpler, thus requiring less
modification.  I could be wrong here.
 
> /Roger Strandberg
> Hansson & Strandberg Communication

Regards,

David Querbach,
Real-Time Systems Inc.

P.S. to cc'd recipients:  Some of you asked to be copied on MPC821/860 work. 
I propose posting my responses to tech-embed from now on, in order to keep
the conversation visible to anyone new who might drop by, rather than
copying you directly.  Please let me know if you still want copies sent
directly to you.