GalaxyS3I9300Build » History » Revision 8
Revision 7 (Wolfgang Wiedmeyer, 05/07/2017 07:32 PM) → Revision 8/12 (Wolfgang Wiedmeyer, 05/07/2017 07:44 PM)
h1. Galaxy S 3 (I9300) Build
This page explains how to build Replicant for the Galaxy S 3 (I9300).
h2. Prerequisites
Before building, you must make sure that:
* You have installed the build dependencies: [[BuildDependenciesInstallation]]
* You have downloaded Replicant 6.0 sources: [[ReplicantSourceCode]]
* Your sources are up to date: [[ReplicantSourceCode#DownloadingUpdating-the-source-code|Downloading/Updating the source from the repos]]
* Your terminal is running in the directory where the sources were downloaded
h2. Warning
*Do not build as root, always build as user.*
h2. Building
All of the following build commands need to be run in the source tree root folder.
First, the toolchain needs to be built:
<pre>
./vendor/replicant/build-toolchain
</pre>
*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.*
Then, prepare the shell environment for the Replicant build:
<pre>
. build/envsetup.sh
lunch replicant_i9300-userdebug
</pre>
Start the build:
<pre>
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
make -j$parallel_tasks bacon
</pre>
The -jn argument is to indicate the number of parallel tasks during the build.
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@.
Finally, sign the resulting images:
<pre>
./vendor/replicant/sign-build i9300
</pre>
The first time you run the script, it will ask you a few questions that are needed to generate the necessary signing keys.
h2. Output files
The produced files are located at:
* built target images: @out/dist/i9300/@
* built host tools: @out/host/linux-x86/bin/@