Compiling Chameleon – A Newbie’s HowTo

In this tutorial , we’ll be exploring on how to compile your very own Chameleon. I’ll try to be bit more straight forward. The reason why I am writing this is that I just want folks to know on how to compile Chameleon and its my part on showing on how I made Empire EFI. Yep , thats right folks. I’ll be also teaching you on how to update Chameleon. 2-in-1 !

Shall we ? Uh okay I’m ready whenever you’re.

Note : I’ll be making this a recipe instead 😛

More after the jump 😛

Baking Chameleon (no not the real ones , the boot loader you silly :P)

Ingredients :-

  • Apple’s XCode (which could be found in your Snow Leopard Retail Disc or you may obtain the latest version from here (requires registration but its free)
  • Chameleon source code or PC_EFI source code. For this tutorial I’ll be using Chameleon RC4 Source Code , which you can obtain from here

Directions :-

1. Firstly fire up Terminal

2. Place the extracted source code into Macintosh HD (root of your OSX Drive) and call the folder as chameleon.

3. Next up in Terminal type cd /Chameleon and then type make clean (this is just to make sure that the binaries which were compiled before are cleaned). You can ignore the second part but its generally safe to do especially if you’re going to use someones modified source code or patched chameleon releases

Screen shot 2010-01-04 at 9.59.05 PM
Click to have a larger view if you are not sure on how its done

4. Now its time for us to put our chameleon in the oven and cook it. Be sure to pre-heat the oven before you do it. Now embrace yourself – We’re going to compile Chameleon. To do this , type “make embedtheme” (without quotes) – what this does basically is that it compiles Chameleon with Theme support. if you do not want to have theme and you would prefer the traditional looks of a boot loader (aka boring black and white text – something like GRUB sans GUI) – then simply type “make” (without quotes)

Click to have a larger view if you are not sure on how its done

Wait for a while. This process can take anywhere from 1 minute to 5 minutes – depending on your processor speed , the amount of RAM you have , the number of background processes you’ve running. If you would like to reduce the time (especially on a slower CPU) – be sure to close all other programs. For a fast processor such as a Intel  Core 2 Quad  or Intel Core i7 , it should be pretty fast . It took me around 1 minute and 35 seconds on my Pentium D 3.00Ghz

5. Once that is gone , go to your Chameleon folder , and navigate to sym and i386 , you should see your binaries compiled there. You may now update your boot loader if you wish. If you’re using EFI Partition , you may mount it and replace it. If chameleon is installed in the primary drive , then you may replace it. Its pretty simple actually. Thats it , you’re done. You’ve compiled your very own Chameleon. You should be proud of yourself now !

Go and grab the cake that you want it. No , the cake is not a lie. I am not joking ! (Read below if you want to know how to replace/update your chameleon)

(Optional) How to apply patches to Chameleon (thanks dalton of insanelywind)

From time to time , a lot of people (developers) would submit community patches. This patches could be found in forums such as InsanelyMac or sometimes over at Vodooo Projects. Some of this patches don’t make it to official chameleon boot loader revision because of variety of reasons. Suppose if you want to apply a patch to spice up your chameleon boot loader , you may do this by grabbing a .patch file or .diff and place it in the same folder as your chameleon sources

Then in terminal type this

patch -p0 < patch-file-name-here

Replace patch-file-name-here with the name of the patch file and it will patch it up for you. Be sure to run make clean after applying the patch 😛

(Optional) To replace your boot loader (assuming if you’ve used myhack or Official Chameleon Installer)

1. In Terminal Type the following commands. I’ll explain on what they do

defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder

What it does is that the first command tells the “system registry” that for the application Finder , it should reveal all of its hidden files. The second command (as you’ve guessed it) , kills Finder. No dont worry , it will re-load back. Now this time you have the ability to see hidden files

2. You’ll see a file called boot in the root of your drive. Now , simply rename it or move it to another location (to back it up) and put your newly compiled boot file to it. You may also overwrite it if you wish

3. Reboot ! (optionally you may want to hide hidden files , just simply change the FALSE TO TRUE )

Furthering your understanding

The reason why we’ll be needing Xcode is that it contains the compiler and other stuff needed for us to cook it up. This guide is meant for people to customise chameleon , for instance if Chameleon graphics injector shows your card as unknown nvidia. You could edit the source code and put your device name inside.

15 thoughts on “Compiling Chameleon – A Newbie’s HowTo”

  1. thanks man, I’ll have a proper look at this later. Your tutoraila are on nother level than most peoples

  2. Excellent tutorial man! Have you seen my diffs for removing the 2 debug messages that show up on normal boot. Thus giving a cleaner boot. The diffs I made don’t touch any of the other debug messages, that may actually be useful. They are over on the insanelywind.com/forum in the chameleon 2 RC4 thread.

  3. Hello Pradeesh,
    I have some basic questions which struck my mind as soon as I finished reading this tutorial.Why do I need to compile?When would I need this?
    You also mentioned about Apple’s XCode.Why is it needed?Where did you use it in compiling chameleon other than the place you mentioned above?
    Waiting for your answers….

  4. Pingback: Ivanov
  5. Hi.
    I’ve got a noob question,
    does it add up new hardware support? is there any more benefits to use this methood than just download the compiled bootloader from the site? Thanks!

  6. Sumi :Hello Pradeesh, I have some basic questions which struck my mind as soon as I finished reading this tutorial.Why do I need to compile?When would I need this? You also mentioned about Apple’s XCode.Why is it needed?Where did you use it in compiling chameleon other than the place you mentioned above? Waiting for your answers….

    It is helpful to know how to compile the sources so that you can customize it. For instance you are surfing the forums and find that someone tweaked the sources in a way you would also like, but they only left a diff. You would use the diff on the original sources and then compile.

    You need Xcode to manipulate the sources. Also if I remember correctly Xcode installs the command line tools used in Terminal to compile.

    @prasys
    Perhaps a tutorial for working diffs into the sources would be good. Most people who know how to handle diffs already know how to compile source…

  7. Pingback: PC repair

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge