Subject: Re: Miniroot (was Re: Centris 650?)
To: Henry B. Hotz <henry.b.hotz@jpl.nasa.gov>
From: Dave Huang <khym@bga.com>
List: port-mac68k
Date: 09/16/1996 15:58:49
On Mon, 16 Sep 1996, Henry B. Hotz wrote:
> This sounds a bit like a Gnu development tool problem then.  Shouldn't the
> same source code produce the same target code regardless of where it is
> run?  No the miniroot image includes a mini filesystem.  *That's* where the
> problem is right?

The miniroot image basically _is_ a filesystem. It's just a binary dump 
of a filesystem, stored in a file. If NetBSD/mac supported floppies, you 
could dd the file onto the floppy and mount the floppy.

I think it's more of a cross-compiling problem though. For example,
suppose you write a little C program that uses fwrite to write a long int
containing 0x12345678 to a file. If you compile/run this on a little
endian machine, the file will contain the bytes 78 56 34 12. If you then
move that file to a big endian machine, then try to read it back into a
long via fread, the long will contain 0x78563412. Not what you wanted :)

So, in the same way, newfs on little endian machine creates a filesystem 
that has stuff stored in the little endian way, and when you move that to 
a big endian machine, it gets read in backwards and things don't work. 
There's been talk about making little endian systems support big endian 
filesystems, and vice versa, but I don't think any work has started on it 
yet.

BTW, I tried out the miniroot that Steve Allen put on his site, and it 
works great :) Neat to be able to ls and cat on my Mac :)
-- 
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 20 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++