Subject: Re: Performa 6200 upgrade path query
To: David A. Gatwood <dgatwood@deepspace.mklinux.org>
From: Roger Brown <rogerhb@xtra.co.nz>
List: port-macppc
Date: 06/22/2000 19:37:01
I am willing to try and recompile the mklinux kernel on my 586/Slackware
system. See how far we get...

I have had a look at the GNU website and how to use GCC for cross
compilation.

The steps seem to be...

build gcc as a cross compiler for 'target'

build binutils, gas(as) and ld/collect2 for use with 'target'

In order to build GCC I need to know the exact 'target' string to use.

The GCC page mentions 'powerpc-*-linux-gnu*' and '*-ibm-aix*'

I reckon that something like

 'powerpc-apple-linux-gnulibc1'

would be the string, can you confirm this?

What format is the kernel built as, is it COFF or ELF?

(Out of interest, MPW PPCLink will generate XCOFF, would it be totally mad
to build the kernel with MPW MrC?)

Also, it says that I will need various *.o and *.a from the target system
for the C libraries.

Does the kernel actually contain it's own version of these? 

Also, header files, I presume I will need the mklinux set of /usr/include
equivalents, or does the compile of the kernel depend only on kernel
provided headers?

Is the kernel a relocateable object or does it have to start at a specific
address?

The build options will certainly have to include '-nostdlib' and
'-nostdinc'.

Does 'mklinux' use a three stage boot?

1.  MacOS
2.  Mach Kernel
3.  Linux Kernel

Or is the Linux kernel linked directly with Mach?

How would I boot the thing? What booter should I use, and what filesystem
does the kernel image live on?

I might try building something for NetBSD/mac68k from the Linux box
first.....

Many thanks,

Roger

----------
>From: "David A. Gatwood" <dgatwood@deepspace.mklinux.org>
>To: Roger Brown <rogerhb@xtra.co.nz>
>Cc: port-macppc@netbsd.org
>Subject: Re: Performa 6200 upgrade path query
>Date: Thu, Jun 22, 2000, 7:21 am
>

>On Thu, 22 Jun 2000, Roger Brown wrote:
>
>> Apart from the Performa 6200 running 8.1, I have a 586 running Slackware
>> 3.3 and a MacIIvx running NetBSD 1.4.2. 
>
>Sounds a little like my dorm room, only substitute a G4 for the 586 and a
>Q800 for the IIvx.
>
>
>> For the 6200 I have an external 500Mb SCSI drive which might be useful, as
>> well as internal 500Mb IDE.
>
>Well, I can tell you right now that the IDE will work sooner than SCSI. 
>IDE on these machines is so simple, that it takes all of two lines of code
>to support a new machine.  SCSI... well, the Performas use the same SCSI
>chip as the later machines (thank heavens), but they do so without DMA,
>which is contrary to the MkLinux driver's expetations.  I've hacked the
>driver where I think it might work sans-DMA< but I would expect it to put
>up a fight before it starts working.  ;-)
>
>
>> Considering mklinux is a linux, would I be able to do cross compiles on
>> the 586? 
>
>In theory, but I'm not sure how.  The work needs to be done in the Mach
>Kernel, which is rather a pain in the backside to build without
>cross-compiling.  :-/
>
>
>> If so, what do I have to do to help?
>
>Once I get the thing to start booting, I can think of a lot of things.
>Right now, it's a matter of fixing the BAT code, and I know approximately
>when that code broke, so... a good task for someone would be to just pull
>the current source tree from CVS and then pull revision 1.1.1.1 and diff
>the two, or at least the early startup files.
>
>
>> I am very happy programming in C on UNIXes, know 68000 assembler, no PPC.
>> Knew to kernel programming, but I have done some device driver work on other
>> platforms.
>> 
>> Err, what's 'BAT'?
>
>Block address translation.  Used for mapping large regions of memory.
>There are only a handful on most processors.  PPC has... 4 for
>instructions, 4 for data, generally.
>
>
>David
>
>---------------------------------------------------------------------
>A brief Haiku:
>
>Microsoft is bad.
>It seems secure at first glance.
>Then you read your mail.
>
>