Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * *
4 votes

[GUIDE] Build Your Own CM9 for Touchpad!

cm9 touchpad tenderloin build ics
  • Please log in to reply

OP eyeballer

eyeballer

TeamWin

Posted 18 January 2012 - 05:42 PM #1

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.cyanogen..._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!

Edited by eyeballer, 17 January 2013 - 06:54 PM.

  • 12 Likes
Posted Image Posted Image

fattire

fattire

Developer

Posted 18 January 2012 - 05:57 PM #2

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

diff --git a/tools/Android.mk b/tools/Android.mk
index 619ff1c..16de42f 100755
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -218,6 +218,7 @@ LOCAL_SHARED_LIBRARIES := \
  libbluetooth libbluetoothd

LOCAL_MODULE:=bccmd
+LOCAL_MODULE_TAGS := optional

include $(BUILD_EXECUTABLE)
endif

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.

Edited by fattire, 19 January 2012 - 12:46 PM.

  • 7 Likes

jaybert

jaybert

Supporting Member

  • 61 posts

Posted 19 January 2012 - 05:16 AM #3

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...
  • 0 Likes

Phil79

Phil79

Android Beginner

  • 42 posts

Posted 19 January 2012 - 05:34 AM #4

Set up a build environment in Virtualbox and got my first successful build! Now i'll always be up to date :android-smile:
  • 1 Likes

bit1

bit1

Average Android

  • 4 posts

Posted 19 January 2012 - 05:38 AM #5

Set up a build environment in Virtualbox and got my first successful build! Now i'll always be up to date :android-smile:


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
  • 0 Likes

Phil79

Phil79

Android Beginner

  • 42 posts

Posted 19 January 2012 - 05:45 AM #6

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.
  • 0 Likes

roger_n

roger_n

Android Beginner

  • 10 posts

Posted 19 January 2012 - 06:24 AM #7

@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
  • 0 Likes
Phone: AT&T Galaxy SII SkyRocket LTE SGH-i727
Build: Home-brewed PA v2.21 Unofficial CM10 RC0+
Build: Home-brewed Unofficial CM10+
Radio: UCLF6
ALWAYS CHECK MD5SUMS

OP eyeballer

eyeballer

TeamWin

Posted 19 January 2012 - 06:31 AM #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!
  • 2 Likes
Posted Image Posted Image

Rob_G

Rob_G

Average Android

  • 3 posts

Posted 19 January 2012 - 06:41 AM #9

Set up a build environment in Virtualbox and got my first successful build! Now i'll always be up to date :android-smile:


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
  • 0 Likes

Phil79

Phil79

Android Beginner

  • 42 posts

Posted 19 January 2012 - 07:29 AM #10

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


I believe it has to be 64 bit, but I could be wrong. Anyhow, I used Ubuntu 11.10 64 bit for my environment.

Edited by Phil79, 19 January 2012 - 07:29 AM.

  • 0 Likes