Ahoy mateys! 'Tis the Yarrwin blog!

The OS for pirates! Operatin' on the High Seas!

Yarrwin project news and development. Some other stuff thrown in for good measure.

Here be preliminary instructions, jim-lad leeg March 7, 2006

This post describes how I got to the point where Yarrwin actually boots. As you'll have seen, it doesn't boot very well, but these are the first steps on the way to rolling a custom Darwin distribution. It's so far entirely generic too and based on Apple's sources (with some OpenDarwin patches), not on anything created specifically for Yarrwin.

  1. Get and install darwinbuild. Download it from the darwinbuild project, follow the instructions to get it installed.

  2. Set up two empty partitions. One partition will be used as our darwinbuild scratch area, and should be case-sensitive HFS+. This could equally be a disk image if you so chose. The other will be our boot disk, so make it case-insensitive HFS+. We don't yet know how big each partition should be, but so far 9GB each hasn't been filled :-).

  3. Initialise darwinbuild. This is done with the command:

    darwinbuild -init versionnumber

    as root, in the darwinbuild scratch area. I've been using 8G32od1 as the version number, so do that if you're following me but I expect any 8Xyy would be suitable.

  4. Build a few projects. We need so far: xnu (the kernel), files (some symbolic links, config files and so forth), BootX (the Mac OS X secondary bootloader), and AppleCore99PE (the platform drivers). Take this time to get bless too; not because we need it but because it's got really useful documentation on the boot process which will undoubtedly come in handy :-). To build each project, go to the scratch area and do:

    darwinbuild projectname

    This will build the project into scratcharea/Roots/projectname-version/projectname-version.root~1/.

  5. Populate the boot partition. For each root built in the above step, use ditto(1) or another file copy tool to put the files onto our boot partition. So for instance, AppleCore99PE generates files in AppleCore99PE-122.0.1.root~1/System/Library/Extensions/AppleCore99PE.kext, which should go in /Volumes/Yarrwin/System/Library/Extensions. Do the files project first, as it creates a lot of the directory structure.

  6. Bless the boot partition. We actually need to create the BootX secondary bootloader, so run this:

    cd /Volumes/Yarrwin

    bless -folder System/Library/CoreServices -bootinfo usr/standalone/ppc/bootx.bootinfo

  7. Boot into Yarrwin! Reboot the computer, holding down Option. Choose your Yarrwin partition at the boot picker, and watch the Darwin kernel start up and, um, stop again :-). It's a beginning...

 

0 Comments:

Post a Comment

<< Home