Posts mit dem Label Chameleon werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Chameleon werden angezeigt. Alle Posts anzeigen

Sonntag, 11. Oktober 2009

8.) [10.6] Install Mac OS X

Time to install Mac OS X 10.6. Shutdown your PC. Connect the prepared harddisk. Insert the prepared Chameleon USB-Stick. Power on the PC and enter the BIOS setup. Verify all the BIOS settings as explained here. Save and Exit the BIOS setup.

Chameleon should boot from the USB-Stick and presents you this screen. I've enabled some debug output for. You can disable these debug outputs if you have successfully installed OS X and system is up and running.

Hit ENTER to boot the Mac OS X 10.6 Install DVD (restored to HD). You will see some debug messages from Chameleon.

Hit any key to continue booting OS X. It will boot in verbose mode.

After some time you can see the Mac OS X Installer. Follow the Installer.

Select the Partiton "Mac OS X" as install target. You can click on "Customize" to customize your OS X installation.

Time for a cup of coffee...

At the End you will see this Error. Ignore it! The installtion went fine. Just restart.

Once again in Chameleon. You will see two bootable Installation now. Select "Mac OS X" with the cursor keys (right/left) as show in the photo and hit ENTER.

Once again the Chameleon debug messages. Hit any key to continue...

Now you will see the Mac OS X Welcome Video Clip...

... and some additional steps to complete the installation process.

Finally the Mac OS X 10.6 Desktop.

If you have a working Internet connection, then OS X will check and download (in background) all available software updates. Go on and install all... it's safe to do ;-)

After one final restart you are done. Congratulations!!!

Samstag, 10. Oktober 2009

7.) [10.6] Setup the Chameleon USB-Stick

Finally the last step before you can start installing Mac OS X. I will show you how to setup the Chameleon USB-Stick. You need a Hardware UUID and must download this stuff as mentioned already here:
  1. Chameleon 2.0 RC3 (Chameleon-2.0-RC3-r658-bin.tar.gz)
  2. Kernel extensions and Chameleon support files (Link)
Insert the Chameleon USB-Stick you have prepared in step "6.) [10.6] Prepare the Chameleon USB-Stick" and save the two downloaded files on the Chameleon USB-Stick. To get rid of the "com.apple.quarantine" extended attribute launch the Terminal and run the following commands (the shell prompt is blue, the commands you have to enter are green):
[~] > cd /Volumes/Chameleon/
[/Volumes/Chameleon] > xattr -d com.apple.quarantine Chameleon_Support_Files.zip
[/Volumes/Chameleon] > xattr -d com.apple.quarantine Chameleon-2.0-RC3-r658-bin.tar.gz

Double Click each downloaded file so that the Finder will extract the content. This should give you the following files on the USB-Stick:


Adapt the Chameleon USB-Stick according to your hardware. Modify the Extra/smbios.plist as explained already here:
  • SMboardmanufactor: the mainboard manufactor
  • SMboardproduct: the mainboard type
  • SMmemmanufacter_X: the memory manufactor
  • SMmempart_X: the memory part number
  • SMmemserial_X: the memory serial number
  • SMmemspeed: the memory speed in Mhz
  • SMmemtype: the memory type DDR2=19, DDR3=24
Replace the Extra/DSDT.aml file with the patched DSDT for your mainboard. Configure the UUID you are going to use by modifying the kernel extensions Extra/10.5/Extensions/UUID.kext and Extra/10.6/Extensions/PlatformUUID.kext with right-click with the mouse and select "Show Package Content". Then edit the file Content/Info.plist in each kernel extension. Insert/Replace the UUID for the "key/value" UUID-key (10.5: UUID.kext) and PlatformUUID (10.6: PlatformUUID.kext).

10.5 UUID.kext/Content/Info.plist
   <key>CFBundleIdentifier</key>
<string>com.free.driver.UUID</string>
<key>IOClass</key>
<string>UUID</string>
<key>IOMatchCategory</key>
<string>UUID</string>
<key>IOProviderClass</key>
<string>IOPlatformExpertDevice</string>
<key>IOResourceMatch</key>
<string>SMBIOS</string>
<key>UUID-key</key>
<string>00000000-0000-1000-8000-001FD02E7359</string>

10.6 PlatformUUID.kext/Content/Info.plist
   <key>CFBundleIdentifier</key>
<string>com.superhai.driver.PlatformUUID</string>
<key>IOClass</key>
<string>PlatformUUID</string>
<key>IOMatchCategory</key>
<string>PlatformUUID</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
<key>PlatformUUID</key>
<string>00000000-1008-1000-8000-001FD02E7359</string>
You must also configure the cpu type you are going to use for your hackintosh in the CPUInjector.kext. If you also have a Intel Quad Core CPU, then you can leave it as it is, because it's preconfigured to use a Quad Core CPU. If not read this post and edit Info.plist of the CPUInjector kernel extensions and replace the value for cpu-type with the one for your CPU. Use the Base64 encoded value.

CPUInjector.kext/Content/Info.plist
   <key>IOProviderClass</key>
<string>IOPlatformDevice</string>
<key>entriesToAdd</key>
<dict>
<key>cpu-type</key>
<data>
AQU=
</data>
</dict>

To install Chameleon on the USB-Stick you must find out which disk identifier is used for your USB-Stick. In the still open Terminal run this command:
[/Volumes/Chameleon] > diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *465.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS MacOS X 400.9 Gi disk0s2
3: Microsoft Basic Data BOOTCAMP 64.6 Gi disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *930.9 Gi disk1
1: Apple_partition_map 31.5 Ki disk1s1
2: Apple_HFS asere 930.9 Gi disk1s2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.9 Gi disk2
1: Apple_HFS Chameleon 1.8 Gi disk2s1
The command "diskutil list" list all disks and all of their partitions. In my case the disk identifier is "disk2" (marked red). The device is /dev/disk2 an the partition is /dev/disk2s1. Please use for all upcoming terminal commands your disk identifier! It could be different than mine. I will continue using disk2.

Now let's install Chameleon. Run these commands in the Terminal and do not forget to use your disk identifier. First you must remount the USB-Stick to get rid of the "noowners", "nosuid" and "nodev" mount options as explained already here:
[/Volumes/Chameleon] > cd
[~] > sudo -s
Password:
root [~] > sync
root [~] > umount -f /Volumes/Chameleon/
root [~] > mkdir temp
root [~] > mount_hfs /dev/disk2s1 temp
root [~] > mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local)
fdesc on /dev (fdesc, union)
/dev/disk0s3 on /Volumes/BOOTCAMP (ntfs, local, read-only, noowners)
map -hosts on /net (autofs, automounted)
map auto_home on /home (autofs, automounted)
/dev/disk1s2 on /Users/asere (hfs, local, nodev, nosuid, journaled)
/dev/disk2s1 on /Users/asere/temp (hfs, local)
The mount command shows you that the USB-Stick (/dev/disk2s1) is mounted to temp without the "noowners", "nosuid" and "nodev" options. Now set the owner and group of all files and directories in the Chameleon Extra folder to root:wheel (0:0):
root [~] > cd temp
root [~/temp] > chown -R 0:0 Extra
Finally it's time to install Chameleon. Please note the "r" before the disk identifier. Using "rdisk" isn't a typo:
root [~/temp] > cp Chameleon-2.0-RC3-r658-bin/i386/boot .
root [~/temp] > chmod 755 boot
root [~/temp] > dd if=Chameleon-2.0-RC3-r658-bin/i386/boot1h of=/dev/rdisk2s1
2+0 records in
2+0 records out
1024 bytes transferred in 0.004469 secs (229138 bytes/sec)
root [~/temp] > fdisk -f Chameleon-2.0-RC3-r658-bin/i386/boot0 -u -y /dev/rdisk2
root [~/temp] > cd
root [~] > sync
root [~] > umount -f temp
root [~] > rmdir temp
Congratulations! You are done and can remove the USB-Stick now to install Mac OS X 10.6.

Dienstag, 6. Oktober 2009

6.) [10.6] Prepare the Chameleon USB-Stick

Put your USB-Stick in any MAC you have and start Disk Util (Application -> Utilities -> Disk Utility).
  1. Start Disk Utility
  2. Select the USB-Stick itself as show in the photo (do not select a partition on the stick).
  3. Select Partition
  4. Under Volume Scheme select 1 Partition
  5. Click "Options" and in the Options sheet select "GUID Partition Scheme"
  6. Choose a Name without spaces (I used Chameleon)
  7. Choose Format "Mac OS Extended" (this allows you do modify the stick under Linux)
  8. Click "Apply"
  9. DONE (it should look like in the foto)

Freitag, 25. September 2009

2.) [10.6] What do you need

You will need the following to successfully install Mac OS X 10.6:
  • Mac OS X 10.6 "Snow Leopard" Installation DVD (the Upgrade DVD works fine)
  • Access to a working Mac to restore the Install DVD to a HD
  • A HardDisk to install "Snow Leopard" on it
  • A cheap and bootable USB-Stick to install Chameleon on it
  • Chameleon 2.0 RC3 (Link)
  • some Kernel extensions and Chameleon support files (Link)
  • a patched DSDT for your mainboard/BIOS-version
  • Ubuntu LiveCD (Link)
  • optional another free HardDisk/Partition/USB-Stick to restore the OS X Install DVD on it
You will also need a unique Hardware UUID. Wikipedia has more general info about UUIDs. The easiest way to make a UUID is to use the ethernet mac address of the onboard ethernet port of your mainboard. The Hardware UUID looks like this:

00000000-1008-1000-8000-001FD02E7359

My ethernet mac address is 00:1f:d0:2e:73:59. Replace the red part with your ethernet mac address. You can find it out using the Ubuntu LiveCD. Open a Terminal an issue the following command:
ubuntu@ubuntu:~$  ifconfig
eth0 Link encap:Ethernet HWaddr 00:1f:d0:2e:73:59
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21f:d0ff:fe2e:7927/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:394 errors:0 dropped:0 overruns:0 frame:0
TX packets:266 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:451298 (451.2 KB) TX bytes:29571 (29.5 KB)
Interrupt:251 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)
Search the HWaddr for the interface eth0 (marked red). This is the ethernet mac address to use for the UUID.

Dienstag, 15. September 2009

Mac OS X 10.6.1 and Chameleon 2.0 RC3 are out

I know... this isn't really a news anymore, but a good starting point for the upcoming Chameleon + Snow Leopard guide. Chameleon 2.0 RC3 provides Snow Leopard support and some other new features. More info on the Chameleon Project Homepage.

I have Mac OS X 10.6.1 already up and running, using a Chameleon 2.0 RC3 USB-Stick.


Donnerstag, 6. August 2009

Mac OS X 10.5.8 is out

Last night Apple has released Mac OS X 10.5.8. I did an automatic update via Apple Software Update (165MB). The update itself went fine without any problems.

I'm running Mac OS X 10.5.8 and Chameleon 2.0 RC2 now and have no issues so far:
  • Sleep/Wakeup/Restart/Shutdown is working
  • TimeMachine is working
  • Bonjour is working
  • Ethernet is working
  • full resolution graphic with CI/QE is working

Dienstag, 28. Juli 2009

How to enable/use the new Features of Chameleon 2.0 RC2

I had some problems to find out how to enable and use the new features of Chameleon 2.0 RC2. These options are hidden in the Installer and not enabled by default. Push the Customize button and open Options:



Selecting one of these options will make an entry in the com.apple.Boot.plist file located in the Extra folder. Here is the result if you select all the options.

Extra/com.apple.Boot.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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></string>
<key>UHCIreset</key>
<string>y</string>
<key>GUI</key>
<string>n</string>
<key>GraphicsEnabler</key>
<string>y</string>
<key>ForceWake</key>
<string>y</string>
<key>ForceHPET</key>
<string>y</string>
<key>EthernetBuiltIn</key>
<string>y</string>
<key>EHCIacquire</key>
<string>y</string>
</dict>
</plist>


To use the new dynamic configuration features of Chameleon 2.0 RC2 you must delete the device-properties in your com.apple.Boot.plist. The device-properties you had made with EFIStudio.

Update: Unfortunately the new features are not working for me. Chameleon detects my nVidia 7300 GT graphic card and the 2 onboard ethernet chips, but after booting Mac OS X I only have VESA graphic and the ethernet ports are not built-in. Here is a screenshot of the Chameleon debug output:


Maybe I will find some time to dig into the Chameleon source code to fix this bug. I already compiled Chameleon and it worked, so I could start debugging. For the time being I will stay with my "old" Chameleon RC1 com.apple.Boot.plist:
<?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></string>
<key>Default Partition</key>
<string>hd(1,2)</string>
<key>Legacy Logo</key>
<string>Yes</string>
<key>Timeout</key>
<string>3</string>
<key>device-properties</key>
<string>ea02000001000000030000003f0000000100000002010c00d041030a0100000001010600041c0101060000007fff0400160000006200750069006c0074002d0069006e0000000500000001600200000d00000002010c00d041030a010000000101060000010101060000007fff04000e0000004e00560050004d0000002000000001000000000000000000000000000000000000000000000000000000220000005600520041004d002c0074006f00740061006c00730069007a006500000008000000000000101c0000006400650076006900630065005f00740079007000650000000f0000004e5644412c506172656e740e0000006e0061006d00650000000b000000646973706c617922000000400030002c006400650076006900630065005f00740079007000650000000b000000646973706c617922000000400031002c006400650076006900630065005f00740079007000650000000b000000646973706c6179100000006d006f00640065006c0000001a0000006e5669646961204765466f726365203733303020475420000000400031002c0063006f006d00700061007400690062006c00650000000e0000004e5644412c4e564d616314000000400030002c006e0061006d0065000000120000004e5644412c446973706c61792d4114000000400031002c006e0061006d0065000000120000004e5644412c446973706c61792d4220000000400030002c0063006f006d00700061007400690062006c00650000000e0000004e5644412c4e564d6163100000004e00560043004100500000001800000004000000000003000c00000000000007000000001e00000072006f006d002d007200650076006900730069006f006e0000002e0000006e5669646961204765466f7263652037333030204754204f70656e474c20456e67696e65205b4546495d3f0000000100000002010c00d041030a0100000001010600051c0101060000007fff0400160000006200750069006c0074002d0069006e0000000500000001</string>
</dict>
</plist>

Update 2: The autodetection is working, but this new Chameleon feature needs teh value UID=0 for the PCI-root-device PCI0. Unfortunately all Gigabyte mainboards I has seen so far are using the value UID=1. This can be fixed by patching the DSDT (change is marked green):
Scope (\_SB)
{
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
Method (_STA, 0, NotSerialized)
{
Return (0x0B)
}
}

Device (PCI0)
{
Name (_HID, EisaId ("PNP0A03"))
Name (_ADR, 0x00)
Name (_UID, 0x00)
Name (_BBN, 0x00)
Method (_S3D, 0, NotSerialized)

Chameleon 2.0 RC2 is out

Exiting news! Chameleon 2.0 RC2 is released. Build number is 640. This new version has many bug fixes and also some really cool features. These features are:
  • dynamic nVidia Graphic Card detection
  • setting the "built-in" flag for onboard ethernet (TimeMache Fix)
  • hiding of non-bootable HFS partitions
  • automatic RAID booting
You can download the Installer Package, the binaries and even the source code on the Chameleon Project Homepage.

Donnerstag, 16. Juli 2009

20.) ACPI DSDT Table (Differentiated System Description Table)

I started diving into all this wired ACPI / DSDT stuff. The ACPI-Spec has more than 700 pages! Part of the ACPI is the DSDT. DSDT is an acronym for Differentiated System Description Table. This table contains the Differentiated Definition Block, which supplies the information and configuration information about the base system. Here are some useful link to start reading:
  1. ACPI - Advanced Configuration and Power Interface
  2. Linux/ACPI - DSDT: Overview
  3. HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.)
  4. ACPI Downloads (eg. iASL Compiler/Disassembler, Source)
  5. DSDT Patcher - InsanelyMac Forum (contains Mac OS X iASL binary)
Each mainboard, even different BIOS version, has it's own DSDT. All Information I'm giving you here in this Blog is specific to the Gigabyte GA-EP45-DS3 mainboard with BIOS version F9. Your DSDT might look very similar and the patches/fixes/solutions should be done in a similar way, but I cannot guarantee this.

I managed to get, disassemble, compile the DSDT. I had to fix some errors in the DSDT, which is very common if you use the Intel iASL Compiler. Seems that the Microsoft Compiler is not so piggy and almost all mainboard makers using the Microsoft Compiler for their ACPI stuff. After this very first steps I started to modify the DSDT. I modified the RTC and the HPET section to make AppleRTC.kext and AppleIntelCPUPowerManagement.kext work. After that I could delete Disabler.kext from the Extra/Extensions folder of the Chameleon USB-stick. Great, isn't it!

To start working with DSDT you need the DSDT of your mainboard and an ASL Compiler/Disassembler like the iASL. You can download the tools from the InsanelyMac forum or here. These are tools for Mac OS X. Windows and Linux versions are also available in the net.

How to obtain the DSDT. Under Mac OS X run the script getDSDT.sh in the Terminal:
admin@MacBook [~/Downloads/Tools] > ls -la
total 1160
drwxr-xr-x@ 4 admin staff 136 Jul 16 18:20 .
drwx------+ 38 admin staff 1292 Jul 16 18:20 ..
-rwxr-xr-x@ 1 admin staff 252 Nov 2 2008 getDSDT.sh
-rwxr-xr-x@ 1 admin staff 587968 Oct 25 2008 iasl
admin@MacBook [~/Downloads/Tools] > ./getDSDT.sh
admin@MacBook [~/Downloads/Tools] > ls -la
total 1208
drwxr-xr-x@ 5 admin staff 170 Jul 16 18:20 .
drwx------+ 38 admin staff 1292 Jul 16 18:20 ..
-rw-r--r-- 1 admin staff 23454 Jul 16 18:20 dsdt.dat
-rwxr-xr-x@ 1 admin staff 252 Nov 2 2008 getDSDT.sh
-rwxr-xr-x@ 1 admin staff 587968 Oct 25 2008 iasl
It gives you the file dsdt.dat, which is the compiled DSDT. Under Linux it's even much easier. Issue "cat /proc/acpi/dsdt > dsdt.aml" and you have the compiled DSDT. Don't get the DSDT under an EFI-X™ controlled Mac, because it might be already modified/patched in some way. Use a Linux Live-CD (Ubuntu) or Chameleon without a DSDT in the Extra folder. Now disassemble the compiled DSDT:
admin@MacBook [~/Downloads/Tools] > ./iasl -d dsdt.dat

Intel ACPI Component Architecture
AML Disassembler version 20080926 [Oct 4 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

Loading Acpi table from file dsdt.dat
Acpi table [DSDT] successfully installed and loaded
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
...............................
Parsing completed
Disassembly completed, written to "dsdt.dsl"
Now you can open the file "dsdt.dsl" with your favorite editor, but take care to save it as plain text. But first I will check whether I can compile the original DSDT without errors and warnings:
admin@MacBook [~/Downloads/Tools] > ./iasl -ta dsdt.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080926 [Oct 4 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

dsdt.dsl 222: Method (\_WAK, 1, NotSerialized)
Warning 1080 - ^ Reserved method must return a value (_WAK)

dsdt.dsl 285: Store (Local0, Local0)
Error 4050 - ^ Method local variable is not initialized (Local0)

dsdt.dsl 290: Store (Local0, Local0)
Error 4050 - ^ Method local variable is not initialized (Local0)

ASL Input: dsdt.dsl - 5683 lines, 189412 bytes, 2339 keywords
Compilation complete. 2 Errors, 1 Warnings, 0 Remarks, 661 Optimizations
As you can see I got 2 errors and 1 warning. The original Gigabyte DSDT is buggy. The error 4050 can be fixed very easy. Actually Store(Local0, Local0) means nothing but a NOP. It stores the content of the local variable Local0 into Local0. The problem is, that Local0 is not initialized. Change it to for instance Store ("Local0", Local0) or Store(Zero, Local0). The warning 1080 comes out because the _WAK method must return a value. ACPI-spec 7.3.7 defines a return of a package with 2 integers. So inserting Return (Package (0x02) {Zero, Zero}) will fix the warning. Returning Zero is not critical, even Apple returns Zero in their DSDTs. All fixes are colored green
Method (_WAK, 1, NotSerialized)
{
...

If (OSFL)
{
Notify (\_SB.PWRB, 0x02)
}
Else
{
If (LEqual (RTCW, Zero))
{
Notify (\_SB.PWRB, 0x02)
}
}

Notify (\_SB.PCI0.USB0, Zero)
Notify (\_SB.PCI0.USB1, Zero)
Notify (\_SB.PCI0.USB2, Zero)
Notify (\_SB.PCI0.USB3, Zero)
Notify (\_SB.PCI0.USB4, Zero)
Notify (\_SB.PCI0.USB5, Zero)
Return (Package (0x02)
{
Zero,
Zero
})

}

Scope (_SI)
{
Method (_MSG, 1, NotSerialized)
{
Store (Zero, Local0)
}

Method (_SST, 1, NotSerialized)
{
Store (Zero, Local0)
}
}

Now lets compile the fixed DSDT:
admin@MacBook [~/Downloads/Tools] > ./iasl -ta dsdt.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080926 [Oct 4 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

ASL Input: dsdt.dsl - 5686 lines, 188406 bytes, 2340 keywords
AML Output: dsdt.aml - 18151 bytes, 661 named objects, 1679 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations

No warnings, no errors. Fine! You can download the fixed DSDT for my Gigabyte GA-EP45-DS3 mainboard here. To get AppleIntelCPUPowerManagement.kext and AppleRTC working, the devices HPET, RTC and TMR must be modified. The device order in my DSDT is TMR, HPET and RTC.

For the TMR device patch the method _CRS to return ATT6 (ResourceTemplate without IRQNoFlags:
Device (TMR)
{
Name (_HID, EisaId ("PNP0100"))
Name (ATT5, ResourceTemplate ()
{
IO (Decode16,
0x0040, // Range Minimum
0x0040, // Range Maximum
0x00, // Alignment
0x04, // Length
)
IRQNoFlags ()
{0}
})
Name (ATT6, ResourceTemplate ()
{
IO (Decode16,
0x0040, // Range Minimum
0x0040, // Range Maximum
0x00, // Alignment
0x04, // Length
)
})
Method (_CRS, 0, NotSerialized)
{
Return (ATT6)
}
}
For the HPET device patch method _CRS to return ATT3 (ResourceTemplate with IRQNoFlags) and method _STA to return 0x0f:
Device (HPET)
{
Name (_HID, EisaId ("PNP0103"))
Name (ATT3, ResourceTemplate ()
{
IRQNoFlags ()
{0}
IRQNoFlags ()
{8}
Memory32Fixed (ReadWrite,
0xFED00000, // Address Base
0x00000400, // Address Length
)
})
Name (ATT4, ResourceTemplate ()
{
})
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}

Method (_CRS, 0, NotSerialized)
{
Return (ATT3)
}
}
For the RTC device patch method _CRS to return ATT1 (ResourceTemplate without IRQNoFlags):
Device (RTC)
{
Name (_HID, EisaId ("PNP0B00"))
Name (ATT0, ResourceTemplate ()
{
IO (Decode16,
0x0070, // Range Minimum
0x0070, // Range Maximum
0x00, // Alignment
0x04, // Length
)
IRQNoFlags ()
{8}
})
Name (ATT1, ResourceTemplate ()
{
IO (Decode16,
0x0070, // Range Minimum
0x0070, // Range Maximum
0x00, // Alignment
0x04, // Length
)
})
Method (_CRS, 0, NotSerialized)
{
Return (ATT1)
}
}
Save and then compile it:
admin@MacBook [~/Downloads/Tools] > ./iasl -ta dsdt.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080926 [Oct 4 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

ASL Input: dsdt.dsl - 5631 lines, 186571 bytes, 2312 keywords
AML Output: dsdt.aml - 18040 bytes, 661 named objects, 1651 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 31 Optimizations
Put the resulting compiled DSDT "dsdt.aml" in the Extra folder of the Chameleon USB-stick. You are now safe to remove Disabler.kext from the Extra/Extensions folder. Don't forget to rebuild Extensions.mkext. Download the final DSDT here.

Mittwoch, 8. Juli 2009

17.) System Management BIOS

My Chameleon-EFI Mac already works perfectly for me, but there are still some cosmetic issues, like the Serialnumber or the information about the installed memory. This can be adjusted with a file called smbios.plist in the Extra folder of the Chameleon USB-stick. The values in this property-list defines the hardware on which Mac OS X is running. You will find more information about the SMBIOS in Wikipedia here. Mine smbios.plist looks like this:



The values "SMexternalclock" and "SMmaximalclock" will be set by Chameleon automatically with the real values. As I know these values are the only important ones, but thanks to Chameleon you don't have to care about it. I selected a Mac Pro for the values in smbios.plist because this Mac is very close to my PC.


Montag, 6. Juli 2009

Time Machine

I will give you now some info the problem with non working Time Machine.

Time Machine is a very user friendly and easy to use Backup solution from Apple. The backup it takes, is connected to Computer which made the backup. You cannot use a TM-backup from Computer "A" to restore something on Computer "B". To identify the Computer TM uses the Ethernet-MAC-address of the built-in Ethernet. Every MAC-address is globally unique and every MAC from Apple has ethernet, so it can be used to identify a computer, if the ethernet port is built-in. An exchangeable PCI-card, like the Netgear GA311, does not help, because the card can be removed (loosed MAC-address) or changed (another, different MAC-address). So TM only works if it can find an internal, built-in ethernet port.

This was exactly the I got from TM. It couldn't find any built-in ethernet port, although the two Realtek 8111C are onboard and hence built-in. For some reason Mac OS X does not detect the as built-in. I don't known how Apple detects their own ethernet as built-in.

I flagged the first onboard ethernet port as built-in using device-properties in the Chameleon com.apple.Boot.plist. I made this device-property with EFIStudio. See here.

16.) [10.5] Reboot and DONE!

Now it's time for the last reboot. After the reboot all should work fine. Full resolution graphic with CI/QE, fullspeed ethernet network, Time Machine and Bonjour. As you can see in the first foto, my Chameleon-EFI Mac could see my MacBook Pro via Bonjour. Gigabit ethernet to/from my Linux-NAS work as expected with speeds around 60-80 MByte/sec.











Samstag, 4. Juli 2009

13.) [10.5] com.apple.Boot.plist

To have a full resolution graphic card with working CI/QE (Core Image/Quartz Extreme) and a working Time Machine you must provide the Mac OS X onboard drivers with some info about your hardware. This is done by Chameleon and the com.apple.Boot.plist file in the Extra folder of your USB-Stick. Chameleon will inject the device properties which you already have created with EFIStudio into the Mac OS X kernel. The advantage of this approach is, that you don't have to modify your Mac OS X Installation. It remains plain vanilla and this is important for Software updates through Apple's Software Update Application.

You can find the original Mac OS X com.apple.Boot.plist under:
/Library/Preferences/SystemConfiguration/com.apple.Boot.plist

It's almost empty. Use it as a template for your new Chameleon com.apple.Boot.plist. It looks like this:



Copy it to your Desktop. Be careful to NOT move it! Copy it (hold the ALT key while drag-n-drop). Open the copy from the Desktop with your favorite Editor. You must at least add the device properties from EFIStudio. Mine has 2 additional parameters: Default Partition and Timeout. These two are for Chameleon to automatically boot from the right Disk/Partition. Chameleon counts disk starting from 0 and counts partitions starting from 1. Adjust hd(x,y) and the timeout value. Propertylist are XML and have Key-Value pairs. For instance to adjust the Chameleon Bootscreen timeout value find the Key Timeout and change (in the next line) the value (mine is 10). OK the most important things are the device properties. Add the key device-properties and in the next line between "string" and "/string" your device properties in HEX in only ONE line. Mine appears wrapped, but this is due to my editor. If you are done the com.apple.Boot.plist should look like this (but with different values):



Save it in plain text mode (apply Shift-Cmd-T in Textedit) and copy it as com.apple.Boot.plist into the Extra folder of your Chameleon-USB-Stick.

12.) [10.5] First Boot into Mac OS X

Now it's time for the first boot into Mac OS X. Put in your Chameleon USB-Stick an power on the PC. The Chameleon bootloader should welcome you with a similar Welcome screen:



Select the Disk with your Mac OS X Installtion (cursor keys) and hit ENTER. If you hit Cursor down Chameleon will present you a Menu to boot, for instance, in verbose mode.

If all went fine you will see your Mac OS X Desktop or Login Window. It will come up in one Vesa Graphic Mode. Mine came up in 1024x768 (no CI/QE). Login, unzip EFIStudio.zip to (for instance) your Desktop and start it.

Select Display and your Graphic Card from the list. Mine is a nVidia 7300 GT passiv with 256MB RAM. And click "Add Device"



EFIStudio will open this window with all the details of your Graphic card:



You can close the window. Go ahead an select "Ethernet" and "Add Device". Note the device in the list is your graphic card:



EFIStudio will open this window with all the details of your Graphic card and with one property for your ethernet:



The onboard ethernet will get the property "built-in" and this will make Time Machine happy. I going to explain this later in detail. Now you must save the device properties created by EFIStudio. At least click on "Save Hex" and save it to the Desktop. You must put this device properties in Hexmode in a special file called com.apple.Boot.plist. If you have saved the Hexdata you can close the window. EFIStudio lists now 2 devices, the graphic card and the ethernet controller with their device path. You can close EFIStudio now.

Sonntag, 28. Juni 2009

10.) [10.5] Install remaining kernel extensions

  1. Insert the EFIBOOT USB-Stick
  2. Open a new Finder window and select the USB-Stick
  3. Make sure a the folder Extra/Extensions exists
  4. If not create a new Folder Extensions under Extra
  5. Copy all downloaded kernel extensions into EFIBOOT/Extra/Extensions
The folder Extension now should contain:
  1. AppleDecrypt.kext
  2. Disabler.kext
  3. OpenHaltRestart.kext
  4. RealtekR1000.kext
Copy also the EFIStudio.zip to the root of your USB-Stick. You will need it after first boot with Chameleon.

9.) [10.5] Install Chameleon

Now I will guide you through the Chameleon installation process onto your USB-Stick.
  1. Insert the prepared USB-Stick
  2. Start the downloaded Chameleon-2.0-rc431.pkg (double click it)
The Installer will welcome you...


Continue until Installation Type and click on "Change Install Location"...


Select the EFIBOOT USB-Stick...


Click "Continue"...


Click on "Customize"...


Deselect all but "Themes" and click "Install". The installer will ask you for the Administrator password. Provide it and follow until the end. That's all.

7.) [10.5] Preparations

First of all you need a working installation of Mac OS X 10.5.7.

For the first steps do not use your working installation from your EFI-Mac. Something could go wrong and you could loose all your data.

Make a clean and fresh installation from scratch on a separate hardisk. I made it this way. You can also try a new installation a timemachine backup (Mac OS X DVD Installer -> Menu).

Download the following stuff:
Find a USB-Stick. 128MB should be enough. Mine has 512MB. It's a Kingston DataTraveler.

4.) Chameleon 2.0 Bootloader







This is a really great piece of software. It works like a charm, it looks nice, you can customize it and it is OpenSource...

Further Information, the binary installer and even the source-code is available at the Chameleon Homepage.

3.) How it work's

My solution is based on Chameleon Bootloader. Really a great piece of software!

After having installed and setup your USB-Stick, you can use it like the original EFI-X™.

And the best thing of all is the very limited HCL (Hardware compatibility list) of EFI-X™. All EFI-X™ users share a very common hardware. So very little adoptions / modifications should be necessary. Mainly sound and graphic related.