GTA04Build » History » Version 8
Paul Kocialkowski, 01/20/2014 05:37 PM
| 1 | 1 | Denis 'GNUtoo' Carikli | h1. GTA04 Build |
|---|---|---|---|
| 2 | |||
| 3 | This explains how to build Replicant for the GTA04. |
||
| 4 | |||
| 5 | h2. Prerequisites |
||
| 6 | |||
| 7 | Before building, you must make sure: |
||
| 8 | * You have installed the [[BuildDependencies]] |
||
| 9 | 8 | Paul Kocialkowski | * You have downloaded Replicant 2.3 or 4.0 sources: [[ReplicantSources]] |
| 10 | * Your sources are up to date: [[ReplicantSources#DownloadingUpdating-the-source-from-the-repos|Downloading/Updating the source from the repos]] |
||
| 11 | 1 | Denis 'GNUtoo' Carikli | * 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 | 7 | Paul Kocialkowski | h2. Building Replicant 4.0 |
| 18 | |||
| 19 | Setup the build environment: |
||
| 20 | <pre> |
||
| 21 | source build/envsetup.sh |
||
| 22 | lunch replicant_gta04-eng |
||
| 23 | export ANDROID_JAVA_HOME=$JAVA_HOME |
||
| 24 | </pre> |
||
| 25 | |||
| 26 | Start the build: |
||
| 27 | <pre> |
||
| 28 | parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) |
||
| 29 | make -j$parallel_tasks bootimage |
||
| 30 | make -j$parallel_tasks bootloaderimage |
||
| 31 | make -j$parallel_tasks systemtarball |
||
| 32 | </pre> |
||
| 33 | |||
| 34 | h2. Building Replicant 2.3 |
||
| 35 | 1 | Denis 'GNUtoo' Carikli | |
| 36 | Setup the build environment: |
||
| 37 | <pre> |
||
| 38 | source build/envsetup.sh |
||
| 39 | lunch replicant_gta04-eng |
||
| 40 | export ANDROID_JAVA_HOME=$JAVA_HOME |
||
| 41 | </pre> |
||
| 42 | |||
| 43 | Start the build: |
||
| 44 | 4 | Paul Kocialkowski | |
| 45 | h3. Building for µSD card storage |
||
| 46 | |||
| 47 | <pre> |
||
| 48 | parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) |
||
| 49 | make -j$parallel_tasks bootimage BOARD_SDCARD_INIT:=true |
||
| 50 | 6 | Paul Kocialkowski | make -j$parallel_tasks bootloaderimage |
| 51 | 4 | Paul Kocialkowski | make -j$parallel_tasks systemtarball |
| 52 | </pre> |
||
| 53 | |||
| 54 | h3. Building for NAND storage |
||
| 55 | |||
| 56 | 1 | Denis 'GNUtoo' Carikli | <pre> |
| 57 | parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) |
||
| 58 | make -j$parallel_tasks bootimage |
||
| 59 | 6 | Paul Kocialkowski | make -j$parallel_tasks bootloaderimage |
| 60 | 3 | Paul Kocialkowski | make -j$parallel_tasks systemimage |
| 61 | make -j$parallel_tasks userdataimage |
||
| 62 | 1 | Denis 'GNUtoo' Carikli | </pre> |
| 63 | |||
| 64 | The -jn argument is to indicate the number of parallel tasks during the build. |
||
| 65 | 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@. |
||
| 66 | |||
| 67 | h2. Output files |
||
| 68 | |||
| 69 | Find the produced files: |
||
| 70 | * built target images: @out/target/product/gta04/@ |
||
| 71 | * built host tools: @out/host/linux-x86/bin/@ |