• Home

Kleaf - Building Android Kernels with Bazel

Table of contents

Introduction to Kleaf

Building your kernels and drivers with Bazel

Creating distributions

build.sh build configs

Configuring kernel_build

Support ABI monitoring (GKI)

Support ABI monitoring (Device)

Handling SCM version

Resolving common errors

Kleaf testing

Building against downloaded prebuilts

Customize workspace

Cheatsheet

Kleaf Development

Driver Development Kit (DDK)

Debugging Kleaf

Building compile_commands.json

Ensuring hermeticity

Internet Access

Toolchain resolution

Checkpatch

Configurations

--config=fast: Make local builds faster

--config=local: Sandboxing

--config=release: Release builds

--config=stamp: Handling SCM version

Flags

For a full list of flags, run

$ tools/bazel help kleaf

--gcov: Keep GCOV files

--kasan: kasan

--kbuild_symtypes: KBUILD_SYMTYPES

--kgdb: GDB scripts

--lto: Configure LTO during development

--notrim: Disables TRIM_NONLISTED_KMI globally.

--btf_debug_info: Enable/disable BTF debug information

--gki_build_config_fragment: Supporting GKI_BUILD_CONFIG_FRAGMENT on Kleaf

--defconfig_fragment: Defconfig fragments

Other flags for debugging and disabling integrity checks may be found in the Debugging Kleaf page.

References

References to Bazel rules and macros for the Android Kernel

Powered by Gitiles| Privacy| Terms