Lion Installation Guide
* Unless specify otherwise, everything are done in Snow Leopard.
For preparing installation media, I use MaLd0n guide. For the boot loader, I use Kabyl branch of Chameleon 2 RC5 with "KabylLionV4" patch. When preparing installation media, we will need existing Mac OS X. Other requirement are:-
- USB flash drive, at least 8GB.
- Lion Retail (11a494) dmg from Apple App Store.
- At least 50GB of space on target hard disk. Lion only use roughly 40% of the space.
Preparing Chameleon boot files.
Preparing Lion Install Media
Preparing ATI Mobility Radeon HD 4570 Support
- Extract ATI4600Controller.kext from /Volumes/Mac OS X Base System/System/Library/Extensions/ folder. Put it at desktop.
- We're going to use Shrike personality. For your information, the original Shrike connector info is this:-
(original)
02 00 00 00 40 00 00 00 09 01 00 00 02 01 00 03
02 00 00 00 00 01 00 00 09 01 00 00 20 01 02 02
00 04 00 00 04 03 00 00 00 01 00 00 10 00 01 01
020000004000000009010000020100030200000000010000090100002001020200040000040300000001000010000101
Location of Shrike personality in Lion ATI4600Controller binary file for 32-bit & 64-bit support:-
- Offset 0x1FF70, length 0x30
- Offset 0x73EE8, length 0x30
- Patch Shrike personality with our connector info using your favourite hex editor.
For internal LCD to work, LVDS must not set as "internal" display. So, "features"="00", not "09". (see post #10 (thanks to Crowebster) & #17). This is connector info that has been fixed:-
02 00 00 00 40 00 00 00 00 01 00 00 12 01 00 01 (LVDS)
10 00 00 00 10 00 00 00 00 01 00 00 10 10 01 06 (VGA)
00 08 00 00 00 02 00 00 00 01 00 00 20 00 02 02 (HDMI)
020000004000000000010000120100011000000010000000000100001010010600080000000200000001000020000202
- Add HD4570 PC ID (0x95531002) in ATI4600Controller.kext/Contents/Info.plist:-
<key>IOPCIMatch</key>
<string>0x95531002 0x94901002 0x94881002</string>
- Save the edited ATI4600Controller.kext in safe place where you can access them later.
Preparing Audio Device (IDT92HD73C1) Support
For unknown reason, I can't get audio device to work in Lion. However, since I'm able to get audio device to work in Snow Leopard 10.6.8, we will be using 10.6.8 AppleHDA.kext instead. I will be using bcc9's PathMap & PathMapRef. We will be using my own ConfigData from Snow Leopard.
This is pre-patched 10.6.8 AppleHDA.kext for our audio:
10.6.8 AppleHDA.zip 1.54MB
92 downloads
This is how to patch AppleHDA.kext for IDT92HD73C1 if you decide want to try it yourself.
- Patch AppleHDA binary with IDT92HD73C1 PCI ID (0x111d7675 --> read backward --> 75761d11).
- Open AppleHDA.kext/Contents/MacOS/AppleHDA with your favourite hex editor.
- Search & replace all occurrence of 8419D411 with 75761d11
- Update 12 Feb: Search & replace all occurrence of 8319D411 with 00000000
- Open AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist using PlistEdit Pro or any plist editor.
- Locate HDAConfigDefault entry for layout id 12. This is because I already hardcoded the layout id = 12 in DSDT.
- Edit CodecID & ConfigData with IDT92HD73C1 CodecID & ConfigData respectively. You can refer to IDT92HD73C1X5_R3.kext in Extra folder.

- Open AppleHDA.kext/Contents/Resources/Platforms.xml using PlistEdit Pro or any plist editor.
- If you're using Lion AppleHDA.kext, you will need to replace CommonPeripheralDSP with the one from IDT92HD73C1X5_R3.kext.
- Locate PathMaps entry for PathMapID 9. Edit PathMap entry for IDT92HD73C1. You can refer to pre-patched 10.6.8 AppleHDA.kext.

- The PathMapID 268,610,049 is for HDMI audio. Copy this PathMaps entry from pre-patched 10.6.8 AppleHDA.kext (PathMaps #9) & paste it after PathMaps #8 (PathMapID 9 - entry for IDT92HD73C1) in Lion AppleHDA.kext
- Open AppleHDA.kext/Contents/Resources/layout12.xml using PlistEdit Pro or any plist editor.
- Replace PathMapRef entry in layout12.xml with the one from pre-patched 10.6.8 AppleHDA.kext.

- First entry for codec id 268,610,049 is for HDMI audio. PathMapID for this device also use CodecID. You can use different number for PathMapID as long as it's unique & identical with the one defined in Platforms.xml.
- Second entry is for IDT92HD73C1 with PathMapID 9 to match entry in Platforms.xml.
There you go. Now you can start Lion installation on your Studio. After installation, you can boot into Lion using Lion install media (USB thumbdrive) for now.
Make the Lion Disk Bootable
These steps are done in Lion.
- For example, this is Lion location in disk
bash-3.2# diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *320.1 GB disk0
1: Apple_HFS BootExtra 41.1 MB disk0s1
2: Windows_NTFS System Reserved 104.9 MB disk0s2
3: Windows_NTFS OS 264.4 GB disk0s3
4: Apple_HFS Macintosh HD 53.4 GB disk0s5
This show the Lion is at disk0s5.
- Install boot0hfs, boot1h & boot. We'll be using boot0hfs because we want to maintain Windows partition as active partition.
cd KabylLion/Kabyl/sym/i386/
sudo fdisk -f boot0hfs -u -y /dev/rdisk0
sudo dd if=boot1h of=/dev/rdisk0s5
sudo cp boot /
- Create Extra folder.
mkdir /Extra
- Download, extract & put all files in "/Extra/" folder:
Extra.zip 1.67MB
109 downloads
(Update 31 Jan: The Voodoo PS2 kexts for keyboard & trackpad doesn't work in 64-bit. Please use this kexts instead.)
(Update 5 Feb: Latest DSDT file for both with & without eGPU:
DSDT Update 05022012.zip 97.4K
70 downloads)
- Navigate to /Extra/Extensions/ & rename IONetworkingFamily.kext to IONetworkingLegacy.kext
- Move all kexts in /Extra/Extensions/ folder to /System/Library/Extensions/ folder.
- Install the pre-patched ATI4600Controller.kext & 10.6.8 AppleHDA.kext in /System/Library/Extensions/ folder.
- Edit /Extra/com.apple.Boot.plist. Should look like this:-
Strictly do not use "UseAtiROM=Yes". It can make internal LCD unusable.
<!--?xml version="1.0" encoding="UTF-8"?-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string>npci=0x2000</string>
<key>GraphicsEnabler</key>
<string>Yes</string>
<key>Legacy Logo</key>
<string>Yes</string>
<key>SMBIOSdefaults</key>
<string>Yes</string>
<key>UseKernelCache</key>
<string>Yes</string>
</dict>
</plist>
- Rebuild kernelcache:-
sudo touch /System/Library/Extensions
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches
That's everything.
Internal LCD will display with weird colors but external monitor connected to VGA or HDMI will be perfect.
About This Mac:-


Internal LCD works:-
External monitor connected to HDMI port:-
Externel monitor connected to eGPU HDMI port:-
System Information report:-
Edited by kizwan, 07 May 2012 - 11:24 AM.