Android OS Forum banner
1 - 20 of 888 Posts

·
TeamWin
Joined
·
196 Posts
After great success with Fattire's build and learn project for the nookcolor, we'd like to continue with the touchpad.

This thread is a central location to discuss and work together to teach users how to build and compile CM9 from source.

The build guide is now located on the CM wiki: http://wiki.cyanogenmod.org/w/Build_for_tenderloin

Post here with any issues you're having and we'll try to get you up and running. Also, as things change we'll try to maintain this guide and this OP with the latest information!

Edit: See post 2 for information regarding applying patches and pulling unmerged changes to the cm repo

Edit2: See http://rootzwiki.com...post__p__424790 for information on compiling the latest kernel

Edit3: The bluez and fsck_msdos patch are merged into CM so no need to apply those anymore (2/19/12)

Edit4: See this post on how best to keep up to date: http://rootzwiki.com...post__p__519355

Edit 5: Redflea has created a very user friendly guide based on work from this thread, you can follow that here: http://goo.gl/nlxle

Edit 6: To get the most up-to-date fixes you'll need to apply these cherry picks AFTER doing a repo sync: https://github.com/T...enderloin-build <- make sure you check back before each time you build for changes.

Good luck!
 

·
Developer
Joined
·
88 Posts
A couple quick notes:

1. To apply a patch per the instructions, just copy the stuff after "project whatever" to a file. Let's call it whatever.patch. Now you cd into the project and type git apply whatever.patch and it should automatically apply the patches. Do this three times.

Example:

put this in a file called bluez.patch in ~/android/system

Code:
<br />
diff --git a/tools/Android.mk b/tools/Android.mk<br />
index 619ff1c..16de42f 100755<br />
--- a/tools/Android.mk<br />
+++ b/tools/Android.mk<br />
@@ -218,6 +218,7 @@ LOCAL_SHARED_LIBRARIES := \<br />
  libbluetooth libbluetoothd<br />
<br />
LOCAL_MODULE:=bccmd<br />
+LOCAL_MODULE_TAGS := optional<br />
<br />
include $(BUILD_EXECUTABLE)<br />
endif<br />
then

cd ~/android/system/external/bluetooth/bluez
git apply ~/android/system/bluez.patch

Done with the first one. Now do it for the others too.

2. After you've built successfully, be sure to check out CyanogenMod's code review system-- gerrit. Here you can see what has been recently merged into the codebase. More interestingly, you can see what people have been submitting for review. If there's something you want to try, you can actually test it by merging it into your code and building. It's a simple matter.

Let's say you want to try out this as yet-unmerged fix to surfaceflinger. This is just an example of something I found quickly that wasn't yet merged. You just do this:

  • So where it says Download in the middle of the screen, there's some instructions for you to highlight and copy. In this case, it looks like "git fetch http://review.cyanog...frameworks_base refs/changes/00/11900/1 && git checkout FETCH_HEAD" (sorry, rootz' bulletin board system actually puts some .... in the middle of the link. But you'll see the full command there.)
  • Alternatively, you can click the little icon to the right of those instructions and it will automatically go to your copy buffer.
  • Now go to the source code. cd to android/system. This patch affects android_frameworks_base (as you can see at the top of the gerrit description), so cd frameworks/base.
  • Now paste the command. You've just added the proposed change to your copy of the source code.
  • Go ahead and build. When you're done, the fix should be in. If everything worked alright, go sign up for gerrit and give a +1 vote to this proposed contribution.
  • Warning-- the next time you do a repo sync, you'll have these changes overwritten.
Being able to try cutting-edge features and improvements now is in your hands. You don't have to wait for a nightly build any more. You don't even need to wait for the code to be ACCEPTED into cyanogenmod! you can help test it and get these features before anyone else even knows about them. Just keep checking Gerrit.

Enjoy.
 

·
Supporting Member
Joined
·
61 Posts
Cool thanks. Was thinking about giving this a try on my nexus but a bit more daunting since its my phone... Trying it on my touchpad I haven't turned on in 3 months seems like a good option...
 

·
Registered
Joined
·
4 Posts
Set up a build environment in Virtualbox and got my first successful build! Now i'll always be up to date
What a great thread! Is Virtual Box a way to run Linux on windows? looking into it would I download the SDK or just the platform packages for keeping the builds out to date? Thanks, I'm a noob but have been curious about helping out and learning
 

·
Android Beginner
Joined
·
42 Posts
What a great thread! Is Virtual Box a way to run Linux on windows? looking into it would I download the SDK or just the platform packages for keeping the builds out to date? Thanks, I'm a noob but have been curious about helping out and learning
Yeah, you install Virtualbox in windows. Install Linux in a new virtual machine. You can then follow the instructions in the http://goo.gl/NtNOJ document to set up your environment in your new Linux virtual machine. I did have to do a little digging on google in order to get adb to work over the usb in the virtual machine.
I did not need to download the whole SDK, only the tools, so that adb would be installed. You will be downloading the source from the cyanogenmod github server.
 

·
Android Beginner
Joined
·
10 Posts
@eyeballer or fattire, can you update the build doc with a section on "how to include patches" yesterday I saw it in the comments but if too many people are viewing the doc it reports the following message "This doc is read-only because there are too many people editing right now. Try again Dismiss" when this happens the comments are not displayed.

Thanks Roger
 

·
TeamWin
Joined
·
196 Posts
Discussion Starter · #8 ·
@eyeballer or fattire, can you update the build doc with a section on "how to include patches" yesterday I saw it in the comments but if too many people are viewing the doc it reports the following message "This doc is read-only because there are too many people editing right now. Try again Dismiss" when this happens the comments are not displayed.

Thanks Roger
Hey Roger,

Yes, I'd noticed that yesterday, will update the main guide later today!
 

·
Registered
Joined
·
3 Posts
Set up a build environment in Virtualbox and got my first successful build! Now i'll always be up to date
Good Idea think i will give it a go on a VM . What flavour version of Linux did you go with and was it 32 or 63 bit ?

Thanks
 

·
Registered
Joined
·
304 Posts
Hi guys, just to confirm that Fattire instructions worked faultlessly 8)

just completed a build on a VM (x86 10.04) and all was fine. Installed on the TP and all up and running as before.
Shame the changes for the Charger and System UI were not checkin in the code.

Now is time to play 8)

I believe having access to the source would help to get CM9 to a solid state a lot faster than with CM7.
 

·
Android Beginner
Joined
·
10 Posts
If anyone is looking for the Charger and SystemUI fix it can be found in Darlingrin's OP under downloads HERE

Thanks Roger


Hi guys, just to confirm that Fattire instructions worked faultlessly 8)

just completed a build on a VM (x86 10.04) and all was fine. Installed on the TP and all up and running as before.
Shame the changes for the Charger and System UI were not checkin in the code.

Now is time to play 8)

I believe having access to the source would help to get CM9 to a solid state a lot faster than with CM7.
 

·
Android Beginner
Joined
·
10 Posts
It can be 32bit or 64bit I'm currently using Ubuntu 10.04 LTS 32bit.

Roger


Good Idea think i will give it a go on a VM . What flavour version of Linux did you go with and was it 32 or 63 bit ?

Thanks
 
  • Like
Reactions: Rob_G

·
Registered
Joined
·
304 Posts
If anyone is looking for the Charger and SystemUI fix it can be found in Darlingrin's OP under downloads HERE

Thanks Roger
Yeah, I was thinking about the changes in the code rather than the binaries, but is fine, took two minutes to apply them after the update.
 

·
Android Beginner
Joined
·
30 Posts
What USB driver did you guys use to get ADB working? Mine just shows up as "cm_tenderloin" and adb doesn't recognize it.
 

·
Android Beginner
Joined
·
42 Posts
What USB driver did you guys use to get ADB working? Mine just shows up as "cm_tenderloin" and adb doesn't recognize it.
I didn't need to specify a driver. I followed the instructions setting up udev on http://srackham.wordpress.com/2011/01/06/android-development-with-virtualbox-and-the-lg-p500-phone/ and it worked. I created the file that they said to create, but I didn't manually populate it with any device. Not sure if it auto populated. I'll take a look.
 

·
Android Beginner
Joined
·
30 Posts
I just checked Virtual box and it just lists "uknown cm_tenderloin[227]" as the usb device and I can get the VM to recognize it. Weird.
 

·
Registered
Joined
·
304 Posts
I just checked Virtual box and it just lists "uknown cm_tenderloin[227]" as the usb device and I can get the VM to recognize it. Weird.
do it through wifi,, enable wifi adb on the touchpad and then connect to it on the vm before runnit the get-propietary script
 
1 - 20 of 888 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top