[Nexus 4 Android Development] tackleberry_crash:
Tutorial...

Compile your own rom tutorial

Thanks trailblazerz11 for his work and help on this guide.

More experienced users please let me know if I am doing anything wrong and how to make it better.

I am a .NET developer so I had to learn a lot in a week or so :) Still not able use git as I would like to....

Set up CM build environment

CM wiki

I used the guide below to setup my environment collaboration with some parts of CM Wiki one ( I think latter one explained why you are doing what better )

[GUIDE] How to Properly Configure Ubuntu 12.10 64bit - Build Jellybean (All Variants)

My own build enviroment is running on Linux Mint 14 x64 Nadia. Setting up is same with Ubuntu 12.04 or 12.10 64 Bit

After setting up your build env. init your repo and do a;

repo sync

This is gonna take a long time, you know.

After repo syncs w/o any error.

Build you stock CM10.1 so you know everything is working before adding Linaro patches from github

source build/envsetup.sh

export USE_CCACHE=1

breakfast mako

brunch mako

Wait some more :good:

After a successful initial build you are sure that your local repo compiles fine an ready for applying linaro branches.

then;

Start a new branch called Linaro

repo start linaro --all

Git Clone roomservice.xml file in my local_manifest repo to ~/(where-your-cm-folder-is)/.repo/local_manifests -- You can overwrite the existing one...

You can either git clone roomservice.xml to the ~/(where-your-cm-folder-is)/.repo/local_manifests folder or you can just replace the contents with this;

enter

git clone https://github.com/TackleBerryCrash/local_manifests.git

or replace contents of the roomservice.xml with the following;

<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_lge_mako" path="device/lge/mako" remote="github" />
<project name="CyanogenMod/lge-kernel-mako" path="kernel/lge/mako" remote="github" revision="jellybean" />

<remove-project name="CyanogenMod/android_frameworks_base" />
<project name="TackleBerryCrash/android_frameworks_base" path="frameworks/base" revision="linaro" />

<remove-project name="CyanogenMod/android_build" />
<project name="TackleBerryCrash/android_build" path="build" revision="linaro" />

<remove-project name="CyanogenMod/android_external_busybox" />
<project name="TackleBerryCrash/android_external_busybox" path="external/busybox" revision="linaro" />

<remove-project name="CyanogenMod/android_external_chromium" />
<project name="TackleBerryCrash/android_external_chromium" path="external/chromium" revision="linaro" />

<remove-project name="CyanogenMod/android_external_dnsmasq" />
<project name="TackleBerryCrash/android_external_dnsmasq" path="external/dnsmasq" revision="linaro" />

<remove-project name="CyanogenMod/android_external_e2fsprogs" />
<project name="TackleBerryCrash/android_external_e2fsprogs" path="external/e2fsprogs" revision="linaro" />

<remove-project name="CyanogenMod/android_external_lsof" />
<project name="TackleBerryCrash/android_external_lsof" path="external/lsof" revision="linaro" />

<remove-project name="CyanogenMod/android_external_openssh" />
<project name="TackleBerryCrash/android_external_openssh" path="external/openssh" revision="linaro" />

<remove-project name="CyanogenMod/android_external_openssl" />
<project name="TackleBerryCrash/android_external_openssl" path="external/openssl" revision="linaro" />

<remove-project name="CyanogenMod/android_external_openvpn" />
<project name="TackleBerryCrash/android_external_openvpn" path="external/openvpn" revision="linaro" />

<remove-project name="CyanogenMod/android_external_ping" />
<project name="TackleBerryCrash/android_external_ping" path="external/ping" revision="linaro" />

<remove-project name="CyanogenMod/android_external_ping6" />
<project name="TackleBerryCrash/android_external_ping6" path="external/ping6" revision="linaro" />

<remove-project name="CyanogenMod/android_external_skia" />
<project name="TackleBerryCrash/android_external_skia" path="external/skia" revision="linaro" />

<remove-project name="CyanogenMod/android_external_stlport" />
<project name="TackleBerryCrash/android_external_stlport" path="external/stlport" revision="linaro" />

<remove-project name="CyanogenMod/android_external_v8" />
<project name="TackleBerryCrash/android_external_v8" path="external/v8" revision="linaro" />

<remove-project name="CyanogenMod/android_external_webkit" />
<project name="TackleBerryCrash/android_external_webkit" path="external/webkit" revision="linaro" />

<remove-project name="CyanogenMod/android_external_wpa_supplicant_8" />
<project name="TackleBerryCrash/android_external_wpa_supplicant_8" path="external/wpa_supplicant_8" revision="linaro" />

<remove-project name="CyanogenMod/android_frameworks_av" />
<project name="TackleBerryCrash/android_frameworks_av" path="frameworks/av" revision="linaro" />

<remove-project name="CyanogenMod/android_frameworks_ex" />
<project name="TackleBerryCrash/android_frameworks_ex" path="frameworks/ex" revision="linaro" />

<remove-project name="CyanogenMod/android_frameworks_native" />
<project name="TackleBerryCrash/android_frameworks_native" path="frameworks/native" revision="linaro" />

<remove-project name="CyanogenMod/android_frameworks_rs" />
<project name="TackleBerryCrash/android_frameworks_rs" path="frameworks/rs" revision="linaro" />

<remove-project name="CyanogenMod/android_frameworks_wilhelm" />
<project name="TackleBerryCrash/android_frameworks_wilhelm" path="frameworks/wilhelm" revision="linaro" />

<remove-project name="CyanogenMod/android_system_security" />
<project name="TackleBerryCrash/android_system_security" path="system/security" revision="linaro" />

<remove-project name="CyanogenMod/android_hardware_qcom_display-caf" />
<project name="TackleBerryCrash/android_hardware_qcom_display-caf" path="hardware/qcom/display-caf" revision="linaro" />

<remove-project name="CyanogenMod/android_libcore" />
<project name="TackleBerryCrash/android_libcore" path="libcore" revision="linaro" />

<remove-project name="CyanogenMod/android_external_bluetooth_bluedroid" />
<project name="TackleBerryCrash/android_external_bluetooth_bluedroid" path="external/bluetooth/bluedroid" revision="linaro" />

<remove-project name="CyanogenMod/android_external_oprofile" />
<project name="TackleBerryCrash/android_external_oprofile" path="external/oprofile" revision="linaro" />

<remove-project name="CyanogenMod/android_hardware_qcom_display" />
<project name="TackleBerryCrash/android_hardware_qcom_display" path="hardware/qcom/display" revision="linaro" />

<remove-project name="CyanogenMod/android_hardware_qcom_media" />
<project name="TackleBerryCrash/android_hardware_qcom_media" path="hardware/qcom/media" revision="linaro" />

<remove-project name="CyanogenMod/android_vendor_cm" />
<project name="TackleBerryCrash/android_vendor_cm" path="vendor/cm" revision="linaro" />

<remove-project name="CyanogenMod/android_frameworks_compile_libbcc" />
<project name="TackleBerryCrash/android_frameworks_compile_libbcc" path="frameworks/compile/libbcc" revision="linaro" />

<remove-project name="CyanogenMod/android_external_clang" />
<project name="TackleBerryCrash/android_external_clang" path="external/clang" revision="linaro" />

<remove-project name="CyanogenMod/android_bionic" />
<project name="TackleBerryCrash/android_bionic" path="bionic" revision="linaro" />

<remove-project name="CyanogenMod/lge-kernel-mako" />
<remove-project name="CyanogenMod/android_device_lge_mako" />
<project name="TackleBerryCrash/lge-kernel-mako" path="kernel/lge/mako" remote="github" revision="linaro" />
<project name="TackleBerryCrash/android_device_lge_mako" path="device/lge/mako" remote="github" revision="linaro" />

<project name="TackleBerryCrash/packages_apps_OTAUpdateCenter" path="packages/apps/OTAUpdateCenter" remote="github" revision="master" />

<remove-project name="CyanogenMod/android_packages_apps_Settings" />
<project name="TackleBerryCrash/android_packages_apps_Settings" path="packages/apps/Settings" revision="linaro" />
</manifest>

again do a repo sync this will pull the linaro patches to the linaro branch;

repo sync

Download and set up latest Linaro toolchain

http://www.linaro.org/downloads/ ---> Components, Android, Linaro 4.7 ICS/JB

Download the latest toolchain and copy the tar.bz2 file to /prebuilts/gcc/linux-x86/arm

Extract ( do not use GUI to extract, use the command below in terminal )

You'll get a folder named "android-toolchain-eabi", rename the folder to linaro-4.7, again make sure you are doing this in /prebuilts/gcc/linux-x86/arm folder

tar -xvjf android-toolchain-eabi-linaro-4.7-2013.02-01-3-2013-02-19_23-39-29-linux-x86.tar.bz2

Note: Name of the file changes with every new prebuilt so update the command above accordingly...

Just making sure all the projects are on linaro branch

repo forall -c git checkout linaro

CM Team just made some setting commits in frameworks_base repo yesterday morning. I had to pull these commits but since I pushed them to my frameworks_base you should be ok to build. Let me know if you hit an error 41 on settings jars. I can give you the code to pull from CM repo.

Clean up the OUT folder to be on the safe side since you have built a test build of CM10.1 after setting up the repo, just takes long to build - won't hurt to do -make clobber or clean (at least)-

have to do make clobber/clean depends on if changed any make files that can have system wide affects

I do make clobber once every 2-3 builds or if I see a make file commit.

make clobber - > Deletes all the OUT folder

make clean -> Deletes only Build folder

make clobber

or

make clean

then;

source build/envsetup.sh

export USE_CCACHE=1

breakfast mako

brunch mako

Wait.....