Recent site activity

For developers‎ > ‎The boot process‎ > ‎

Chameleon

The Chameleon bootloader is an APSL project based on David Elliott's fake EFI implementation added to Apple's boot-132 project.

The source code repository is available at

Chameleon brings some nice features from low to high layers as:
Preboot ramdisk image, EFI partition booting, hibernation/resume, DSDT and SMBIOS, GUI booting and custom themes supports.

draft.

Status

Chameleon 2.0-RC4-r684 works with QEMU v0.10.6 and VMware (Fusion) 3.0.1 on a Mac.

Chameleon 2.0-RC3-r658 works with QEMU (mac & win tested), VMware (Fusion), etc.. Prolematic points reached on windows with e.g. vmware ("Mach-o has bad magic number" error).

Chameleon 2.0-RC1-r431 works with QEMU.

Chameleon 2.0-RC1-r431 will not show up in VMware (observed in Fusion but not in Player), because VMware relies on darwin.iso (VMware Tools) which contains the DFE bootloader (Stage 2 boot file < 128K) is ok.


In case of real hardware target, cdboot, boot, boot0 and boot1h have been deployed but not yet tested.

In Image disk, virtual or not, cdboot and the "El Torito ISO trick" is used.


Note: The error "Error parsing plist"

in i386/libsaio/stringTable.c, the function "long ParseXMLFile( char * buffer, TagPtr * dict )" is responsible of returning the error.

    if (length < 0) {

        error ("Error parsing plist file\n");

        return -1;

    }

Why is it failing? The plist is obviously well formated and there is no permission problem at this level.
Problem: "Error parsing plist file"
Solution: In fact, the error comes from the memory allocation, it seems that 256MB is not enough and make it fails in the contrary of e.g., 384M.

Some features

Please see "Introducing new features added to next version of Chameleon", part 1 and part 2.

Default partition

A default partition to boot can be specified.
Add to com.apple.Boot.plist:

<key>Default Partition</key>
<string>hd(x,y)</string>

Customizable UI

It is be possible to customize the bootloader UI.
/Extra/Themes/ folder should contain some themes and /Extra/com.apple.Boot.plist should references one of them with:
<key>Theme</key>

<string>theme_folder_name</string>

Custom UI

Default UI

RAM speed

<key>SMmemspeed</key>
<string>800</string>

Extension folder

.

How to update PureDarwin running inside qemu to the latest Chameleon bootloader 11/2011

sudo apt-get install dmg2img
dmg2img /home/mint/Downloads/2120-Chameleon\ v2.1VS\ r1701.dmg
# Run qemu with 
-hdb /home/mint/Downloads/2120-Chameleon\ v2.1VS\ r1701.img

PureDarwin:~ root# mount
/dev/disk0s1 on / (hfs, local, journaled)
PureDarwin:~ root# fdisk -f "/Volumes/Chameleon 2 VS//Manual Install/boot0" -u -y /dev/rdisk0
PureDarwin:~ root# dd if="/Volumes/Chameleon 2 VS//Manual Install/boot1h" of=/dev/rdisk0s1
PureDarwin:~ root# cp "/Volumes/Chameleon 2 VS//Manual Install/boot" /

# Chameleon v2.1VS r1701 seems no longer to be able to boot PD9, crashes immediately when loading the kernel
Comments