Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Veri

macrumors 6502a
Original poster
Sep 23, 2007
611
0
Just a heads up, because this makes me bounce with joy - the sources for the Darwin kernel and toolset underlying Mac OS X 10.5 have been released on Apple's Open Source site. The source associated with 10.4.10 is also now available.

This will help driver writers discover exactly how their code is interacting with the kernel, random developers identify exactly what's going on in the kernel to patch annoying behaviour (e.g. I'll be looking at this one), administrators perform audits (I see code related to FileVault there, nice!) and students learn more about OS design.

Since 10.4.10 has been out for so long and there was no sign of the sources, and macosforge's homepage has seen no updates since last year, I feared they were winding down their open source programme. Well done on keeping the source open, Apple.
 

pmade

macrumors newbie
Jul 17, 2007
23
0
What is the best way to upgrade a Darwin binary install with the latest source code release? Are there instructions somewhere for building the OS from source?

What about getting the source? Do you really need to download all of those individual archives?

Thanks!
 

Veri

macrumors 6502a
Original poster
Sep 23, 2007
611
0
What is the best way to upgrade a Darwin binary install with the latest source code release? Are there instructions somewhere for building the OS from source?

What about getting the source? Do you really need to download all of those individual archives?

Thanks!

There seem to be way too many out-of-date official, semi-official and unofficial build guides since the death of OpenDarwin - this was a fairly nice one, based on darwinbuild scripts.

For re-compiling just the mach_kernel, with the help of this advice I've produced this shellscript. Put it anywhere alongside a directory named dist in which you should place:
  • bootstrap_cmds-60.tar.gz
  • Libstreams-25.tar.gz
  • kext_tools-117.tar.gz
  • xnu-1228.tar.gz
  • cctools-667.3.tar.gz
  • IOKitUser-376.tar.gz
from the 10.5 sources page. Then simply execute from the command line. You need the developer tools installed, of course.

I've not tested it with my main system yet, but replacing the installer DVD's mach_kernel with the one then sitting in build/xnu-1228/BUILD/obj/RELEASE_I386/mach_kernel
boots the installer successfully.
 

ravenvii

macrumors 604
Mar 17, 2004
7,585
492
Melenkurion Skyweir
There seem to be way too many out-of-date official, semi-official and unofficial build guides since the death of OpenDarwin

I also heard about the death of OpenDarwin, and thought that meant Apple is no longer releasing their kernel as open source. That, apparently, isn't true. Now I am wondering what, exactly, is OpenDarwin, and how is it different from Apple's sources?
 

Veri

macrumors 6502a
Original poster
Sep 23, 2007
611
0
I also heard about the death of OpenDarwin, and thought that meant Apple is no longer releasing their kernel as open source. That, apparently, isn't true. Now I am wondering what, exactly, is OpenDarwin, and how is it different from Apple's sources?

Archive.org's copy of the FAQ explains what OpenDarwin was - a set of resources for people developing open source projects on OS X (e.g. XPostFacto), and the name of a distribution of Darwin that added extra stuff[tm] to Apple's release:
For example, there are some additional drivers in OpenDarwin for hardware that Apple no longer wishes to officially support (such as older Macs) or has no interest in supporting (such as i386). There are also utilities that provide alternative access to functionality that is normally configured using the GUI in Mac OS X.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.