Project

General

Profile

KernelBuild » History » Version 7

Denis 'GNUtoo' Carikli, 02/03/2016 05:12 PM

1 1 Denis 'GNUtoo' Carikli
h1. KernelBuild
2
3 2 Denis 'GNUtoo' Carikli
h2. Use case
4
5
Building a kernel aside Replicant, is faster to setup and faster to build since you need to fetch and use the huge Android build system.
6
7
Users wanting to add a driver to their kernel, or developers that want to work on kernel related areas can do that to speed up the development process, however if the changes are integrated back into Replicant, they will automatically be built by the Android build system, when building images.
8
9 4 Denis 'GNUtoo' Carikli
h2. Dependencies 
10 1 Denis 'GNUtoo' Carikli
11 4 Denis 'GNUtoo' Carikli
Since you are not compiling any userspace applications, you don't need the Android build system. The Linux Kenrel, and Bootloaders such as uboot can be built without the Android build system.
12
13
The Trisquel ARM version of gcc seem to work well.
14
15 1 Denis 'GNUtoo' Carikli
If you use distributions such as Parabola, this will probably not work because the arm-none-eabi-gcc is too recent for many devices kernels.
16
17 4 Denis 'GNUtoo' Carikli
To workaround that you can install Trisquel in a container.
18
This way it will have very few CPU and memory overhead compared to a virtual machine.
19
It will also save disk space since you can just store the Trisquel rootfs in any directory.
20
21
h2. Example under Trisquel
22
23 6 Denis 'GNUtoo' Carikli
First download the following example image and its signatures:
24
* http://ftp-osl.osuosl.org/pub/replicant/images/replicant-4.2/0004/security/4A80EB23.asc
25 5 Denis 'GNUtoo' Carikli
* http://ftp-osl.osuosl.org/pub/replicant/images/replicant-4.2/0004/images/crespo/replicant-4.2-crespo.zip.asc
26
* http://ftp-osl.osuosl.org/pub/replicant/images/replicant-4.2/0004/images/crespo/replicant-4.2-crespo.zip
27 1 Denis 'GNUtoo' Carikli
28
As usual, verify the signature:
29 6 Denis 'GNUtoo' Carikli
<pre>
30
gpg --import 4A80EB23.asc
31
gpg --verify replicant-4.2-crespo.zip.asc
32
</pre>
33
It should then say something like:
34
<pre>
35
$ gpg --verify replicant-4.2-crespo.zip.asc 
36
gpg: assuming signed data in 'replicant-4.2-crespo.zip'
37
gpg: Signature made Tue 01 Sep 2015 01:31:47 PM CEST using RSA key ID 4A80EB23
38
gpg: Good signature from "Replicant project release key <contact@replicant.us>" [unknown]
39
gpg: WARNING: This key is not certified with a trusted signature!
40
gpg:          There is no indication that the signature belongs to the owner.
41
Primary key fingerprint: E776 092B 052A DC91 FDD1  FD80 16D1 FEEE 4A80 EB23
42
</pre>
43 5 Denis 'GNUtoo' Carikli
44 7 Denis 'GNUtoo' Carikli
Then unpack the zip file:
45
<pre>
46
mkdir replicant-4.2-crespo && cd replicant-4.2-crespo && unzip ../replicant-4.2-crespo.zip
47
</pre>
48
49 1 Denis 'GNUtoo' Carikli
<pre>
50 4 Denis 'GNUtoo' Carikli
$ git clone https://git.replicant.us/replicant/kernel_samsung_crespo.git
51 1 Denis 'GNUtoo' Carikli
</pre>