Note that due to the way the techniques have evolved, single tasks may be accomplished in multiple disfferent ways. For instance, values for graphics (to enable a graphics controller) can be done by an injector kext (like natit or nvenabler) by a Device-Property string, or by a suitably patched DSDT.aml only one instance of one technique should ever be used at any given time, however.
The /Extra folder can contain any combination of:
kexts (In /Extra/Extensions)
kextcaches: (usually in /Extra/Extensions.mkext)
Device Property Lists (by way of the Device Properties entry in /Extra/com.apple.Boot.plist)
DSDT Patches (in /Extra/DSDT.aml)
In the case of chameleon there are also:
smbios.plist (which injects smbios values directly in the bootloader)
a "Themes" folder (which contains themes for the bootloader GUI)
A basic setup with Chameleon might look like this:
Click to view attachment
Injectors:
The 3 kexts included are Injectors:
(sometimes called "legacy" kexts or plist-only kexts) which modify the behaviour of vanilla kexts to extend their functionality. In this case they add support for a range of disk controllers by injecting their device IDs and other parameters.
The most commonly used injectors are graphics injectors: titan, natit, nvinject, nvkush, nvenabler etc.
Similarly injectors exist for sound: e.g. ALCInject and HDAEnabler.
Injectors for SMBIOS values: AppleSMBIOSEFI.kext, SMBIOSEnabler.kext, SMBIOSResolver.kext
"Plist-only" or "Legacy" kexts consist of an empty kext with just the Info.plist inside. The object of this is to add to or override the values in the main kext that is being loaded by the system. typically this will add device IDs or similar values to allow the kext to load with hardware other than that which it was intended for, but crucially *without* modifying the original kext itself, so that functionality will not be lost in the event of an update.
Decryptors:
To boot successfully, a decryptor must also be present, typically dsmos.kext or Appledecrypt.kext
This is necessary because certain binaries in OS X are encrypted, normally this decryption is done my the mac itself. as this is not available a decryptor kext is used instead.
Additionally, a Disabler.kext is often used, this does the opposite of an injector, by blocking other kexts from loading.
Disabler.kext loads itself instead of the "disabled" kext by having the same "personality" in its Info.plist but with a higher IOProbescore. as needed, kexts to be disabled can be added and removed from Disabler.kext by adding and removing entries in its Info.plist.
The earliest example of a disabler is DFE's IntelCPUPMDisabler.kext
Injectors, Disablers, and Decryptors are almost always used from /Extra
Kextcaching:
kextcaching may improve performance and have other advantages
when you add new kexts to /Extra/Extensions, it is therefore a good idea to run:
CODE
kextcache -m /Extensions.mkext /Extra/Extensions
to rebuild it (see man kextcache for more details esp. the -a i386, -k options may be useful)In some cases preboot media or patches for specific machines are distributed solely as Extensions.mkext . In this case it can be useful to use mkextunpack (see man mkextunpack for details) to get the kexts used to create the kextcache so they can be edited or adjusted.
so, having added dsmos and Disabler, and run kextcache, the chameleon setup now looks like this:
Click to view attachment
Drivers:
Drivers can also be loaded from /Extra/Extensions or /Extra/Extensions.mkext in some cases this is simple and preferred. Often, however, driver kexts have dependencies, and in order to load from /Extra, the kexts upon which the driver depends must also be present.
To find out what vanilla kexts you need to fulfill the dependencies of a particular driver, open its Info.plist and look under OSBundleLibraries. This will contain the explicit dependencies in com.apple.blah type notation. note that although drivers loaded this way will usually survive updates, it is a good idea to replace the vanilla "dependencies" kexts for each new OS version. (and kextcache for reliability and pleasure
In order to load instead of the drivers in /System/Library/Extensions certain changes tend to be needed in the Info plist of the driver in /Extra/Extensions: the IOProbeScore property and the OSBundleRequired property.
The general rule of thumb is that the IOProbescore should be increased from the default level, as the kext with the higher score gets loaded when there are 2 instances (as is common when you have one copy in /Extra/Extensions and another in /System/Library/Extensions)
Likewise for the kext to be loaded early in the proces, (as is the case with kexts in /Extra/Extensions) its OSBundleRequired property may need to be set to Root (or possibly Network-root?)
Device Property Strings
Device Property Strings are in the form of a single hex string. They are generated by converting information in plist format to hex & then pasting it into /Extra/com.apple.Boot.plist Typical uses for this are to inject values for graphics, network, and sound.
Device properties (also called devprops or EFI Strings) are an older technique introduced in PC-EFI, and do much the same thing as injectors, but do so wityhout loading an extra driver, so are preferred by some, and sometimes considered more "vanilla"
DSDT Patches
DSDT Patches modify the system's DSDT (Differentiated System Descriptor Tables) which is an ACPI table generally part of the machine's BIOS. Its purpose is to describe the hardware to the System so as to tell it how to distribute power to the various devices.
The patch is usually in the form of a DSDT.aml file, (this can be decompiled & recompiled with "IASL" see info on this elsewhere) Although in some instances it may be in the form of a kext.
The purpose of patching the DSDT is to change the way the system "sees" the hardware in order to improve its functioning with OS X, either by making the hardware appear more like a Mac or by fixing power
management bugs that stop OS X from booting. In some cases it can also be used to inject values to enable certain hardware such as a gfx or audio controller.
