Network - heldersrvio/PureDarwin GitHub Wiki
This page primarily details how to get networking working in PureDarwinXmas, but these steps should be applicable to any Darwin installation. Next releases should/could include some part present here.
A must.
Network drivers are provided in the form of Kernel Extensions (KEXTs). While Apple has made a few available in either source or binary form, these are nowhere near as many as are provided with OS X. In particular, although the AppleIntel8254XEthernet.kext which is needed for VMWare exists, it is not available for redistribution in any form.
For the Intel d945gclf2 Atom board, Realtek's AppleRTL8169Ethernet is reported to work. Realtek have a good selection of drivers available on their website.
The first thing you will need to do is edit the virtual machines configuration file. This is the .vmx file inside the virtual machine's bundle. Ensure that the following options are present.
ethernet0.present = "TRUE" ethernet0.virtualDev = "e1000" Optionally, you can also add with TRUE or FALSE depending your needs
ethernet0.wakeOnPcktRcv = "FALSE" ethernet0.linkStatePropagation.enable = "FALSE"
Next you will have to install a driver for your network card. For the Intel e1000 device, the only current compatible Darwin driver is Apple's closed-source *AppleIntel8245XEthernet.kext*, which live in /System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/.But since this isn't available (blocker) for general distribution you're pretty much stuck.
Blocker: no kext available which will match the e1000 device in VMware
Through the QEMU user mode network stack, it is possible to have a weird but functional network (rtl8139 tested). For more information, refer to the QEMU page. A quick overview:
- DHCP client (KernelEventMonitor) and server (QEMU virtual DHCP server) functionality.
- Guest IP address starts from 10.0.2.15.
- DHCP server and gateway on 10.0.2.2.
- A virtual DNS server is also (10.0.2.3) present and autoset.
- A virtual SAMBA or NFS can be used on 10.0.2.4 (not tested) in order to access files on the host via file sharing.
- A workaround is involved in order to avoid the connection to stall.
The PureFoundation.root.tar.gz available from the PureDarwin svn or the PureDarwin hg repository contains two system frameworks which are required by a number of different networking components. Also available from the same location is the ddistonoted.root.tar.gz. Install both of these. Install SystemConfiguration.framework and Components SystemConfiguration.framework, which is part of the configd project, provides the components needed to configure network interfaces. Unfortunately, it does not currently build correctly and the available binary roots (spread across configd.root and configd_executables.root) are incomplete. You've probably already guessed that the missing components are the ones we need. However, by loading configd into XCode it is possible to build some of the individual components needed.
The file configd.root.tar.gz below contains as many of the missing components as we could get to build and a template preferences.plist. Install it in the usual manner (using ditto) and you will have all the components needed to get networking up and running.
Install and fix these files with:
sudo ditto ~/Downloads/configd.root/ /Volumes/PureDarwinXmas/ sudo chown root:wheel /Volumes/PureDarwinXmas/System/Library/LaunchDaemons/com.apple.configd.plist
You must copy the com.apple.DirectoryService* plists into /System/Library/LaunchDaemons and set their ownership to root:wheel.
This is all very well, but how do we get networking to configure itself automatically? Most of the bundles to be found under /System/Library/SystemConfiguration/ have some part to play, but chief among them are IPConfiguration and IPMonitor.
- The IPMonitor bundle contains no compiled code and is responsible for allowing the DirectoryService daemon to perform DNS lookups.
- The IPConfiguration bundles is available as part of the "bootp" package and is responsible for performing configuration via DHCP. It also has dependencies on the closed-source Apple80211.framework, as well as private CF symbols missing in CFLite. Getting a version of this bundle which will work in PureDarwin will now be one of our highest priorities. So we're currently waiting for a non-linked version of bootp. Credits
Thanks to Dr. Rolf "RolfHeinrich" Jansen for providing the missing components and the knowledge to use them. Availability and investigation
Watch carefully from many points of view (e.g., legal, technical, etc..).
http://src.macosforge.org/Roots/9A581/AppleIntel8255x.root.tar.gz (available in DarwinBuild consequently) (reported to work in QEMU) Realtek's AppleRTL8169Ethernet Intel d945gclf2 Atom board (e.g., reported to work)
AppleRTL8139Ethernet.kext is available in Darwinbuild. Realtek RTL8139 Ethernet card" (e.g., reported to work in QEMU)
RealtekR1000 It's an opensource driver for network controllers RTL8168, RTL8111, RTL8169, RTL8101 and some others modification for Mac OSX. It is based on Realtek' driver for Linux and doesn't supported by Realtek. http://sourceforge.net/projects/realtekr1000/ 82566mm svn checkout http://82566mm-osx-driver.googlecode.com/svn/trunk/ 82566mm-osx-driver-read-only http://techresearchinfo.blogspot.com/
intel-e1000e-kext Open source kernel extension for Intel E1000e series of network cards (supporting many models) http://code.google.com/p/intel-e1000e-kext/
iwidarwin Intel® PROSet/Wireless 2200-2915/2100/3945/4965 driver for Mac OS X http://code.google.com/p/iwidarwin
osxbge A port of the BSD bge driver to Apple's OS X operating system. Broadcom 57xx and 59xx network chipsets http://code.google.com/p/osxbge/
wirelessdriver A Prism/Prism2 driver for use with MacOS X and/or the Darwin operating system from Apple. (seems old..) http://sourceforge.net/projects/wirelessdriver/
AppleIntel8254XEthernet.kext is not redistributable. Intel e1000 network card (e.g., the one supported in VMware Fusion)