GalaxyS2I9100Build » History » Version 8
Wolfgang Wiedmeyer, 05/07/2017 07:44 PM
a word
1 | 7 | Wolfgang Wiedmeyer | h1. Galaxy S 2 (I9100) Build |
---|---|---|---|
2 | 1 | Paul Kocialkowski | |
3 | 8 | Wolfgang Wiedmeyer | This page explains how to build Replicant for the Galaxy S 2 (I9100). |
4 | 7 | Wolfgang Wiedmeyer | |
5 | 1 | Paul Kocialkowski | h2. Prerequisites |
6 | |||
7 | 7 | Wolfgang Wiedmeyer | Before building, you must make sure that: |
8 | * You have installed the build dependencies: [[BuildDependenciesInstallation]] |
||
9 | * You have downloaded Replicant 6.0 sources: [[ReplicantSourceCode]] |
||
10 | * Your sources are up to date: [[ReplicantSourceCode#DownloadingUpdating-the-source-code|Downloading/Updating the source from the repos]] |
||
11 | * Your terminal is running in the directory where the sources were downloaded |
||
12 | |||
13 | h2. Warning |
||
14 | 1 | Paul Kocialkowski | |
15 | 7 | Wolfgang Wiedmeyer | *Do not build as root, always build as user.* |
16 | 1 | Paul Kocialkowski | |
17 | 7 | Wolfgang Wiedmeyer | h2. Building |
18 | 1 | Paul Kocialkowski | |
19 | 6 | Wolfgang Wiedmeyer | All of the following build commands need to be run in the source tree root folder. |
20 | |||
21 | First, the toolchain needs to be built: |
||
22 | 1 | Paul Kocialkowski | <pre> |
23 | 6 | Wolfgang Wiedmeyer | ./vendor/replicant/build-toolchain |
24 | </pre> |
||
25 | |||
26 | *If you have executed any of the commands below and you want to run the toolchain build again, you will need to open a new shell.* |
||
27 | |||
28 | Then, prepare the shell environment for the Replicant build: |
||
29 | |||
30 | <pre> |
||
31 | . build/envsetup.sh |
||
32 | 1 | Paul Kocialkowski | lunch replicant_i9100-userdebug |
33 | </pre> |
||
34 | |||
35 | 6 | Wolfgang Wiedmeyer | Now you can start the build: |
36 | |||
37 | 1 | Paul Kocialkowski | <pre> |
38 | 2 | Paul Kocialkowski | parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) |
39 | 1 | Paul Kocialkowski | make -j$parallel_tasks bacon |
40 | </pre> |
||
41 | |||
42 | 6 | Wolfgang Wiedmeyer | The @-jn@ argument indicates the number of parallel tasks during the build (you can remove it from the command line to have only one task at a time). |
43 | @$parallel_tasks@ holds an optimized number of parallel tasks for your hardware. You may want to reduce this number if e.g. the computer runs out of RAM during the build. |
||
44 | |||
45 | 1 | Paul Kocialkowski | Finally, sign the resulting images: |
46 | |||
47 | <pre> |
||
48 | 6 | Wolfgang Wiedmeyer | ./vendor/replicant/sign-build i9100 |
49 | </pre> |
||
50 | |||
51 | The first time you run the script, it will ask you a few questions that are needed to generate the necessary signing keys. |
||
52 | 5 | Paul Kocialkowski | |
53 | 7 | Wolfgang Wiedmeyer | h2. Output files |
54 | 5 | Paul Kocialkowski | |
55 | 7 | Wolfgang Wiedmeyer | The produced files are located at: |
56 | * built target images: @out/dist/i9100/@ |
||
57 | * built host tools: @out/host/linux-x86/bin/@ |