Issue #2195

Build the kernel in Replicant 11 sources

Added by Denis 'GNUtoo' Carikli 11 months ago. Updated 7 months ago.

Build system
Target version:
Start date:
Due date:
% Done:


Estimated time:
Type of work:
C programming, User testing

Updated by Denis 'GNUtoo' Carikli 11 months ago

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


Updated by Denis 'GNUtoo' Carikli 11 months ago

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.


Updated by Denis 'GNUtoo' Carikli 10 months ago

  • % Done changed from 0 to 70

This now builds but it doesn't support modules yet


Updated by _I3^ RELATIVISM 7 months ago

  • Type of work C programming, User testing added

Also available in: Atom PDF