README.md: reformat
Test: none Change-Id: Ie10e77e3b7393f1381ec11832e2d4231a8ee3bc6
This commit is contained in:
parent
502af9def9
commit
b9d71594da
1 changed files with 11 additions and 19 deletions
30
README.md
30
README.md
|
@ -1,15 +1,13 @@
|
|||
Android Kernel Configs
|
||||
======================
|
||||
# Android Kernel Configs
|
||||
|
||||
How are kernel config settings typically stored?
|
||||
------------------------------------------------
|
||||
## How are kernel config settings typically stored?
|
||||
|
||||
When building the Linux kernel for a particular platform one usually begins by
|
||||
basing the kernel configuration off of a particular defconfig. The platform’s
|
||||
defconfig contains all of the Linux kconfig settings required to properly
|
||||
configure the kernel build (features, default system parameters, etc) for that
|
||||
platform. Defconfig files are typically stored in the kernel tree at
|
||||
arch/*/configs/.
|
||||
`arch/*/configs/`.
|
||||
|
||||
It may be desirable to modify the kernel configuration beyond what the hardware
|
||||
platform requires in order to support a particular hardware or software
|
||||
|
@ -22,8 +20,7 @@ compactly express their kernel requirements. The fragments can be combined
|
|||
with a platform defconfig using the kernel's make rules or using the
|
||||
`scripts/kconfig/merge_config.sh` script in the kernel tree.
|
||||
|
||||
How are Android's kernel configs stored?
|
||||
----------------------------------------
|
||||
## How are Android's kernel configs stored?
|
||||
|
||||
The kernel configs are stored in the [kernel/configs repo](https://android.googlesource.com/kernel/configs/).
|
||||
|
||||
|
@ -44,15 +41,14 @@ apply in that case.
|
|||
Kernel configs vary by kernel version, so there are sets of kernel configs for
|
||||
each version of the kernel that Android supports.
|
||||
|
||||
How can I easily combine platform and required Android configs?
|
||||
---------------------------------------------------------------
|
||||
## How can I easily combine platform and required Android configs?
|
||||
|
||||
Assuming you already have a minimalist defconfig for your platform, a possible
|
||||
way to enable these options would be to use the aforementioned
|
||||
`merge_config.sh` script in the kernel tree. From the root of the kernel tree:
|
||||
|
||||
```sh
|
||||
ARCH=<arch> scripts/kconfig/merge_config.sh <...>/<platform>_defconfig <...>/android-base.config <...>/android-base-<arch>.config <...>/android-recommended.config
|
||||
ARCH=<arch> scripts/kconfig/merge_config.sh <...>/<platform>_defconfig <...>/android-base.config <...>/android-base-<arch>.config <...>/android-recommended.config
|
||||
```
|
||||
|
||||
This will generate a `.config` that can then be used to save a new defconfig or
|
||||
|
@ -64,12 +60,11 @@ and they must have filenames that end with the extension ".config". The
|
|||
platform defconfig must also be located in `arch/<arch>/configs/`. Once these
|
||||
requirements are satisfied, the full defconfig can be prepared with:
|
||||
|
||||
```
|
||||
```sh
|
||||
make ARCH=<arch> <platform>_defconfig android-base.config android-base-<arch>.config android-recommended.config
|
||||
```
|
||||
|
||||
Are the config requirements tested?
|
||||
-------------------------------------
|
||||
## Are the config requirements tested?
|
||||
|
||||
Starting with Android O the base kernel configs are not just advisory. They
|
||||
are tested as part of VTS in the
|
||||
|
@ -77,8 +72,7 @@ are tested as part of VTS in the
|
|||
test, and also during device boot when the vendor interface (which includes the
|
||||
kernel configuration) and framework compatibility matrix are compared.
|
||||
|
||||
Ensuring Device Upgradability
|
||||
-----------------------------
|
||||
## Ensuring Device Upgradability
|
||||
|
||||
Devices launched with prior releases of Android must be able to upgrade to
|
||||
later releases of Android. This means that AOSP must function not only with
|
||||
|
@ -100,8 +94,7 @@ upgrade path are in the kernel/configs repo.
|
|||
Support for kernel configs from previous dessert releases is dropped from AOSP
|
||||
when the upgrade path from that dessert release is no longer supported.
|
||||
|
||||
Organization and Maintenance of the Kernel Config Repo
|
||||
------------------------------------------------------
|
||||
# Organization and Maintenance of the Kernel Config Repo
|
||||
|
||||
The top level of the kernel configs repo contains directories for each
|
||||
supported kernel version. These contain the kernel config requirements (and
|
||||
|
@ -117,8 +110,7 @@ copied into a new directory for the release (this change is propagated to
|
|||
master) and the top-level configs are removed (this change is not propagated to
|
||||
master) since no development beyond that release is done in that branch.
|
||||
|
||||
I want to add/modify/remove a kernel config requirement. What do I do?
|
||||
-----------------------------------------------------------------------------
|
||||
## I want to add/modify/remove a kernel config requirement. What do I do?
|
||||
|
||||
Modify the top level kernel configs in AOSP. Make sure to modify the configs
|
||||
for all applicable kernel versions. Do not modify the config fragments in
|
||||
|
|
Loading…
Reference in a new issue