the first completely pure release of PureDarwin

415 views
Skip to first unread message

Daniel Bethe

unread,
Nov 12, 2012, 3:40:47 PM11/12/12
to pured...@googlegroups.com
Hi everyone.  Due completely to the work of rafirafi, there is a new beta release of PureDarwin which is available for testing.  This has yet to be completely verified or replicated (rebuilt from source code, and free licenses verified) by anyone else, but it does boot in qemu and in other virtual machines.

Rafirafi has rewritten the remaining binary roots of Darwin 9, including a completely new platform expert called GenericPlatform.  He says that there is complete network support including DNS, via his ported E1000 and pcnet32 drivers.  It has the latest MacPorts and OpenDirectory.  The user's password is 'darwin' and 'sudo' is activated.  The documentation for this build is located in the default home directory, which you'll see upon booting.  The image is in the form of a qemu qcow2 image, which can be used or converted by various virtual machines.

Here it is for download:


Just kidding.  Here is a fast download from Google at 1139081216 bytes:


Here's the same file which I recompressed at 1036042200 bytes for those who need fewer bytes, but which should also be fast:


dtm$ md5 Puredarwin-darwin_9.8-version_9L30.qcow2
MD5 (Puredarwin-darwin_9.8-version_9L30.qcow2) = 78493de3c1a0a95659d9ba13f0696548

I am using the following command for qemu 1.2.0, installed via MacPorts, on a Mac OS 10.8.0 host.

qemu-system-i386 -m 1024 -cpu core2duo -vga std -usbdevice mouse -net user -net nic -hda Puredarwin-darwin_9.8-version_9L30.qcow2

I don't have DNS working in Mac OS's qemu yet, but rafirafi says that the guest should launch a DHCP client automatically.

Please come to IRC (#puredarwin at irc.freenode.net, where I'm 'dtm') to discuss your findings and to give rafirafi your thanks!

Furthermore, the latest lies and rumors are that there allegedly is a new PureDarwin image in existence, based on Darwin 10.  Nobody else has received it yet, as its owner lovingly handcrafts it.  So there could be more big news soon.

Daniel Bethe

unread,
Nov 12, 2012, 3:59:45 PM11/12/12
to pured...@googlegroups.com
Furthermore, rafirafi says that he has ported GenericPlatform to Darwin 10 in thirty minutes.  His source code on that is forthcoming.  His previous version was uploaded to our site's file repository.  As I said, someone is working on a fresh Darwin 10 image.  "How is this possible", you ask?!  Doesn't the 'blockers' page stand in the way?  I don't know how!  But allegedly, the DarwinBuild project has advanced and other subtle shifts in the tectonic substrate have occured, and coincidentally some new person showed up to the project and decided to completely disregard all warnings and negative lessons from the past.  They started over.  It sounds insane to me.  We shall see!

As for the image that we have today...If this works.... if someone else can replicate rafirafi's work by rebuilding his image from scratch, using all free software, that will have fulfilled the founding purpose and the namesake of our humbly grandiose project.  Any new release is be rather profound, with dancing in the street.  Then, by rebuilding it on Darwin 10 with an eye for 11, that would be some serious business.

Daniel Bethe

unread,
Nov 12, 2012, 4:09:08 PM11/12/12
to pured...@googlegroups.com
Yes, so I booted with this:

qemu-system-i386 -m 1024 -cpu core2duo -vga std -usbdevice mouse -net user -net nic -hda Puredarwin-darwin_9.8-version_9L30.qcow2

And I enabled networking (including DNS) with this:

sudo ipconfig set en1 BOOTP

Again, the password is 'darwin'.

Whether configured manually or configured automatically, you use the default guest IP address of 10.0.2.15 and the host gateway IP address of 10.0.2.2 and host DNS IP address of 10.0.2.3.  I couldn't figure out how to enable DNS manually.  I guess I'm still a noob, or Darwin is hard, or something.  ;-)

Here's a page about QEMU networking, and of course there are some on qemu.org


I don't believe that Mac OS hosts have tap/tun support, at least with QEMU 1.2.0 in MacPorts, so I'm using NAT.  Some people need to use qemu because unlike vmware, it is fully free software; and unlike VirtualBox, it can emulate an entire CPU instead of just virtualizing your own CPU.  Virtualization is great, and fast, but it can be less compatible.  XNU is very picky about what hardware it will run on.

For those who are able and willing to use VirtualBox, you must virtualize the PIIX3 chipset.

Daniel Bethe

unread,
Nov 12, 2012, 4:19:32 PM11/12/12
to pured...@googlegroups.com
Do not use 'sudo port selfupdate' on MacPorts on PureDarwin.  Use 'sudo port sync' instead, because MacPorts needs to be manually compiled without Foundation support.  Maybe we can work with the MacPorts guys on this.

I am still working on getting access so that I am able to update the web site properly, so I apologize for not having fixed that up yet and for any resulting confusion or undue dismay as to the state of the PureDarwin project.

Daniel Bethe

unread,
Nov 12, 2012, 5:02:03 PM11/12/12
to pured...@googlegroups.com
Ooops, sorry.  Take out the '-usbdevice mouse' from my previous command.  At least with QEMU 1.2.0, you need to use a PS/2 mouse, which is QEMU's default.

qemu-system-i386 -m 1024 -cpu core2duo -vga std -net user -net nic -hda Puredarwin-darwin_9.8-version_9L30.qcow2 

You will boot to an X11 server, with one uxterm.  Run 'sudo ipconfig set en1 BOOTP' for networking if you don't already have it.  You can edit your ~/.xinitrc to have a window manager and stuff.  Run 'sudo port -v sync' and wait a long time.  I'm now attempting 'sudo port install AfterStep'.  Shut down the system via 'sudo halt'.

Welcome to the future of the past!  <3 <3 <3

Daniel Bethe

unread,
Nov 12, 2012, 5:35:56 PM11/12/12
to pured...@googlegroups.com
The image contains a collection of source code archives and patches, which will be assimilated into puredarwin.org's own repository at some point. Here are the release notes from inside the image:

Date : 25/09/2012
Author : rafirafi

About this build :

platform : leopard 9L30
only i386 architecture

How to use:
There is an user created "puredarwin" with passworg "darwin", "root" have password "rootroot"
Network is tested as working in virtualbox and linux with kvm modules patch available on puredarwin.org site, from here you can connect with ssh.

Example of a complete command line :
kvm -m 512 -cpu host,family=6,model=15 -device VGA,bus=pci.0,addr=0x02 -device rtl8139,mac=54:52:03:04:05:02,vlan=0,bus=pci.0,addr=0x04 -net users,vlan=0 -machine pc,accel=kvm  -name ***PD-XMAS-9L30pd1*** -hda /opt/PD-Xmas-9L30pd1.qcow2


What it is :

This is an attempt to have a puredarwin without binaries.

 made with the information publicly available about the puredarwin project with the maximum of features and developer tools I have been abble to include.
What news / puredarwin Xmas :
- based on 10.5.8 source
- use the last opensource platform expert, only i386


Shipped but not built :

openjdk and antlr : here in case someone want to built openjdk

Packages not coming from 9L30 apple source with puredarwin patches:

From rafirafi :
ClockRTC.kext : Read the date from rtc and provide it to the platform expert
VMQemuVGA.kext : a framebuffer for the qemu default vga, should be compatible with any card supporting the VBE standard.
PCNet : an experimental driver for the pcnet32 network card, only version Am79C970A supported. 
From darwin 8:
IOATABlockStorage.kext
IOSCSIArchitectureModelFamily.kext
AppleAPIC.kext with 8259 support : made standalone in Apple8259PIC.kext
AppleI386GenericPlatform.kext : hook to ClockRTC added. Add the kernel boot option "platform=PCx86" for compatibility or Apple ACPI platform will be loaded.
AppleI386PCI.kext
DarwinTools : provide sw_vers and SystemVersion.plist
CFNetwork : not so much tested
From BSD:
logger
From Zenith432 / VMware:
VMMouse.kext
From Stuart Crook:
purefoundation
From opencflite:
CF : missing function, essentially Stuart Crook code.
From voodooprojects :
chameleon : last version building with darwin 9, svn version 2045, need 400M of memory min. to boot.
From macports :
a macports fresh install of the last version is here (compiled zithout objc and foundation support)
a keep a Xorg installed for convenience, if you dont zant it erase /usr/X* directory and modify .profile file.
From cauldrondevelopement:
osxbom : for now just lsbom, a reimplementation of the utility of the same name. Here for using with macport binary package.
From hnak:
AppleIntelE1000.kext : driver for the e1000 netwok family cards (http://osx86drivers.sourceforge.net ), slightly corrected to work with puredarwin.

Others:
subversion-1.3.2 is in /Users/puredarwin.
A part of jre from openjdk is here with antlr 2.7.3.

Components not working / lacking :

PureFoundation : there are (...) features not implemented, tested. 

Security framework : there is no free CSP, so a lot of features are not ok.

CFNetwork : not really tested, perhaps it's ok.

CF: the patches are mainly stubs, but it should be possible to implement the features without too much difficulties.

ddistnoted: not here. you can get the binary from puredarwin site or ask the author for the source.

Kerberos : depends on plutil. A python module for plist exist so somebody can make a plutil substitute.


Features with less problems:

Login throught pam:
this is achieve by creating/recreating the pam_sessioncreate.so module foolowing the Stuart mail from:

Multi-users : you can use the script from puredarwin site

DTrace:
The dtrace patch interfers which dyld buily, so I patched ld64 but dtrace functionnalities were not tested after this patch.

Features with less problem:

Network:
You can see a message at boot:
 "InterfaceNamer: no network interfaces"
=> it just means the interface is not built-in, so not used to generqte uuid platform.

Graphics :
Only a framebuffer for qemu/virtualbox is here, it's based on VBE features only iirc, so nothing hardware specific.

There is a driver made by zenith432 VMWare Svga II which should provide support for vmware.

What's been done :

A lot of patches.
But there is a lot of patch to build only i386.

What I think could be solve :

CF - purefoundation : 
The patch available for CF pf6 is not ok, and some feature were backported from CF-550 or opencflite.
There is no reconstructed headers/headers based on the doc, so they couldn't be included. But compilation against purefoundation in puredarwin is fine and show you immediatly what symbols are lacking...

The purefoundation r30 needs minor corrections to built in darwinbuild and have all the symbol defined (link to libffi...), notably the Foundation headers can be self-contained easily.

Python and Tcl needs additionnal patches to build completly in darwinbuild.

X : re-enable XDarwin feature.


What will be very difficult to solve :

Security :
there is no opensource CSP, perhaps it's possible to use openssl...

XCode dependency :
It means porting every project to use a Makefile...

Porting to a more modern base (darwin 10, 11...).

Daiyu Hurst

unread,
Nov 14, 2012, 10:40:20 PM11/14/12
to PureDarwin
On Nov 12, 3:59 pm, Daniel Bethe <d...@smuckola.org> wrote:
> Furthermore, rafirafi says that he has ported GenericPlatform to Darwin 10 in thirty minutes.  His source code
> on that is forthcoming.  His previous version was uploaded to our site's file repository.  As I said, someone is
> working on a fresh Darwin 10 image.  "How is this possible", you ask?!  Doesn't the 'blockers' page stand in
> the way?  I don't know how!  But allegedly, the DarwinBuild project has advanced and other subtle shifts in
> the tectonic substrate have occured, and coincidentally some new person showed up to the project and
> decided to completely disregard all warnings and negative lessons from the past.  They started over.  It
> sounds insane to me.  We shall see!

Is it possible the new person felt it prudent to start from the
beginning not only to jump-start their own
familiarity with the project, but also as a way of establishing their
creds?

;)

Daniel Bethe

unread,
Nov 15, 2012, 12:47:37 AM11/15/12
to pured...@googlegroups.com

>Is it possible the new person felt it prudent to start from the
>beginning not only to jump-start their own
>familiarity with the project, but also as a way of establishing their
>creds?
>
>;)


Prrrretty much!

Daiyu Hurst

unread,
Nov 15, 2012, 10:47:41 PM11/15/12
to PureDarwin
Anyway, this release is working pretty well under VBox, but the
erratic results I get under VMware perplex me.

Sad, because VMware is quite noticeably faster.

Daniel Bethe

unread,
Nov 16, 2012, 2:39:57 PM11/16/12
to pured...@googlegroups.com
BTW in case I didn't already say so, GenericPlatform does not support multiple cores or CPUs.  Apple's own ACPI platform expert does so, for people who want to sacrifice their software liberty in favor of mad raging darwinian performance.  So I guess we won't be doing much Wii emulation just right away.
Reply all
Reply to author
Forward
0 new messages