Re: FreeBSD Vs OpenDarwin

Justin Walker <[email protected]>
Newsgroups gmane.os.opendarwin.general
Message-ID <[email protected]>
On Oct 4, 2004, at 16:40, Balakumar Velmurugan wrote:

> Hi All,
>
>          I am new to Darwin/Mac world however I am very familiar with
> FreeBSD. I have been working on a FreeBSD project and now I would like 
> to
> explore the possibilities of doing it on OpenDarwin. I would 
> appreciate any
> comments you may have on how both the platforms compare against on 
> certain
> characteristics.

Please use plain text when posting to mailing lists.  'OpenDarwin' is a 
project that builds on Darwin, which is the underpinnings for Mac OS X, 
and an of OS in its own right.

[snip]
> My questions are really,
> 1.	How different is the OpenDarwin Kernel from the FreeBSD 5.x.x kernel
> code ?. I know there are some apple code in Darwin kernel which makes 
> me
> uncomfortable because of my lack of familiarity with it.

The code in the Darwin kernel is in several "components":
   - BSD: much of the kernel functionality (system calls,
          networking, file systems) is here
   - Mach: derived from Mach 3.x, but integrated with the
           rest of the OS like Mach 2.x; this component
           handles tasks, threads, memory management, and
           messaging (some, but not all, of the communication
           within Mac OS X/Darwin is done with Mach
           messages)
   - IOKit: the device driver/device support component.  An
           object-oriented environment, based more or less
           on embedded C++

There are some other, more minor pieces (platform expert, libsa, 
libkern), but the above three make up the lion's share of the kernel.  
In addition to the kernel, functionality is provided by loadable 
extensions (KEXTs); these include networking components (NKEs), file 
system plugins, and device components (drivers, family support, ...).

If you know FreeBSD 4.x, you may be able to recognize most of the BSD 
part.  The networking component is changed in some significant ways, at 
different layers.  The IP stack is more or less the same, but the area 
where stacks meet devices is much different.  I don't know FreeBSD 5.x 
well enough to comment on how it matches Darwin.

> 2.	How easy or painful it is to port FreeBSD and Linux applications to
> OpenDarwin ?

There are two fairly significant community efforts ongoing to port 
these apps to Mac OS X and Darwin: Darwinports (described on the 
opendarwin site); and Fink (fink.sf.net).  Some ports are harder than 
others :-}

If it's a straight BSD port of an app that doesn't make rash 
assumptions about the underlying system, the port should be simple.  If 
it's something like KDE/Gnome, god help you.  If it requires specific 
functionality that is only available on a specific version of a 
specific OS, it may cause you grief.

> 3.	How similar is the Darwin driver software model compared to FreeBSD
> ? Lets say I already have a FreeBSD graphics processor driver, how 
> easy or
> difficult to port to Darwin.?

Way different.  See Apple's developer site for introductory doc, and 
for source of Darwin drivers.  At one point, some enterprising souls 
managed to "wrap" some BSD drivers in IOKit clothing, but I don't know 
how successful that effort really was.

> 4.	How about the library support, for writing video/audio media and
> networking applications, in Darwin ?. Can I use the FreeBSD libs ?

See above caveats.  A number of people have developed these kind of 
apps for Darwin, but it really depends on the functionality (and APIs) 
you require.

Best bet: look at the darwin developer's site at Apple 
(http://developer.apple.com/darwin).

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large  *
Institute for General Semantics        |   If you're not confused,
                                        |   You're not paying attention
*--------------------------------------*-------------------------------*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.