Functions that are useful in the common kernel package (usually //common).
load("@kleaf//build/kernel/kleaf:common_kernels.bzl", "common_kernel_protected_module_names") common_kernel_protected_module_names(<a href="#common_kernel_protected_module_names-name">name</a>, <a href="#common_kernel_protected_module_names-out">out</a>, <a href="#common_kernel_protected_module_names-exclude">exclude</a>, <a href="#common_kernel_protected_module_names-module_names">module_names</a>)
Build protected_module_names file for a common kernel.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| out | - | String | required | |
| exclude | - | List of strings | optional | [] |
| module_names | - | List of strings | optional | [] |
load("@kleaf//build/kernel/kleaf:common_kernels.bzl", "common_kernel") common_kernel(<a href="#common_kernel-name">name</a>, <a href="#common_kernel-outs">outs</a>, <a href="#common_kernel-makefile">makefile</a>, <a href="#common_kernel-arch">arch</a>, <a href="#common_kernel-visibility">visibility</a>, <a href="#common_kernel-defconfig">defconfig</a>, <a href="#common_kernel-check_defconfig">check_defconfig</a>, <a href="#common_kernel-pre_defconfig_fragments">pre_defconfig_fragments</a>, <a href="#common_kernel-post_defconfig_fragments">post_defconfig_fragments</a>, <a href="#common_kernel-kmi_symbol_list">kmi_symbol_list</a>, <a href="#common_kernel-additional_kmi_symbol_lists">additional_kmi_symbol_lists</a>, <a href="#common_kernel-trim_nonlisted_kmi">trim_nonlisted_kmi</a>, <a href="#common_kernel-kmi_symbol_list_strict_mode">kmi_symbol_list_strict_mode</a>, <a href="#common_kernel-kmi_symbol_list_add_only">kmi_symbol_list_add_only</a>, <a href="#common_kernel-module_implicit_outs">module_implicit_outs</a>, <a href="#common_kernel-modules_superset">modules_superset</a>, <a href="#common_kernel-protected_module_names_list">protected_module_names_list</a>, <a href="#common_kernel-gki_system_dlkm_modules">gki_system_dlkm_modules</a>, <a href="#common_kernel-make_goals">make_goals</a>, <a href="#common_kernel-abi_definition_stg">abi_definition_stg</a>, <a href="#common_kernel-kmi_enforced">kmi_enforced</a>, <a href="#common_kernel-build_gki_artifacts">build_gki_artifacts</a>, <a href="#common_kernel-gki_boot_img_sizes">gki_boot_img_sizes</a>, <a href="#common_kernel-page_size">page_size</a>, <a href="#common_kernel-deprecation">deprecation</a>, <a href="#common_kernel-ddk_headers_archive">ddk_headers_archive</a>, <a href="#common_kernel-ddk_module_headers">ddk_module_headers</a>, <a href="#common_kernel-extra_dist">extra_dist</a>, <a href="#common_kernel-kcflags">kcflags</a>, <a href="#common_kernel-system_dlkm_extra_archive_files">system_dlkm_extra_archive_files</a>, <a href="#common_kernel-clang_autofdo_profile">clang_autofdo_profile</a>, <a href="#common_kernel-generated_headers_for_module">generated_headers_for_module</a>)
Macro for an Android Common Kernel.
The following targets are declared as public API:
<name>_sources (e.g. kernel_aarch64_sources)<name> and related targets.<name> (e.g. kernel_aarch64): kernel_build()vmlinux, etc.<name>_uapi_headers (e.g. kernel_aarch64_uapi_headers)kernel-uapi-headers.tar.gz.<name>_modules (e.g. kernel_aarch64_modules)<name>_additional_artifacts (e.g. kernel_aarch64_additional_artifacts)system_dlkm, etc.kernel-headers.tar.gz<name>_dist (e.g. kernel_aarch64_dist)ABI monitoring If kmi_symbol_list is set, ABI monitoring is turned on.
<name>_abi (e.g. kernel_aarch64_abi): kernel_abi()<name>_abi_dist (e.g. kernel_aarch64_abi_dist)Usually, for ABI monitoring to be fully turned on, you should set:
kmi_symbol_listadditional_kmi_symbol_liststrim_nonlisted_kmi to Truekmi_symbol_list_strict_mode to Trueabi_definition_stg to the ABI definitionkmi_enforced to TruePARAMETERS
| Name | Description | Default Value |
|---|---|---|
| name | name of the kernel_build(). | none |
| outs | See kernel_build.outs | none |
| makefile | See kernel_build.makefile | None |
| arch | See kernel_build.arch | None |
| visibility | default visibility for some targets instantiated with this macro | None |
| defconfig | See kernel_build.defconfig | None |
| check_defconfig | Non-configurable. See kernel_build.check_defconfig. If value is None, default value is the following: - If --gki_build_config_fragment is set, default is “disabled”. - Otherwise: - If pre_defconfig_fragments is set, default is “match”. - Otherwise, default is “minimized”. | None |
| pre_defconfig_fragments | See kernel_build.pre_defconfig_fragments | None |
| post_defconfig_fragments | See kernel_build.post_defconfig_fragments | None |
| kmi_symbol_list | See kernel_build.kmi_symbol_list | None |
| additional_kmi_symbol_lists | See kernel_build.additional_kmi_symbol_lists | None |
| trim_nonlisted_kmi | See kernel_build.trim_nonlisted_kmi | None |
| kmi_symbol_list_strict_mode | See kernel_build.kmi_symbol_list_strict_mode | None |
| kmi_symbol_list_add_only | See kernel_abi.kmi_symbol_list_add_only | None |
| module_implicit_outs | See kernel_build.module_implicit_outs | None |
| modules_superset | nonconfigurable. The superset of modules targets to create. This should contain all modules in each branch in the select() of module_implicit_outs. The first module must not be in any conditional branch. | None |
| protected_module_names_list | See kernel_config.protected_module_names_list | None |
| gki_system_dlkm_modules | system_dlkm module_list | None |
| make_goals | See kernel_build.make_goals | None |
| abi_definition_stg | See kernel_abi.abi_definition_stg | None |
| kmi_enforced | See kernel_abi.kmi_enforced | None |
| build_gki_artifacts | nonconfigurable. If true, build GKI artifacts under target name <name>_gki_artifacts. | None |
| gki_boot_img_sizes | gki_artifacts.boot_img_sizes | None |
| page_size | See kernel_build.page_size | None |
| deprecation | If set, mark target deprecated with given message. | None |
| ddk_headers_archive | nonconfigurable. Target to the archive packing DDK headers | None |
| ddk_module_headers | See kernel_build.ddk_module_headers | None |
| extra_dist | extra targets added to <name>_dist | None |
| kcflags | kernel_build.kcflags | None |
| system_dlkm_extra_archive_files | system_dlkm_image.internal_extra_archive_files | None |
| clang_autofdo_profile | See kernel_build.clang_autofdo_profile | None |
| generated_headers_for_module | See kernel_build.generated_headers_for_module | None |