Skip to content

Commit

Permalink
feat(android): kernel: Add a couple of introduction sentences
Browse files Browse the repository at this point in the history
We have this in our internal BayLibre documentation.

Add it here as well so that both pages match.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
  • Loading branch information
makohoek authored and cshilwant committed Feb 5, 2025
1 parent ae44b71 commit d393ce4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions source/android/Foundational_Components_Kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
Android Kernel
##############

Android is built around a Linux kernel. By default, Android's
``boot.img`` is build from a binary kernel Image located in:

.. code-block:: text
${YOUR_PATH}/ti-aosp-15/device/ti/am62x-kernel/kernel/6.6
This guide describes how to rebuild and customize a Linux kernel for
Android.

.. _android-download-kernel:

*******************
Expand Down Expand Up @@ -30,6 +40,13 @@ Fetch the code using ``repo``:
Build Instructions
******************

In this section, we will assume that we already have an Android source
tree which has been fully build and is located in:

.. code-block:: text
${YOUR_PATH}/ti-aosp-15/
Building everything from scratch
================================

Expand All @@ -44,6 +61,8 @@ Building everything from scratch
$ export DIST_DIR=${YOUR_PATH}/ti-aosp-15/device/ti/am62x-kernel/kernel/${TARGET_KERNEL_USE}
$ tools/bazel run //common:ti_dist -- --dist_dir=$DIST_DIR
Re-running this command will rebuild incrementally.

Android uses Kleaf, a Bazel-based build system to build the kernel.
AOSP documentation can be found `here <https://source.android.com/docs/setup/build/building-kernels?hl=fr>`__ and
Kleaf documentation `here <https://android.googlesource.com/kernel/build/+/refs/heads/main/kleaf/README.md>`__
Expand All @@ -65,6 +84,8 @@ The usual (``make menuconfig``) is done via ``bazel`` command :
$ cd ${YOUR_PATH}/ti-kernel-aosp/
$ tools/bazel run //common:ti_config -- menuconfig
This will automatically update the :file:`arch/arm64/configs/ti_gki.fragment`.

.. note::

Users must have built the android kernel image prior to building the Android file system.
Expand Down

0 comments on commit d393ce4

Please sign in to comment.