Jan
24
2009

Installing the Open Toolchain on Ubuntu Studio

I have just installed the ‘Open Toolchain’ for iPhoneOS 2.x on Ubuntu Studio, using the recently revised script by Jay Freeman (saurik). In fact it was more than recent. During the install, Jay helped me out with some errors I ran into, and made some further refinements to the script. We managed to get his script to install a working toolchain without much effort. Thus, this script should now be an even easier way to set up the toolchain. Almost a one-click install, really.

The first thing to do, of course, is to get the script and put it somewhere on your filesystem. I just saved it to my desktop (tip: make sure your desktop is clean before you begin, so you can easily see what stuff gets downloaded, it also makes it easier to clean up your desktop afterwards). The second thing is to see if you have enough free space left on your filesystem. During the entire process some 6 GB (!) is needed. Don’t worry, most can be deleted after install. The actual toolchain is much smaller than that. Open it in your browser and save it, or do something like:
cd ~mkdir iptc ; cd iptc

Then get the script:

wget http://svn.saurik.com/repos/menes/trunk/iphone/iptc.sh

First make sure that the script has proper permissions to be executed:

chmod 777 iptc.sh

Then to run it, the usage is:

./iptc.sh <adc-username> <adc-password>

You should fill in the username (usually an email address) and password that you also use for the Apple Developer Connection where you would normally get the free iPhone SDK (NB: you also have to accept some terms at Apple’s open / public source code archives to gain access; do so by visiting the site in your browser first if you haven’t done so before, otherwise the script will not be able to download some needed files). So you do something like:

username@ubuntu:~/Desktop/iptc$ ./iptc.sh address@provider.com password

If there are any packages missing, the script will politely prompt you to install them. For example, I was missing the package “xar”:

please install xar

So you quickly fix that by installing it, e.g. doing

username@ubuntu:~/Desktop/iptc$ sudo apt-get install xar

(I also had to do the same thing for the package “xml2″; do the same thing for any package you are missing if the script asks you to do so).

The script will download all needed resources, unpack them where necessary (even the Mac OS X .dmg images are automatically decrypted using some routines of planetbeing’s awesome Xpwn), and perform it’s magic, so you end up with  a /sys folder inside the folder from which you ran the script, which should now be a full sysroot. Yay!

Now, let’s move that folder to a more sensible place:

username@ubuntu:~/Desktop/iptc$ sudo mv /home/username/Desktop/sys ~/

And then we can clean up a bit: nothing except for that /sys folder is needed any longer, so we can delete the entire folder we created earlier (”iptc” or whatever you called the folder from which you ran the script) and now contains the huge downloads, plus decrypted and converted images. Neither do we need the script itself anymore. So let’s delete the whole folder from the desktop:

cd ..

sudo chown username iptc

rm -Rf iptc

(NB: use the “rm -Rf” bit with extreme caution, do not make typo’s there! Since -R is recursive, and f stands for force, it will remove everything in the path. If the path is accidentally wrong, like / for system root, it will delete your entire filesystem. You do not want that to happen…)

For completeness: these are the files I had left after moving the /sys folder out of ~/Desktop/iptc, and should be safe to delete (you can always download them again if you’d need them):

  • /afw
  • /apl
  • /bin
  • cookies.txt
  • iPhone1,1-2.2.img
  • iPhone1,1-2.2.ipsw
  • /iPhoneSDK-2.2
  • iPhoneSDK-2.2.dmg
  • iPhoneSDK-2.2.img
  • iPhoneSDK-2.2.pkg
  • iptc.sh
  • /src
  • /MacSDK-10.5
  • MacSDK-10.5.pkg
 by: PiMP | in: How-To's | Tags: , | Views: 2,493 | Rating: 1(/1)

Rate: DownUp 1 (/1) Loading ... Loading ...

No Comments »

 RSS feed for comments on this post.  TrackBack URL.

Leave a Comment

PiMPMiPhone.info