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.

testing Matt Lee August 10, 2006

foobar
1 comments  

OpenDarwin is scuppered leeg July 26, 2006

Sadly, OpenDarwin is shutting up shop, due to not being that which was envisaged. This really should prompt Yarrwin into getting its source into ship-shape...
0 comments  

We be suffrin' scurvy leeg March 9, 2006

In completing the boot process, it becomes necessary to load sufficient drivers to bring the filesystem up.  Let's have a look at the dmesg from this system (which isn't the one I'm using for Yarrwin, but will demonstrate the point):

Got boot device = IOService:/MacRISC4PE/ht@0,f2000000/AppleMacRiscHT/pci@7/IOPCI2PCIBridge/k2-sata-root@C/AppleK2SATARoot/k2-sata@0/AppleK2SATA/ATADeviceNub@0/IOATABlockStorageDriver/IOATABlockStorageDevice/IOBlockStorageDriver/ST3160023AS Media/IOApplePartitionScheme/Apple_HFS_Untitled_1@3

Get there, and we're done.  Out of kernel zone and into booting a BSD Unix.  However, not all of these drivers are available in the Open Source Darwin :-(.  Specifically IOATABlockStorage is needed, and not currently available; also AppleMacRISC4PE doesn't currently build.  I've been told by an Apple engineer that he doesn't think a bootable Darwin *can* be created from the source.  There's an old version of IOATABlockStorage which may be portable to Darwin 8, and I'll give that a try.  Otherwise, we may have to go down the cheating root of using binary modules (and hence, a Yarrwin distribution being out of the question) replaced later by OSS equivalents.

I've got a couple of tools I wrote for Darwin/Yarrwin, and I'll put them into the CVS soon so we're not stagnating.
1 comments  

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  

Yarrwin now boots! :-) It's still entirely based on Apple Darwin (currently 8G32, a.k.a. 8.4.0) and using darwinbuild for the build process. It also doesn't boot very far; I'm currently looking into which Darwin projects I actually need to include in order to get a functional OS. The initial Yarrwin will be based on this list with as little superfluosity as possible.

I'll write up some instructions in a tick. There are a couple of gotchas to fix (ApplePlatformExpert::getGMTTimeOfDay doesn't succeed at the moment, and in6_ifattach on lo0 fails) but once that's fixed we're still staring at "Still waiting for root device". That's because not enough drivers to *find* the root device have been loaded; the kernel and kexts have been found by the secondary bootloader.
1 comments