Project

General

Profile

Actions

Issue #2195

open

Build the kernel in Replicant 11 sources

Added by Denis 'GNUtoo' Carikli over 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Build system
Target version:
Start date:
12/09/2020
Due date:
% Done:

70%

Estimated time:
Resolution:
Device:
Unknown
Grant:
Type of work:
C programming, User testing
Actions #1

Updated by Denis 'GNUtoo' Carikli over 3 years 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

Actions #2

Updated by Denis 'GNUtoo' Carikli over 3 years 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.

Actions #3

Updated by Denis 'GNUtoo' Carikli about 3 years ago

  • % Done changed from 0 to 70

This now builds but it doesn't support modules yet

Actions #4

Updated by _I3^ RELATIVISM almost 3 years ago

  • Type of work C programming, User testing added
Actions

Also available in: Atom PDF