Mach and Darwin binary compatiblity for NetBSD/powerpc and NetBSD/i386.

Quick status summary

This project is dead due to the lack of interest from users. It may resurect some day. Here is the last status:

COMPAT_DARWIN has been updated to deal with MacOS X.3 binaries. XDarwin (The X Window server for MacOS X) from XFree86 4.4 was able to run fully functionnal on NetBSD with MacOS X.3 libraries. (see previous screenshot [46 kB] of XDarwin from XFree86 4.3 and MacOS X.2 libraries) Display, mouse and keyboard operations work through our IOKit emulation. Running XDarwin has no interest in itself, but it ensures that our IOKit driver emulations are good enough to be used by MacOS X's native display server.

We were previously targeting MacOS X.2's WindowServer. It seems that program disapeared in X.3, and was replaced by QuartzDisplay. New goal is to run QuartzDisplay. (For reference, the last trace for WindowServer running on NetBSD)

What is it?

This is the status page for COMPAT_MACH and COMPAT_DARWIN options implementation in NetBSD.

Darwin is Apple's MacOS X core. Once we will have a fully functionnal Darwin binary compatibility on NetBSD/powerpc (if that happens some day), we will just have to grab MacOS X libraries to run any MacOS X program, just like NetBSD is now able to run binaries from Linux, FreeBSD, Solaris, and many other OSes.

Remember this is binary compatibility, not emulation: programs run at full speed, but only on a NetBSD machine with the same CPU the program was designed for. Binary compatiblity does not enable running Linux/i386 binaries on NetBSD/powerpc, for instance. Another important point is that binary compatibility is only about emulating the target OS kernel bahviour. In order to run some programs, the target OS libraries are required, and therefore the user must purchase a license for the target OS.

More information on NetBSD binary compatiblity options

Darwin is based on the Mach microkernel, so we have to emulate Mach as well, therfore the COMPAT_MACH option. Life is hard.

What works?

On NetBSD/i386: nothing. On NetBSD/powerpc, most UNIX binaries, such as ls, sh, or vi will work.

Programs using the X Window display, such as Matlab, are likely to work, though nothing has been tested.

Programs using the Quartz display system will not work for now (Quartz is the native display system in MacOS X. It is similar to X Window, though incompatible with it). What we need to support them is either running MacOS X's native Quartz display server, WindowServer, or writting a Quartz to X11 bridge. For now we are working on the first solution.

Here is what have been implemented so far:

Here is what is in the TODO list:

Who is insane enough to do that?

Christos Zoulas did the initial work on COMPAT_MACH on NetBSD/i386 and managed to integrate Mach-O binaries support into NetBSD.

James Whitwell did the darwin_lib package for pkgsrc.

Emmanuel Dreyfus did what have not been done by Christos and Jimmy.

Is there any hope to get this working one day?

No idea.

Nice project, what can I do to help?

A simple thing that would help a lot would be to write some test suite to check for an accurate Mach subsystems behaviour. If you want to help hacking on the NetBSD kernel to enhance COMPAT_MACH and COMPAT_DARWIN, you are welcome too, of course.

Emmanuel Dreyfus, 2006/06/20

Valid HTML 4.01!