Appeared as a significant change in NetBSD 3.0 (
Assuming you have set a default proper environment for compiling your kernel:
In the /usr/src/sys/arch/<your ARCH>/conf/<your CONFIG>
At least, you have to enable these options:
options COMPAT_DARWIN # Darwin binary compatibility (experimental)
options COMPAT_MACH # Mach compatibility, needed for COMPAT_DARWIN
options EXEC_MACHO # Mach-O binary support, needed for COMPAT_MACH
Optionnaly, uncomment the following:
#options DEBUG_DARWIN # COMPAT_DARWIN debugging
#options DEBUG_MACH # COMPAT_MACH debugging
After editing your configuration file, you can begin to build the kernel:
Problem: The build fails in
"These libraries are part of the Darwin compatibility option for
NetBSD/powerpc and NetBSD/i386.
The kernel options `EXEC_MACHO', `COMPAT_MACH' and `COMPAT_DARWIN'
must be in your kernel config file for this to work." from /usr/pkgsrc/emulators/darwin_lib/DESCR
make install clean
If the build fails, you will probably need to edit /usr/pkgsrc/emulators/darwin_lib/Makefile and remove the problematic (XFree86) missing rpm in DISTFILES variable.
No mach_init is present by default, and mach_init has been dropped...
sysctl -w emul.darwin.init.pid=$$ && exec /emul/darwin/sbin/mach_init
At the root of a mounted old darwin iso (ppc), populate the darwin userland shadow root:
scp -r bin sbin usr <NetBSD macppc host>:/emul/darwin
scp -r System/Library <NetBSD macppc host>:/emul/darwin/System
The process in `ps aux':
USER PID %CPU %MEM VSZ RSS TTY STAT STARTED TIME COMMAND
root 412 0.0 0.0 0 0 ttyE0 RW+ - 0:00.00 /emul/darwin/sbin/mach_init
root 421 0.0 0.0 0 0 ttyp0 RW+ - 0:00.00 ./usr/bin/uname -a
At this time, darwinppc-141, OpenDarwin6.6.2, darwin-701PPC and darwinx86-801 binaries has been tested without any success.
Note: It seems memory is not allocated, an the RW+ status seems curious.
Please, let us know if you have a solution.