AOSP created build.sh
to compile their kernels but deprecated it in Android 13 and used kleaf instead
This project aims to maintain build.sh
and ensure compatibility with all kernel trees
- Clone this repo to
build
directory in your kernel source - Run scripts from the parent directory of
build
(see Manual)
A build configuration file must be specified in the BUILD_CONFIG variable when invoking any script. If not, you will be prompted to select a config file (if found)
See variables.md for a full list of build options
This file will be sourced by build.sh and functions like a shell script
Note: All variables in this file are exported and available to build.sh sub-processes (e.g. Make)
build/build.sh <make options>*
or:
To define custom out and dist directories:
OUT_DIR=<out dir> DIST_DIR=<dist dir>build/build.sh <make options>*
To use a custom build config:
BUILD_CONFIG=<path to the build.config><make options>*
To define custom out and dist directories:
OUT_DIR=output DIST_DIR=dist build/build.sh -j24 V=1
To use a custom build config:
BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh -j24 V=1
To use a CC wrapper:
build/build.sh CC="ccache clang"
Runs a configuration editor inside kernel/build environment.
build/config.sh <config editor> <make options>*
build/config.sh menuconfig|config|nconfig|... (default to menuconfig)