NexusOneBuild » History » Revision 18
Revision 17 (Paul Kocialkowski, 10/08/2011 12:42 PM) → Revision 18/19 (Paul Kocialkowski, 02/05/2012 02:55 PM)
h1. Nexus One h2. Build This explains how to build Replicant for the Nexus One. h2. Prerequisites Before building, dependencies Make sure you must make sure: * You have installed the [[BuildDependencies]] * You have downloaded Replicant 2.2 or Replicant 2.3 sources: [[GettingReplicantSources]] * Your sources are up to date: [[GettingReplicantSources#DownloadingUpdating-the-source-from-the-repos|Downloading/Updating the source from the repos]] * You are in the directory where the sources were downloaded [[BuildDependencies]]. h2. Warning *Do not build as root, always build as user.* h2. Building Setup Get and install the repo tool <pre> mkdir bin cd bin wget http://android.git.kernel.org/repo chmod a+x repo cd .. </pre> Get replicant 2.2 <pre> mkdir replicant-2.2 cd replicant-2.2 ../bin/repo init -u git://gitorious.org/replicant/manifest.git -b replicant-2.2 ../bin/repo sync </pre> h2. Each time you want to build environment: replicant 2.2 <pre> cd ~/replicant-2.2 ../bin/repo sync source build/envsetup.sh lunch replicant_passion-eng export ANDROID_JAVA_HOME=$JAVA_HOME </pre> Start the build: lunch replicant_passion-eng <pre> parallel_tasks=$(echo make -j$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) make -j$parallel_tasks distimages #uses arguments like -j9 to speed up build in case of multi-core cpu </pre> <pre> <pre> You will find your built images in ./out/target/product/passion/. The -jn argument is You will also find fastboot, needed to indicate install the number of parallel tasks during the build. You can remove it from the command line images, in ./out/host/linux-x86/bin/. Now you are ready to have only one task at a time. With fast hardware, best results will come with @-j9@, @-j16@ and @-j32@. h2. Output files Find the produced files: * built target images: @out/target/product/passion/@ * built host tools: @out/host/linux-x86/bin/@ "install!":http://trac.osuosl.org/trac/replicant/wiki/Installation