1This is the darwin-support branch. It adds support for a subset of the mach APIs 2to enable FreeBSD to run some of the OSX daemons. 3 4It is currently only supported as a module to workaround the limited typeid space (15 bits) of 5dtrace. 6 7To enable booting launchd, add the following lines /boot/loader.conf: 8############################################################## 9### Darwin Kernel settings ######################################## 10############################################################## 11 12init_path="/sbin/launchd" 13mach_load="YES" 14 15 16 17If there are problems in mach that prevent the system from booting completely you 18can disable launchd by dropping to the loader prompt (3) and typing: 19set init_path=/sbin/init 20 21If you disable launchd you will need to start devd by hand 22 23Immediate issues: 24migcom is building during bootstrap but includes target headers - it needs to be 25refactored to not include any special headers and only use self-contained defines 26 27 28Unsupported OSX / Mach functionality: 29 - updating the audit token when setuid/setgid/ etc are called 30 - memory object creation (used in parts of libdispatch) 31 - voucher ports (used only by most recent parts of libdispatch) 32 - BSM audit functionality for mach sessions 33 34 35Missing mach features ordered by version of launchd by which they'll be supported: 36 37v1: 38Support: 39- MACH_SEND_NOTIFY 40 41kevent flags needed by (at least) libdispatch: 42- EVFILT_VM 43 - NOTE_VM_PRESSURE 44 - NOTE_VM_ERROR 45 46per-user & per-session launchds (xpc domain system in domain.defs) 47 - The audit session system calls: audit_session_self, audit_session_join, 48 and audit_session_port 49 50 51extended posix_spawnattr calls in support/posix_spawn.c are not expected 52to actually work yet, among others: 53- posix_spawnattr_setbinpref_np 54- posix_spawnattr_getbinpref_np 55 56proc_setpcontrol 57proc_get_dirty 58proc_set_dirty 59proc_track_dirty 60 61 62v2 or later: 63 64- AF_SYSTEM domain sockets and the event protocols 65 66- XPC_JETSAM_BANDs (handle memory pressure) 67 68I/O priority setting functionality - system call: 69__iopolicysys supports: 70 - getiopolicy_np 71 - setiopolicy_np 72 73 74- except NOTE_EXIT_MEMORY of questionable relevance 75#define NOTE_EXIT_DETAIL 0x02000000 /* provide details on reasons for exit */ 76/* 77 * If NOTE_EXIT_DETAIL is present, these bits indicate specific reasons for exiting. 78 */ 79#define NOTE_EXIT_DETAIL_MASK 0x00070000 80#define NOTE_EXIT_DECRYPTFAIL 0x00010000 81#define NOTE_EXIT_MEMORY 0x00020000 82#define NOTE_EXIT_CSERROR 0x00040000 83 84 85 86 87 88This is the top level of the FreeBSD source directory. This file 89was last revised on: 90$FreeBSD$ 91 92For copyright information, please see the file COPYRIGHT in this 93directory (additional copyright information also exists for some 94sources in this tree - please see the specific source directories for 95more information). 96 97The Makefile in this directory supports a number of targets for 98building components (or all) of the FreeBSD source tree. See build(7) 99and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html 100for more information, including setting make(1) variables. 101 102The `buildkernel` and `installkernel` targets build and install 103the kernel and the modules (see below). Please see the top of 104the Makefile in this directory for more information on the 105standard build targets and compile-time flags. 106 107Building a kernel is a somewhat more involved process. See build(7), config(8), 108and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html 109for more information. 110 111Note: If you want to build and install the kernel with the 112`buildkernel` and `installkernel` targets, you might need to build 113world before. More information is available in the handbook. 114 115The kernel configuration files reside in the sys/<arch>/conf 116sub-directory. GENERIC is the default configuration used in release builds. 117NOTES contains entries and documentation for all possible 118devices, not just those commonly used. 119 120 121Source Roadmap: 122--------------- 123 124bin System/user commands. 125 126cddl Various commands and libraries under the Common Development 127 and Distribution License. 128 129contrib Packages contributed by 3rd parties. 130 131crypto Cryptography stuff (see crypto/README). 132 133etc Template files for /etc. 134 135games Amusements. 136 137gnu Various commands and libraries under the GNU Public License. 138 Please see gnu/COPYING* for more information. 139 140include System include files. 141 142kerberos5 Kerberos5 (Heimdal) package. 143 144lib System libraries. 145 146libexec System daemons. 147 148release Release building Makefile & associated tools. 149 150rescue Build system for statically linked /rescue utilities. 151 152sbin System commands. 153 154secure Cryptographic libraries and commands. 155 156share Shared resources. 157 158sys Kernel sources. 159 160tests Regression tests which can be run by Kyua. See tests/README 161 for additional information. 162 163tools Utilities for regression testing and miscellaneous tasks. 164 165usr.bin User commands. 166 167usr.sbin System administration commands. 168 169 170For information on synchronizing your source tree with one or more of 171the FreeBSD Project's development branches, please see: 172 173 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html 174