Actions
Issue #2195
openBuild the kernel in Replicant 11 sources
Start date:
12/09/2020
Due date:
% Done:
70%
Estimated time:
Resolution:
Device:
Unknown
Grant:
Type of work:
C programming, User testing
Actions
Added by Denis 'GNUtoo' Carikli almost 4 years ago. Updated over 3 years ago.
70%
To build the kernel, we need to have gcc.
Using the host gcc isn't going to work with the path interposer given the comments that are in the configuration file: The gcc
binary contains code that drives the compilation. It then runs other binaries like cc1
. Passing -B to GCC can make it find cc1
but (1) that's ultra dirty, and (2) it fails to find it plugins.
As GCC was removed from the prebuilts in AOSP, and that depending on binaries isn't great, the idea would be to build GCC ourselves.
Since we were already doing it in Replicant 6, we could probably reuse the script Wolfgang did and adapt it to build a arm-none-eabi toolchain to build only the kenrel (to avoid dependencies on the headers needed for androideabi, which are now gone in the branches/tags of AOSP used by Replicant 11).
So far we need these additional dependencies on Trisquel 8:
apt install libgmp-dev libmpfr-dev libmpc-dev
For now it will require a workaround on Trisquel 8 (as building the host toolchain fails if it doesn't find /usr/include/asm):
sudo ln -s /usr/include/asm-generic /usr/include/asm
I'll try to get rid of it later on by installing more recent kernel headers (where it did the split between asm and asm-generic).
Ideally that toolchain build should probably be integrated completely in Android.
This now builds but it doesn't support modules yet