lunes, 13 de agosto de 2012

Building AOKP for the Nexus S

Building any AOSP variant for a Nexus device is pretty straightforward, as the device tree is already included by Goole and they are well tested & supported devices. In order to build AOKP (AOSP variant with some tweaks):

The source code is here (check the README below):
https://github.com/AOKP/vendor_aokp

First of, clone the whole code from git


mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u https://github.com/AOKP/platform_manifest.git -b jb

Then sync:

repo sync -j16

-jNN will speed up things for multicore - fast - connected build environments, BUT it may lock on Ubuntu because of its broken python impementation. To avoid this problem:



sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -j1

For building AOKP I prepare a handy script that set ups ccache (to speedup things) and builds for "crespo" that is Nexus S. This script might be on vendor/aokp/build.sh for instance:
export USER=alienmind
export USE_CCACHE=1
export CCACHE_DIR=/$HOME/.ccache
prebuilts/misc/linux-x86/ccache/ccache -M 40G
source build/envsetup.sh
lunch aokp_crespo-userdebug
make -j1 otapackage # bacon
#brunch $DEV
There are three build types:
BuildtypeUse
userlimited access; suited for production
userdebuglike "user" but with root access and debuggability; preferred for debugging
engdevelopment configuration with additional debugging tools

References:  http://source.android.com/source/building-devices.html

No hay comentarios:

Publicar un comentario