SDKBuild » History » Version 7
Paul Kocialkowski, 02/05/2012 02:59 PM
| 1 | 7 | Paul Kocialkowski | h1. SDK Build |
|---|---|---|---|
| 2 | 1 | Denis 'GNUtoo' Carikli | |
| 3 | 7 | Paul Kocialkowski | This explains how to build Replicant SDK. |
| 4 | 1 | Denis 'GNUtoo' Carikli | |
| 5 | 7 | Paul Kocialkowski | h2. Prerequisites |
| 6 | 1 | Denis 'GNUtoo' Carikli | |
| 7 | 7 | Paul Kocialkowski | Before building, you must make sure: |
| 8 | * You have installed the [[BuildDependencies]] |
||
| 9 | * You have downloaded Replicant sources for the SDK version you want: [[GettingReplicantSources]] |
||
| 10 | * Your sources are up to date: [[GettingReplicantSources#DownloadingUpdating-the-source-from-the-repos|Downloading/Updating the source from the repos]] |
||
| 11 | * You are in the directory where the sources were downloaded |
||
| 12 | |||
| 13 | h2. Warning |
||
| 14 | |||
| 15 | *Do not build as root, always build as user.* |
||
| 16 | |||
| 17 | h2. Building |
||
| 18 | |||
| 19 | Setup the build environment: |
||
| 20 | 1 | Denis 'GNUtoo' Carikli | <pre> |
| 21 | source build/envsetup.sh |
||
| 22 | export ANDROID_JAVA_HOME=$JAVA_HOME |
||
| 23 | </pre> |
||
| 24 | 7 | Paul Kocialkowski | |
| 25 | Start the build: |
||
| 26 | <pre> |
||
| 27 | parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) |
||
| 28 | make -j$parallel_tasks sdk |
||
| 29 | </pre> |
||
| 30 | |||
| 31 | The -jn argument is to indicate the number of parallel tasks during the build. |
||
| 32 | You can remove it from the command line to have only one task at a time. With fast hardware, best results will come with @-j9@, @-j16@ and @-j32@. |
||
| 33 | |||
| 34 | h2. Output files |
||
| 35 | |||
| 36 | Find the produced files: |
||
| 37 | * built SDK: @out/host/linux-x86/sdk/@ |
||
| 38 | * built host tools: @out/host/linux-x86/bin/@ |