As I sence a resergance in the desire to build ROMs from source, I decided to remake the HOW-TO. This is taken from the MTDEV website set up by g60madman. (Thanx Bra)
Developing can be adicting! It can also give you bags under your eyes, put an arch in your back, and give you carple tunnle syndrom. You have been warned!
Everything I put, in this post, into code boxes can be coppied and pasted. If I put it in a "notepad box" I am being more general and you will need to read what I am trying to get across. I can explain on later posts.
Some things to understand, if I use a dollar sign ($) it is run from the terminal as a normal user. If I use a pound sign (#) it is run from the root account.
First of all, all of my work is done on Ubuntu 10.04 64-bit desktop edition with a multi core and processor workstation with 8GB of RAM. It can be done on other versions of Linux, but I don't do it and will have trouble with helping you. I hope I don't need to help anybody setting the OS side of things.
After you set up the OS, you will need to prepare the system. Go to System->Administration->Software Sources. On the “Other Software” tab, check the box next to http://archive.canonical.com/ ubuntu lucid partner and close.
Now we can install the software to build and compile and whatnot.
Open a terminal. (ctrl + alt + t) and you will get a propt($).
We'll start with git. Git is a system for managing source codes that can work well in a bunch of way... anyway, we'll get to that.
This adds the repository so you can install it
You will need to enter your passwod from time to time.
Now that your repositories have been updated, you can proceed with installing the required packages.
Then you will need to install Java 6 JDK
Now you need to download the source for what you want to build.
First you will need to install "repo". It's a script that does a ton of work for you.
For that you need to make a directory for it under your account. I would highly recommend not working out of your ROOT account. It's very bad practice. Your propt should still be something like this[HIGH]user@computername~(current path)$[/HIGH]
the tilda (~) represents your home directory. Basicly /home/(user).
So make the directory
Then add the path to your variables
Sometimes this won't stick and you will need to modify your bash (the terminal you are working under) initiator script, .bashrc (the period os sopposed to be there). It's hidden from the gnome visability so if you are looking for it you will need to unhide it with (crtl + h). So at the bottom add [HIGH]export PATH=$PATH:/home/(user)/bin[/HIGH]
After setting that up
Now you have all of the tools. The next part depends on what you want to work with. I'll use CM7 as an example. Make a "working directory" and change to it
Initialize the directory
For CM7
For CM9
And then download all that source code
That part will take quite a while. I recommend doing it and going to bed.
When you wake up in the morning you should have no errors and will be able to build right away.
This sets up the enviroment and gets it running.
The "-j" part splits up the build into jobs for the system to run semi-simultaneously. The rest of that looks to see how many logicle processors you have and thus how many jobs the computer can run.
So there you have it. That should get things going. I hope people will ask lots of questions and we can hopefully move things along in 2013.
I don't know about you guys, but I like the monitor on my main rig, so I use Teamviewer to connect either with one of my computers or on my phone (Deving at work, WHAT!)
Enjoy!
Developing can be adicting! It can also give you bags under your eyes, put an arch in your back, and give you carple tunnle syndrom. You have been warned!
Everything I put, in this post, into code boxes can be coppied and pasted. If I put it in a "notepad box" I am being more general and you will need to read what I am trying to get across. I can explain on later posts.
Some things to understand, if I use a dollar sign ($) it is run from the terminal as a normal user. If I use a pound sign (#) it is run from the root account.
First of all, all of my work is done on Ubuntu 10.04 64-bit desktop edition with a multi core and processor workstation with 8GB of RAM. It can be done on other versions of Linux, but I don't do it and will have trouble with helping you. I hope I don't need to help anybody setting the OS side of things.
After you set up the OS, you will need to prepare the system. Go to System->Administration->Software Sources. On the “Other Software” tab, check the box next to http://archive.canonical.com/ ubuntu lucid partner and close.
Now we can install the software to build and compile and whatnot.
Open a terminal. (ctrl + alt + t) and you will get a propt($).
We'll start with git. Git is a system for managing source codes that can work well in a bunch of way... anyway, we'll get to that.
Code:
sudo add-apt-repository ppa:git-core/ppa
Code:
sudo apt-get update
Now that your repositories have been updated, you can proceed with installing the required packages.
Code:
sudo apt-get install git gnupg flex bison gperf build-essential
sudo apt-get install curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs
sudo apt-get install pax11proto-core-dev libx11-dev lib32z-dev
sudo apt-get install libgl1-mesa-dev g++-multilib mingw32 tofrodos
sudo apt-get install python-markdown libxml2-utils xsltproc
sudo apt-get install zip lib32readline5-dev
Code:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
sudo apt-get install schedtool
First you will need to install "repo". It's a script that does a ton of work for you.
For that you need to make a directory for it under your account. I would highly recommend not working out of your ROOT account. It's very bad practice. Your propt should still be something like this[HIGH]user@computername~(current path)$[/HIGH]
the tilda (~) represents your home directory. Basicly /home/(user).
So make the directory
Code:
mkdir ~/bin
Code:
PATH=~/bin:$PATH
After setting that up
Code:
curl [URL="https://dl-ssl.google.com/dl/googlesource/git-repo/repo"][COLOR=#0066cc]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/COLOR][/URL] > ~/bin/repo
chmod a+x ~/bin/repo
Code:
mkdir cm7
cd cm7
Code:
repo init -u [URL="https://github.com/MTDEV-CM7/cm7.git"][COLOR=#0066cc]https://github.com/MTDEV-CM7/cm7.git[/COLOR][/URL] -b cm7
Code:
repo init -u git://github.com/MTCM9/android.git -b ics
And then download all that source code
Code:
repo sync
When you wake up in the morning you should have no errors and will be able to build right away.
Code:
. build/envsetup.sh && brunch triumph -j'grep 'processor' /proc/cpuinfo | wc -l'
The "-j" part splits up the build into jobs for the system to run semi-simultaneously. The rest of that looks to see how many logicle processors you have and thus how many jobs the computer can run.
So there you have it. That should get things going. I hope people will ask lots of questions and we can hopefully move things along in 2013.
I don't know about you guys, but I like the monitor on my main rig, so I use Teamviewer to connect either with one of my computers or on my phone (Deving at work, WHAT!)
Enjoy!