免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2610 | 回复: 0
打印 上一主题 下一主题

FreeBSD VS OpenDarwin [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-11-22 10:16 |只看该作者 |倒序浏览
>; 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).
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP