GenericReplicant60Build » History » Revision 6
« Previous |
Revision 6/10
(diff)
| Next »
Denis 'GNUtoo' Carikli, 10/20/2019 08:56 PM
Build Replicant 6.0¶
This page explains how to build Replicant 6.0 for supported devices.
Prerequisites¶
Before building, you must make sure that:- You have installed the build dependencies: Replicant 6.0 build dependencies installation
- You have downloaded Replicant 6.0 sources: ReplicantSourceCode
- Your sources are up to date: Downloading/Updating the source from the repos
- Your terminal is running in the directory where the sources were downloaded
Warning¶
Do not build as root, always build as user.
See the build tips if you are facing issues.
Before building¶
- On Debian stretch, building the toolchain will fail. See Replicant60BuildTips for how to workaround that and make the build succeed.
Building¶
All of the following build commands need to be run in the source tree root folder.
Building the toolchain¶
First, the toolchain needs to be built for replicant 6. To do that open a new shell and run the following command:
./vendor/replicant/build-toolchain
Building a Replicant image for a device¶
Once the toolchain has been built, we can now open a new shell and prepare it for building a Replicant image for a device. To prepare the current shell, run the following command:
. build/envsetup.sh
You will then need select the device you want to build for.
To do that, you can use the following table to find the command you need to type to select the device you want to build for:
Command | Device(s) |
---|---|
lunch replicant_i9100-userdebug | Galaxy S 2 (I9100) |
lunch replicant_i9300-userdebug | Galaxy S 3 (I9300) |
lunch replicant_i9305-userdebug | Galaxy S 3 4G (I9305) |
lunch replicant_n7000-userdebug | Galaxy Note (N7000) |
lunch replicant_n7100-userdebug | Galaxy Note 2 (N7100) |
lunch replicant_maguro-userdebug | Galaxy Nexus (I9250) |
lunch replicant_espresso3g-userdebug | Galaxy Tab 2 7.0 (P3100) |
Galaxy Tab 2 10.1 (P5100) | |
lunch replicant_espressowifi-userdebug | Galaxy Tab 2 7.0 Wi-Fi (P3110) |
Galaxy Tab 2 10.1 Wi-Fi (P5110) | |
lunch replicant_n5100-userdebug | Galaxy Note 8.0 (N5100) |
lunch replicant_n5110-userdebug | Galaxy Note 8.0 Wi-Fi (N5110) |
For instance to build for the Galaxy S3 (I9300) you need to type the following command:
lunch replicant_i9300-userdebug
When this is done you can start the build:
parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) make -j$parallel_tasks bacon
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.$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.
Finally, you will need to sign the resulting images for replicant 6.
To do that, you can use the following table to find the command you need to type sign the images for the device you are building for:
Command | Device(s) |
---|---|
./vendor/replicant/sign-build i9100 | Galaxy S 2 (I9100) |
./vendor/replicant/sign-build i9300 | Galaxy S 3 (I9300) |
./vendor/replicant/sign-build i9305 | Galaxy S 3 4G (I9305) |
./vendor/replicant/sign-build n7000 | Galaxy Note (N7000) |
./vendor/replicant/sign-build n7100 | Galaxy Note 2 (N7100) |
./vendor/replicant/sign-build maguro | Galaxy Nexus (I9250) |
./vendor/replicant/sign-build espresso3g | Galaxy Tab 2 7.0 (P3100) |
Galaxy Tab 2 10.1 (P5100) | |
./vendor/replicant/sign-build espressowifi | Galaxy Tab 2 7.0 Wi-Fi (P3110) |
Galaxy Tab 2 10.1 Wi-Fi (P5110) | |
./vendor/replicant/sign-build n5100 | Galaxy Note 8.0 (N5100) |
./vendor/replicant/sign-build n5110 | Galaxy Note 8.0 Wi-Fi (N5110) |
For instance for the Galaxy S 3 (I9300) you need to type the following command:
./vendor/replicant/sign-build i9300
The first time you run the script, it will ask you a few questions that are needed to generate the necessary signing keys.
Output files¶
For the built host tools, the produced files are at: out/host/linux-x86/bin/
For the built target images, you can use the following table to find the directory that has the produced files:
Output directory | Device(s) |
---|---|
out/dist/i9100/ | Galaxy S 2 (I9100) |
out/dist/i9300/ | Galaxy S 3 (I9300) |
out/dist/i9305/ | Galaxy S 3 4G (I9305) |
out/dist/n7000/ | Galaxy Note (N7000) |
out/dist/n7100/ | Galaxy Note 2 (N7100) |
out/dist/maguro/ | Galaxy Nexus (I9250) |
out/dist/espresso3g/ | Galaxy Tab 2 7.0 (P3100) |
Galaxy Tab 2 10.1 (P5100) | |
out/dist/espressowifi/ | Galaxy Tab 2 7.0 Wi-Fi (P3110) |
Galaxy Tab 2 10.1 Wi-Fi (P5110) | |
out/dist/n5100/ | Galaxy Note 8.0 (N5100) |
out/dist/n5110/ | Galaxy Note 8.0 Wi-Fi (N5110) |
For instance, for the Galaxy S 3 (I9300), the built target images are in out/dist/i9300/
Updated by Denis 'GNUtoo' Carikli about 5 years ago · 6 revisions