[Mono-list] Mono port to other OS
Thomas Krause
Forum.Thomas.Krause at gmx.de
Tue Aug 9 18:28:09 EDT 2005
Thank you very much,
I'm talking about x86 architecture, so that should not be the problem.
The os I was referring to is my own little project. It is basically an OS
that is completely based on .NET (except the kernel itself of course). You
could call it Mono OS.
This architecture makes some things very easy. For example I don't need to
implement context switching (kernel mode / user mode), because direct memory
access will never occur in the CIL, but only in the jitted code, which (as
long as the jitter works correctly) will not corrupt any kernel memory.
The current status of the OS is:
- Full Protected Mode (32 Bit)
- Basic I/O functions working (display, input, hard disk)
- Basic Memory Manager working (No real paging yet)
- Threads/Scheduling are currently in work
I do not intend to be POSIX compatible in any way. Libc is partly
implemented already, but sometimes with different names / parameters.
Are the libc-calls wrapped through the I/O layer or are they directly used?
Are these the only dependencies to build a basic mono runtime (libc and I/O
layer) or is there anything else? (I assume that some parts of the framework
have other dependencies (System.Drawing, System.Data, ...), but for the
beginning I should not need these).
Thanks,
Thomas Krause
-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Paolo Molaro
Sent: Tuesday, August 09, 2005 7:03 PM
To: mono-list at lists.ximian.com
Subject: Re: [Mono-list] Mono port to other OS
On 08/09/05 Thomas Krause wrote:
> Assuming I would want to port Mono to another OS platform, what would I
need
> to do / implement exactly?
Depends which OS you're talking about and whether the jit already works
on the same kind of cpu.
> I know that the SSCLI (Rotor) from Microsoft has a PAL (Platform Adaption
> Layer), which is basically a set of API functions that you need to
implement
> to port it to another OS, does Mono has something similar?
Yes, it's called io-layer and it's in the mono/io-layer directory in
the mono svn module.
When porting mono, two things are important:
*) if the jit has been ported to the wanted cpu
*) if the os supports a correct implementation of POSIX/pthreads
If both conditions are true, you'll likely need only small tweaks to the
configure files and maybe the signal handling mechanism, this means just
a few days of work.
If the jit has not been ported to the cpu, the effort could require
from 2 to 6 months, depending on the weirdnesses of the instruction set.
If the OS doesn't support pthreads, you will need to implement the
io-layer interfaces (basically the small thread-related subset of the
win32 API).
If the OS doesn't support POSIX and the standard libc calls, you'll
likely have to make changes in many places.
> As you see I'm new to the Mono source code and so I don't have a good
> overview about it yet. Is there something like an overview for developers,
> where I can see the general structure of the project, the purposes of the
> different source files, etc.?
The toplevel README file in the mono module has the directory structure
explained. The docs/ directory contains some files that may be useful,
too.
> Or is there a good book about Mono that covers
> the internals?
Nobody had the time to write it yet: it would be a very worthwhile
project.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
_______________________________________________
Mono-list maillist - Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list