Android OS Forum banner

1 - 20 of 376 Posts

·
Premium Member
Joined
·
662 Posts
If you have built using my script before PLEASE download and run this script! http://fzservers.com/clean.sh

How to build your own CyanogenMod 7:

Install the Build Packages

Install using the package manager of your choice:

For 32-bit & 64-bit systems:

Code:
git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:

Code:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.

NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
Code:
add-apt-repository "deb [URL=http://archive.canonical.com/]http://archive.canonical.com/[/URL] maverick partner"
Create the Directories

You will need to set up some directories in your build environment.

To create them:

Code:
mkdir -p ~/bin<br />
mkdir -p ~/android/system
Install the Repository

Code:
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo<br />
chmod a+x ~/bin/repo<br />
PATH=~/bin:$PATH
Now enter the following to initialize the repository:

Code:
cd ~/android/system/<br />
repo init -u [URL=git://github.com/ProTekk/android.git]git://github.com/ProTekk/android.git[/URL] -b gingerbread<br />
repo sync -j16
Copy proprietary files

Code:
git clone [URL=git://github.com/koush/proprietary_vendor_htc.git]git://github.com/koush/proprietary_vendor_htc.git[/URL] ~/android/system/vendor/htc
Download RomManager

NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.

Download RomManager which is needed by the build:

Code:
cd ~/android/system/device/htc/mecha<br />
~/android/system/vendor/cyanogen/get-rommanager
Check for updates

First, check for updates in the source:

Code:
cd ~/android/system/<br />
repo sync
Configure Build & Compile

Now, the environment must be configured to build and the ROM compiled, from code, for the Thunderbolt.

Code:
. build/envsetup.sh && brunch mecha
Now for the lazy people who don't want to type all that crap:

Download and run the clean script: http://fzservers.com/clean.sh

Then download and run the new script: http://fzservers.com/newmecha.sh

You can do whatever you like while it runs. If you have never created a CyanogenMod repo on your local system then go out to dinner, grab some coffee, call your mother or do something time consuming because this will be a LONG wait depending on your Internet connection. The build will run as soon as the script sets everything up and again it is LOOOONG depending on the performance of your system.

Everything will be located in
Code:
~/android/system
Once it's done you can locate the flashable .zip in the "out" directory of your CyanogenMod repo. Happy crackflashing to all!
 

·
Digital Jedi
Joined
·
347 Posts
First off, my initial response is, "AWESOME!!!"

Now, for a few questions. First, is the RIL upstream? That is to say, will these builds work fine with the MR2 without issue? And Second, Do we run your script each time we wish to build, or should we go through the standard steps (build environment, mecha && brunch)?

Again, thank you! As soon as I get back to my build-machine, I look forward to testing this.

All the best,

-HG
 

·
Premium Member
Joined
·
662 Posts
HalosGhost said:
First off, my initial response is, "AWESOME!!!"

Now, for a few questions. First, is the RIL upstream? That is to say, will these builds work fine with the MR2 without issue? And Second, Do we run your script each time we wish to build, or should we go through the standard steps (build environment, mecha && brunch)?

Again, thank you! As soon as I get back to my build-machine, I look forward to testing this.

All the best,

-HG
MR2+ only and no it's not upstream. If you get the chance, look inside the script and you'll see that the script is pulling the files needed from Slayher's Git to allow the RIL to work. You will want to run the script every time since it will always pull the newest and most up to date sources that are available.

Oh, also, the script won't go through the repo init every time either. The script looks to see if the directory you specified for the CM repo exists and if it does it attempts to sync with the mainline then it continues on to download the freshest sources from Slayher and builds.
 

·
Lurker
Joined
·
111 Posts
Code:
mkdir -p ~/bin<br />
curl [URL=http://android.git.kernel.org/repo]http://android.git.kernel.org/repo[/URL] > ~/bin/repo<br />
chmod a+x ~/bin/repo<br />
from omfgb tutorial was required for me to even begin syncing otherwise kept getting errors otherwise its working on my Virtual Machine and syncing now will update on if it builds and boots.
 

·
Premium Member
Joined
·
662 Posts
Discussion Starter · #6 ·
"z0mbiexx said:
mkdir -p ~/bin
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo

from omfgb tutorial was required for me to even begin syncing otherwise kept getting errors otherwise its working on my Virtual Machine and syncing now will update on if it builds and boots.
Aha! Thank you for pointing that out! Totally forgot about that.

Sent from my ThunderBolt using RootzWiki Forums
 

·
Lurker
Joined
·
111 Posts
edit.
played with the internet connection settings on my VM and manually ran the CM Repo command got my e-mail and name setup and now the script seems to work as it should. :_con:
 

·
Average Android
Joined
·
93 Posts
Forgive my newbness, but what advantages does this give to your average user? Does it basically allow you to create your own cm7 rom with the stock applications/packages that you choose?
 

·
I am The reason you are theming
Joined
·
691 Posts
Code:
If all was successful, we can now attempt a build<br />
No previous builds found, beginning new build now<br />
./mecha.sh: line 147: build/envsetup.sh: No such file or directory
can i just pull the one from the cm7 repo? or do i need a tbolt specific envsetup.sh ?
 

·
Average Android
Joined
·
201 Posts
When I try to install some of the core packages, it can never find gcc-4.3-multilib or g++-4.3-multilib. Did this back when I was going to attempt to build OMGB too.. Am I missing a repo or something here?
 

·
Lurker
Joined
·
111 Posts
Code:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory<br />
compilation terminated.<br />
make: *** [out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o] Error 1<br />
make: *** Waiting for unfinished jobs....<br />
host C++: libhost <= build/libs/host/pseudolocalize.cpp<br />
In file included from /usr/include/features.h:388:0,<br />
                 from /usr/include/stdlib.h:25,<br />
                 from build/tools/acp/acp.c:11:<br />
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory<br />
compilation terminated.<br />
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1<br />
In file included from /usr/include/features.h:388:0,<br />
                 from /usr/include/c++/4.5/x86_64-linux-gnu/32/bits/os_defines.h:39,<br />
                 from /usr/include/c++/4.5/x86_64-linux-gnu/32/bits/c++config.h:275,<br />
                 from /usr/include/c++/4.5/string:40,<br />
                 from build/libs/host/include/host/pseudolocalize.h:4,<br />
                 from build/libs/host/pseudolocalize.cpp:1:<br />
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory<br />
compilation terminated.<br />
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1<br />
error i get when compiling the build.
 

·
Supporting Member
Joined
·
147 Posts
bgill55 said:
Code:
If all was successful, we can now attempt a build<br />
No previous builds found, beginning new build now<br />
./mecha.sh: line 147: build/envsetup.sh: No such file or directory
can i just pull the one from the cm7 repo? or do i need a tbolt specific envsetup.sh ?
I'm getting the same error, Did you try the one from the cm7 repo?
 

·
Android Beginner
Joined
·
6 Posts
tanknspank said:
When I try to install some of the core packages, it can never find gcc-4.3-multilib or g++-4.3-multilib. Did this back when I was going to attempt to build OMGB too.. Am I missing a repo or something here?
If you are on 11.04 ubuntu try gcc-4.5-multilib or g++-4.5-multilib instead of 4.3.
 

·
Registered
Joined
·
2,199 Posts
tanknspank said:
When I try to install some of the core packages, it can never find gcc-4.3-multilib or g++-4.3-multilib. Did this back when I was going to attempt to build OMGB too.. Am I missing a repo or something here?
If you're running 64bit these packages don't exist. It'll build fine.
 

·
Android Apprentice
Joined
·
60 Posts
Thanks so much for building and publishing the script/documentation.

I was thinking maybe hack the script a bit to move the out.zip into dropbox folder with date stamp, get the dropbox public url and tweet it out with twidge.
Code:
<br />
# buildfile=cm7-unofficial-$(date +%m-%d-%Y).zip<br />
# dropbox start<br />
# mv out.zip ~/Dropbox/Public/$buildfile<br />
# dropboxurl=`dropbox puburl ~/Dropbox/Public/$buildfile`<br />
# twidge update "CM7 Build ready at $dropboxurl"<br />
 
1 - 20 of 376 Posts
Top