linux-mips-fnet
[Top] [All Lists]

Re: Linux/MIPS on SimOS

To: bugnion@cs.stanford.edu
Subject: Re: Linux/MIPS on SimOS
From: Ralf Baechle <ralf@Julia.DE>
Date: Sat, 14 Dec 1996 04:08:21 +0100 (MET)
Cc: linux-mips@fnet.fr
In-reply-to: <199612132331.PAA20676@alliant> from "Edouard Bugnion" at Dec 14, 96 00:51:11 am
Hello,

> At Stanford, we developed a complete machine simulator called SimOS
> (http://www-flash.stanford.edu/SimOS) which simulates the hardware of a
> MIPS-based uniprocessor and multiprocessor in enough detail to boot
> an essentially unmodified version of IRIX, SGI's commercial OS. 
> SimOS has been released publicly a couple of months ago. 
> 
> We are in the process of porting Linux/MIPS to SimOS. The motivation
> is that we will then be able to release a free OS in source form to
> the research community along with the sources of SimOS. 
> 
> Our experience with IRIX is that the porting effort is pretty
> simple. Basically, we add device drivers that are compatible with the 
> devices modelled by SimOS for disks, tty, ethernet,... 
> 
> We have started our porting effort, starting from your source
> base. Our first configuration will be targeting:
> 
>   -the R4x00 processor
>   -running in 32-bit mode (-mips2)

You should have choosen mips3.  The mips2 stuff is intended to support the
R6000/R6000A CPUs which are very rare.

>   -big endian. 

All systems supported in my source tree are little endian.

> In the future, we will be looking at 64 bit support.

Me too :-)  The binutils support for 64 bit MIPS binaries is still very
buggy.  Someone is working on that problem currently.

> We have a few questions:

> (1) what is the state of Linux/MIPS on this configuration. For example,
>     we had problems compiling for the mips2 version as the r4x00.S file
>     was missing (the file that does the tlb handling). Does this mean
>     that no one has actually run in this mode?

You should have choosen mips3.  As already said above the mips2 stuff is
intended for the R6000/R6000A CPUs.

> (2) Our version was downloaded from the web a few weeks ago. Is there a
>     more recent version that we should be aware of? 

On my disk at home.  Much faster, more reliable and cleaner and to be
released rsn (TM).

> (3) Since we are running big-endian, we will need to recompile all
>     executables. Do you have a complete source tree of the basic
>     user-level programs that run on Linux. Would you aggree to give us
>     this source tree?

Of course.  Most of the tools I'm currently running a vanilla GNU
software packages with no changes.  For others like GCC and the binutils
changes are required.  These diff files are available on ftp.fnet.fr.

> (4) We will also need to build the image of the root disk (and other
>     filesystems) for one of the file systems supported by Linux. Do  
>     you have a tool that makes a filesystem? Does this tool generate
>     empty filesystems, or can it also build a filesystem and insert 
>     files in the hierarchy? Would you aggree to give this tool in
>     source form to us?  We will most likely have to modify it slightly
>     to target a file.

You can also use Linux's fsck and mkfs tools for the ext2 filesystem on
disk images:

kernel->~/ip> dd if=/dev/zero of=fs bs=1k count=2048
2048+0 records in
2048+0 records out
kernel->~/ip> ll fs
-rw-r--r--   1 ralf     users     2097152 Dec 14 03:18 fs
kernel->~/ip> /sbin/mke2fs fs 
mke2fs 1.06, 7-Oct-96 for EXT2 FS 0.5b, 95/08/09
fs is not a block special device.
Proceed anyway? (y,n) y
Linux ext2 filesystem format
Filesystem label=
512 inodes, 2048 blocks
102 blocks (4.98%) reserved for the super user
First data block=1
Block size=1024 (log=0)
Fragment size=1024 (log=0)
1 block group
8192 blocks per group, 8192 fragments per group
512 inodes per group

Writing inode tables: done     
Writing superblocks and filesystem accounting information: done
kernel->~/ip> /sbin/e2fsck -f fs 
e2fsck 1.06, 7-Oct-96 for EXT2 FS 0.5b, 95/08/09
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
fs: 11/512 files (0.0% non-contiguous), 82/2048 blocks
kernel->~/ip> 

As you see there is no problem at all - mke2fs just asks stupid questions.
Unfortunately there is no set of mtool style tools available for ext2fs
filesystems and running on UNIX.  You might write these based on the
libraries included with the ext2 utility package.

It is however far preferable to fix this problem the other way.  Get yourself
a Sparc (big endian) Linux source tree and look at the way how they
implemented to handle ext2fs filesystems with little endian byteorder,
then implement that for Linux/MIPS.  You can then create filesystem
ext2 images on a Intel Linux machine and simply use them.

My two MIPS machines are little endian, so be prepared to find byte order
bugs ...

> Could you please add the follwing e-mails to the developers mailing
> list: {bugnion,herrod,seamans}@cs.stanford.edu

Ok.

> Please let us know if you are interested in using SimOS too. We would
> be glad to help you setup with it. Our experience is that it is a
> great tool to develop and evaluate OSes.

Nice of you to borrow me an appropriate machine ;-)

> Merci d'avance. -Edouard Bugnion
> 
> PS: Simple curiosite: dans quel cadre se fait le development de

Le cadre, c'est moi :-(

Ok, French is a nice language and so I'll stick with English ...

> Linux-MIPS. Votre page http://lean.fnet.fr ne contient pas de links 
> exterieurs, ni de links vers vos page personelles.

Due to the current degree of information abuse I don't have a home page
and I won't build myself one.  Well, maybe on the day when all the
moneyworld.com type people are in Sing-sing ...

  Ralf

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Linux/MIPS on SimOS, Ralf Baechle <=