3162 lines
97 KiB
Text
3162 lines
97 KiB
Text
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2021 The Android Open Source Project
|
|
|
|
load("@bazel_skylib//lib:paths.bzl", "paths")
|
|
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
|
|
load("@bazel_skylib//rules:write_file.bzl", "write_file")
|
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
load("@rules_pkg//pkg:install.bzl", "pkg_install")
|
|
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
|
|
load("@rules_pkg//pkg:pkg.bzl", "pkg_zip")
|
|
load("@rules_python//python:defs.bzl", "py_library")
|
|
load(
|
|
"//build/kernel/kleaf:common_kernels.bzl",
|
|
"common_kernel",
|
|
"define_prebuilts",
|
|
)
|
|
load("//build/kernel/kleaf:constants.bzl", "COMMON_KCFLAGS", "DEFAULT_GKI_OUTS", "X86_64_OUTS")
|
|
load("//build/kernel/kleaf:fail.bzl", "fail_rule")
|
|
load(
|
|
"//build/kernel/kleaf:kernel.bzl",
|
|
"checkpatch",
|
|
"ddk_headers",
|
|
"ddk_headers_archive",
|
|
"initramfs",
|
|
"kernel_build",
|
|
"kernel_compile_commands",
|
|
"kernel_kythe",
|
|
"kernel_modules_install",
|
|
"merge_kzip",
|
|
"merged_kernel_uapi_headers",
|
|
"modinfo_summary_report",
|
|
)
|
|
load(":abi.bzl", "cc_binary_with_abi")
|
|
load(
|
|
":modules.bzl",
|
|
"get_gki_modules_list",
|
|
"get_gki_protected_modules_list",
|
|
"get_kunit_modules_list",
|
|
)
|
|
|
|
package(
|
|
default_visibility = [
|
|
"//visibility:public",
|
|
],
|
|
)
|
|
|
|
_GKI_AARCH64_MAKE_GOALS = [
|
|
"Image",
|
|
"Image.lz4",
|
|
"Image.gz",
|
|
"modules",
|
|
]
|
|
|
|
_GKI_X86_64_MAKE_GOALS = [
|
|
"bzImage",
|
|
"modules",
|
|
]
|
|
|
|
_GKI_AARCH64_BOOT_IMAGE_SIZES = {
|
|
"": "67108864",
|
|
"lz4": "53477376",
|
|
"gz": "47185920",
|
|
}
|
|
|
|
_GKI_X86_64_BOOT_IMAGE_SIZES = {
|
|
"": "67108864",
|
|
}
|
|
|
|
# Extra generated headers below $OUT_DIR for external modules.
|
|
_GENERATED_HEADERS_FOR_MODULE = [
|
|
"security/selinux/flask.h",
|
|
"security/selinux/av_permissions.h",
|
|
]
|
|
|
|
checkpatch(
|
|
name = "checkpatch",
|
|
checkpatch_pl = "scripts/checkpatch.pl",
|
|
)
|
|
|
|
# Deprecated - Use arch specific files from below.
|
|
fail_rule(
|
|
name = "gki_system_dlkm_modules",
|
|
message = """
|
|
Common list for all architectures is deprecated.
|
|
Instead use the file corresponding to the architecture used:
|
|
i.e. `gki_system_dlkm_modules_{arch}`
|
|
""",
|
|
)
|
|
|
|
fail_rule(
|
|
name = "android/gki_system_dlkm_modules",
|
|
message = """
|
|
Common list for all architectures is deprecated.
|
|
Instead use the file corresponding to the architecture used:
|
|
i.e. `gki_system_dlkm_modules_{arch}`
|
|
""",
|
|
)
|
|
|
|
write_file(
|
|
name = "gki_system_dlkm_modules_arm64",
|
|
out = "gki/aarch64/system_dlkm_modules",
|
|
# Do not built kunit modules into system_dlkm
|
|
content = get_gki_modules_list("arm64") + [
|
|
# Ensure new line at the end.
|
|
"",
|
|
],
|
|
)
|
|
|
|
# Not enforced in android-mainline.
|
|
write_file(
|
|
name = "gki_aarch64_protected_modules",
|
|
out = "gki/aarch64/protected_modules",
|
|
content = get_gki_protected_modules_list("arm64") + [
|
|
"", # Ensure new line at the end.
|
|
],
|
|
)
|
|
|
|
write_file(
|
|
name = "gki_system_dlkm_modules_x86_64",
|
|
out = "gki/x86_64/system_dlkm_modules",
|
|
# Do not built kunit modules into system_dlkm
|
|
content = get_gki_modules_list("x86_64") + [
|
|
# Ensure new line at the end.
|
|
"",
|
|
],
|
|
)
|
|
|
|
# Not enforced in android-mainline.
|
|
write_file(
|
|
name = "gki_x86_64_protected_modules",
|
|
out = "gki/x86_64/protected_modules",
|
|
content = get_gki_protected_modules_list("x86_64") + [
|
|
"", # Ensure new line at the end.
|
|
],
|
|
)
|
|
|
|
_SET_KERNEL_DIR_CMD = "KERNEL_DIR=\"{kernel_dir}\"".format(
|
|
kernel_dir = paths.join(
|
|
package_relative_label(":x").workspace_root,
|
|
package_relative_label(":x").package,
|
|
),
|
|
)
|
|
|
|
write_file(
|
|
name = "set_kernel_dir_build_config",
|
|
out = "set_kernel_dir_build_config/build.config",
|
|
content = [
|
|
_SET_KERNEL_DIR_CMD,
|
|
"",
|
|
],
|
|
visibility = ["//visibility:public"], # TODO: This should be private
|
|
)
|
|
|
|
filegroup(
|
|
name = "common_kernel_sources",
|
|
srcs = glob(
|
|
["**"],
|
|
exclude = [
|
|
"BUILD.bazel",
|
|
"**/*.bzl",
|
|
".git/**",
|
|
|
|
# ctag files
|
|
"tags",
|
|
"TAGS",
|
|
|
|
# temporary ctag files
|
|
"tags.temp",
|
|
"tags.lock",
|
|
|
|
# cscope files
|
|
"cscope.*",
|
|
"ncscope.*",
|
|
],
|
|
),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
_KUNIT_COMMON_GUIDE = [
|
|
"Modules for KUnit testing on Android devices only:",
|
|
"(KUnit: Linux Kernel Unit Testing https://www.kernel.org/doc/html/latest/dev-tools/kunit/)",
|
|
"(https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline/tools/testing/kunit/android/README)",
|
|
]
|
|
|
|
write_file(
|
|
name = "generate_gki_module_info_arm64",
|
|
out = "generate_gki_module_info_arm64/README",
|
|
content = _KUNIT_COMMON_GUIDE + get_kunit_modules_list("arm64") + [
|
|
"", # keep new line at the end
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
write_file(
|
|
name = "generate_gki_module_info_x86_64",
|
|
out = "generate_gki_module_info_x86_64/README",
|
|
content = _KUNIT_COMMON_GUIDE + get_kunit_modules_list("x86_64") + [
|
|
"", # keep new line at the end
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
common_kernel(
|
|
name = "kernel_aarch64",
|
|
outs = DEFAULT_GKI_OUTS,
|
|
arch = "arm64",
|
|
build_gki_artifacts = True,
|
|
ddk_headers_archive = ":kernel_aarch64_ddk_headers_archive",
|
|
ddk_module_headers = [":all_headers_aarch64"],
|
|
defconfig = "arch/arm64/configs/gki_defconfig",
|
|
extra_dist = [
|
|
":test_mappings_zip",
|
|
":tests_zip_arm64",
|
|
],
|
|
generated_headers_for_module = _GENERATED_HEADERS_FOR_MODULE,
|
|
gki_boot_img_sizes = _GKI_AARCH64_BOOT_IMAGE_SIZES,
|
|
gki_system_dlkm_modules = ":gki_system_dlkm_modules_arm64",
|
|
kcflags = COMMON_KCFLAGS,
|
|
make_goals = _GKI_AARCH64_MAKE_GOALS,
|
|
makefile = ":Makefile",
|
|
module_implicit_outs = get_gki_modules_list("arm64") + get_kunit_modules_list("arm64"),
|
|
system_dlkm_extra_archive_files = [":generate_gki_module_info_arm64"],
|
|
visibility = ["//visibility:public"],
|
|
|
|
# Symbol lists and module lists
|
|
# kmi_symbol_list = None,
|
|
# additional_kmi_symbol_lists = [],
|
|
# kmi_symbol_list_strict_mode = False,
|
|
# protected_exports_list = None,
|
|
# protected_modules_list = None,
|
|
# trim_nonlisted_kmi = False,
|
|
|
|
# ABI
|
|
# abi_definition_stg = None,
|
|
# kmi_enforced = False,
|
|
)
|
|
|
|
common_kernel(
|
|
name = "kernel_aarch64_16k",
|
|
outs = DEFAULT_GKI_OUTS,
|
|
arch = "arm64",
|
|
build_gki_artifacts = True,
|
|
ddk_headers_archive = ":kernel_aarch64_ddk_headers_archive",
|
|
ddk_module_headers = [":all_headers_aarch64"],
|
|
defconfig = "arch/arm64/configs/gki_defconfig",
|
|
extra_dist = [
|
|
":test_mappings_zip",
|
|
":tests_zip_arm64",
|
|
],
|
|
generated_headers_for_module = _GENERATED_HEADERS_FOR_MODULE,
|
|
gki_boot_img_sizes = _GKI_AARCH64_BOOT_IMAGE_SIZES,
|
|
gki_system_dlkm_modules = ":gki_system_dlkm_modules_arm64",
|
|
kcflags = COMMON_KCFLAGS,
|
|
make_goals = _GKI_AARCH64_MAKE_GOALS,
|
|
makefile = ":Makefile",
|
|
module_implicit_outs = get_gki_modules_list("arm64") + get_kunit_modules_list("arm64"),
|
|
page_size = "16k",
|
|
system_dlkm_extra_archive_files = [":generate_gki_module_info_arm64"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
fail_rule(
|
|
name = "kernel_aarch64_debug",
|
|
message = """\
|
|
Consider building @@//common:kernel_aarch64 with:
|
|
* --notrim to disable trimming, or
|
|
* --debug to enable additional debug options.""",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
fail_rule(
|
|
name = "kernel_x86_64_debug",
|
|
message = """\
|
|
Consider building @@//common:kernel_x86_64 with:
|
|
* --notrim to disable trimming, or
|
|
* --debug to enable additional debug options.""",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
common_kernel(
|
|
name = "kernel_x86_64",
|
|
outs = X86_64_OUTS,
|
|
arch = "x86_64",
|
|
build_gki_artifacts = True,
|
|
ddk_module_headers = [":all_headers_x86_64"],
|
|
defconfig = "arch/x86/configs/gki_defconfig",
|
|
extra_dist = [
|
|
":test_mappings_zip",
|
|
":tests_zip_x86_64",
|
|
],
|
|
generated_headers_for_module = _GENERATED_HEADERS_FOR_MODULE,
|
|
gki_boot_img_sizes = _GKI_X86_64_BOOT_IMAGE_SIZES,
|
|
gki_system_dlkm_modules = ":gki_system_dlkm_modules_x86_64",
|
|
kcflags = COMMON_KCFLAGS,
|
|
make_goals = _GKI_X86_64_MAKE_GOALS,
|
|
makefile = ":Makefile",
|
|
module_implicit_outs = get_gki_modules_list("x86_64") + get_kunit_modules_list("x86_64"),
|
|
system_dlkm_extra_archive_files = [":generate_gki_module_info_x86_64"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
alias(
|
|
name = "kernel",
|
|
actual = ":kernel_aarch64",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
alias(
|
|
name = "kernel_dist",
|
|
actual = ":kernel_aarch64_dist",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
kernel_compile_commands(
|
|
name = "kernel_aarch64_compile_commands",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":kernel_aarch64"],
|
|
)
|
|
|
|
kernel_compile_commands(
|
|
name = "kernel_x86_64_compile_commands",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":kernel_x86_64"],
|
|
)
|
|
|
|
string_flag(
|
|
name = "kernel_kythe_corpus",
|
|
build_setting_default = "",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
kernel_kythe(
|
|
name = "kernel_aarch64_kythe",
|
|
corpus = ":kernel_kythe_corpus",
|
|
kernel_build = ":kernel_aarch64",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_aarch64_kythe_files",
|
|
srcs = [
|
|
":kernel_aarch64_kythe",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_aarch64_kythe_dist",
|
|
srcs = [":kernel_aarch64_kythe_files"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
kernel_kythe(
|
|
name = "kernel_x86_64_kythe",
|
|
corpus = ":kernel_kythe_corpus",
|
|
kernel_build = ":kernel_x86_64",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_x86_64_kythe_files",
|
|
srcs = [
|
|
":kernel_aarch64_kythe",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_x86_64_kythe_dist",
|
|
srcs = [":kernel_x86_64_kythe_files"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
merge_kzip(
|
|
name = "kernel_kythe",
|
|
srcs = [
|
|
":kernel_aarch64_kythe",
|
|
":kernel_x86_64_kythe",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_kythe_files",
|
|
srcs = [
|
|
":kernel_kythe",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_kythe_dist",
|
|
srcs = [":kernel_kythe_files"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
define_prebuilts(visibility = ["//visibility:public"])
|
|
|
|
# Microdroid is not a real device. The kernel image is built with special
|
|
# configs to reduce the size. Hence, not using mixed build.
|
|
kernel_build(
|
|
name = "kernel_aarch64_microdroid",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"Image",
|
|
"System.map",
|
|
"modules.builtin",
|
|
"modules.builtin.modinfo",
|
|
"vmlinux",
|
|
"vmlinux.symvers",
|
|
],
|
|
arch = "arm64",
|
|
defconfig = "arch/arm64/configs/microdroid_defconfig",
|
|
make_goals = [
|
|
"Image",
|
|
],
|
|
makefile = ":Makefile",
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_aarch64_microdroid_dist_files",
|
|
srcs = [
|
|
":kernel_aarch64_microdroid",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_aarch64_microdroid_dist",
|
|
srcs = ["kernel_aarch64_microdroid_dist_files"],
|
|
destdir = "out/kernel_aarch64_microdroid/dist",
|
|
)
|
|
|
|
kernel_build(
|
|
name = "kernel_aarch64_microdroid_16k",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"Image",
|
|
"System.map",
|
|
"modules.builtin",
|
|
"modules.builtin.modinfo",
|
|
"vmlinux",
|
|
"vmlinux.symvers",
|
|
],
|
|
arch = "arm64",
|
|
defconfig = "arch/arm64/configs/microdroid_defconfig",
|
|
make_goals = [
|
|
"Image",
|
|
],
|
|
makefile = ":Makefile",
|
|
page_size = "16k",
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_aarch64_microdroid_16k_dist_files",
|
|
srcs = [
|
|
":kernel_aarch64_microdroid_16k",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_aarch64_microdroid_16k_dist",
|
|
srcs = ["kernel_aarch64_microdroid_16k_dist_files"],
|
|
destdir = "out/kernel_aarch64_microdroid_16k/dist",
|
|
)
|
|
|
|
# Microdroid is not a real device. The kernel image is built with special
|
|
# configs to reduce the size. Hence, not using mixed build.
|
|
kernel_build(
|
|
name = "kernel_x86_64_microdroid",
|
|
srcs = [":kernel_x86_64_sources"],
|
|
outs = X86_64_OUTS,
|
|
arch = "x86_64",
|
|
defconfig = "arch/x86/configs/microdroid_defconfig",
|
|
make_goals = [
|
|
"bzImage",
|
|
],
|
|
makefile = ":Makefile",
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_x86_64_microdroid_dist_files",
|
|
srcs = [
|
|
":kernel_x86_64_microdroid",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_x86_64_microdroid_dist",
|
|
srcs = ["kernel_x86_64_microdroid_dist_files"],
|
|
destdir = "out/kernel_x86_64_microdroid/dist",
|
|
)
|
|
|
|
kernel_build(
|
|
name = "kernel_aarch64_crashdump",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"Image",
|
|
],
|
|
arch = "arm64",
|
|
defconfig = "arch/arm64/configs/crashdump_defconfig",
|
|
make_goals = [
|
|
"Image",
|
|
],
|
|
makefile = ":Makefile",
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_aarch64_crashdump_dist_files",
|
|
srcs = [
|
|
":kernel_aarch64_crashdump",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_aarch64_crashdump_dist",
|
|
srcs = ["kernel_aarch64_crashdump_dist_files"],
|
|
destdir = "out/kernel_aarch64_crashdump/dist",
|
|
)
|
|
|
|
kernel_build(
|
|
name = "kernel_x86_64_crashdump",
|
|
srcs = [":kernel_x86_64_sources"],
|
|
outs = X86_64_OUTS,
|
|
arch = "x86_64",
|
|
defconfig = "arch/x86/configs/crashdump_defconfig",
|
|
make_goals = [
|
|
"bzImage",
|
|
],
|
|
makefile = ":Makefile",
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kernel_x86_64_crashdump_dist_files",
|
|
srcs = [
|
|
":kernel_x86_64_crashdump",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kernel_x86_64_crashdump_dist",
|
|
srcs = ["kernel_x86_64_crashdump_dist_files"],
|
|
destdir = "out/kernel_x86_64_crashdump/dist",
|
|
)
|
|
|
|
_DB845C_MODULE_OUTS = [
|
|
# keep sorted
|
|
"crypto/michael_mic.ko",
|
|
"drivers/base/regmap/regmap-sdw.ko",
|
|
"drivers/base/regmap/regmap-slimbus.ko",
|
|
"drivers/bus/mhi/host/mhi.ko",
|
|
"drivers/clk/qcom/camcc-sm8550.ko",
|
|
"drivers/clk/qcom/clk-qcom.ko",
|
|
"drivers/clk/qcom/clk-rpmh.ko",
|
|
"drivers/clk/qcom/clk-spmi-pmic-div.ko",
|
|
"drivers/clk/qcom/dispcc-sdm845.ko",
|
|
"drivers/clk/qcom/dispcc-sm8250.ko",
|
|
"drivers/clk/qcom/dispcc-sm8550.ko",
|
|
"drivers/clk/qcom/gcc-sdm845.ko",
|
|
"drivers/clk/qcom/gcc-sm8250.ko",
|
|
"drivers/clk/qcom/gcc-sm8450.ko",
|
|
"drivers/clk/qcom/gcc-sm8550.ko",
|
|
"drivers/clk/qcom/gcc-sm8650.ko",
|
|
"drivers/clk/qcom/gpucc-sdm845.ko",
|
|
"drivers/clk/qcom/gpucc-sm8250.ko",
|
|
"drivers/clk/qcom/gpucc-sm8550.ko",
|
|
"drivers/clk/qcom/gpucc-sm8650.ko",
|
|
"drivers/clk/qcom/lpass-gfm-sm8250.ko",
|
|
"drivers/clk/qcom/tcsrcc-sm8550.ko",
|
|
"drivers/clk/qcom/tcsrcc-sm8650.ko",
|
|
"drivers/clk/qcom/videocc-sdm845.ko",
|
|
"drivers/clk/qcom/videocc-sm8250.ko",
|
|
"drivers/clk/qcom/videocc-sm8550.ko",
|
|
"drivers/cpufreq/qcom-cpufreq-hw.ko",
|
|
"drivers/dma-buf/heaps/system_heap.ko",
|
|
"drivers/dma/qcom/bam_dma.ko",
|
|
"drivers/dma/qcom/gpi.ko",
|
|
"drivers/extcon/extcon-usb-gpio.ko",
|
|
"drivers/firmware/qcom/qcom-scm.ko",
|
|
"drivers/firmware/qcom/qcom_tzmem.ko",
|
|
"drivers/gpio/gpio-wcd934x.ko",
|
|
"drivers/gpu/drm/bridge/aux-bridge.ko",
|
|
"drivers/gpu/drm/bridge/aux-hpd-bridge.ko",
|
|
"drivers/gpu/drm/bridge/display-connector.ko",
|
|
"drivers/gpu/drm/bridge/lontium-lt9611.ko",
|
|
"drivers/gpu/drm/bridge/lontium-lt9611uxc.ko",
|
|
"drivers/gpu/drm/display/drm_display_helper.ko",
|
|
"drivers/gpu/drm/display/drm_dp_aux_bus.ko",
|
|
"drivers/gpu/drm/drm_exec.ko",
|
|
"drivers/gpu/drm/msm/msm.ko",
|
|
"drivers/gpu/drm/panel/panel-visionox-vtdr6130.ko",
|
|
"drivers/gpu/drm/scheduler/gpu-sched.ko",
|
|
"drivers/hwspinlock/qcom_hwspinlock.ko",
|
|
"drivers/i2c/busses/i2c-designware-core.ko",
|
|
"drivers/i2c/busses/i2c-designware-platform.ko",
|
|
"drivers/i2c/busses/i2c-qcom-geni.ko",
|
|
"drivers/i2c/busses/i2c-qup.ko",
|
|
"drivers/i2c/busses/i2c-rk3x.ko",
|
|
"drivers/i2c/i2c-dev.ko",
|
|
"drivers/i2c/i2c-mux.ko",
|
|
"drivers/i2c/muxes/i2c-mux-pca954x.ko",
|
|
"drivers/iio/adc/qcom-spmi-adc5.ko",
|
|
"drivers/iio/adc/qcom-vadc-common.ko",
|
|
"drivers/input/misc/pm8941-pwrkey.ko",
|
|
"drivers/interconnect/icc-clk.ko",
|
|
"drivers/interconnect/qcom/icc-bcm-voter.ko",
|
|
"drivers/interconnect/qcom/icc-osm-l3.ko",
|
|
"drivers/interconnect/qcom/icc-rpmh.ko",
|
|
"drivers/interconnect/qcom/qnoc-sdm845.ko",
|
|
"drivers/interconnect/qcom/qnoc-sm8250.ko",
|
|
"drivers/interconnect/qcom/qnoc-sm8450.ko",
|
|
"drivers/interconnect/qcom/qnoc-sm8550.ko",
|
|
"drivers/interconnect/qcom/qnoc-sm8650.ko",
|
|
"drivers/iommu/arm/arm-smmu/arm_smmu.ko",
|
|
"drivers/irqchip/qcom-pdc.ko",
|
|
"drivers/leds/rgb/leds-qcom-lpg.ko",
|
|
"drivers/mailbox/qcom-apcs-ipc-mailbox.ko",
|
|
"drivers/mailbox/qcom-ipcc.ko",
|
|
"drivers/mfd/qcom-spmi-pmic.ko",
|
|
"drivers/mfd/wcd934x.ko",
|
|
"drivers/misc/fastrpc.ko",
|
|
"drivers/mmc/host/cqhci.ko",
|
|
"drivers/mmc/host/sdhci-msm.ko",
|
|
"drivers/net/can/spi/mcp251xfd/mcp251xfd.ko",
|
|
"drivers/net/wireless/ath/ath.ko",
|
|
"drivers/net/wireless/ath/ath10k/ath10k_core.ko",
|
|
"drivers/net/wireless/ath/ath10k/ath10k_pci.ko",
|
|
"drivers/net/wireless/ath/ath10k/ath10k_snoc.ko",
|
|
"drivers/net/wireless/ath/ath11k/ath11k.ko",
|
|
"drivers/net/wireless/ath/ath11k/ath11k_ahb.ko",
|
|
"drivers/net/wireless/ath/ath11k/ath11k_pci.ko",
|
|
"drivers/net/wireless/ath/ath12k/ath12k.ko",
|
|
"drivers/nvmem/nvmem_qfprom.ko",
|
|
"drivers/pci/pwrctrl/pci-pwrctrl-core.ko",
|
|
"drivers/pci/pwrctrl/pci-pwrctrl-pwrseq.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-eusb2-repeater.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-qmp-combo.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-qmp-pcie.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-qmp-ufs.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-qmp-usb.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-qmp-usbc.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-qusb2.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-snps-eusb2.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-snps-femto-v2.ko",
|
|
"drivers/phy/qualcomm/phy-qcom-usb-hs.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-lpass-lpi.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-msm.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sdm845.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sm8250.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sm8450.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sm8550.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sm8650.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-spmi-gpio.ko",
|
|
"drivers/pinctrl/qcom/pinctrl-spmi-mpp.ko",
|
|
"drivers/pmdomain/qcom/cpr.ko",
|
|
"drivers/pmdomain/qcom/rpmhpd.ko",
|
|
"drivers/power/reset/qcom-pon.ko",
|
|
"drivers/power/reset/reboot-mode.ko",
|
|
"drivers/power/reset/syscon-reboot-mode.ko",
|
|
"drivers/power/sequencing/pwrseq-qcom-wcn.ko",
|
|
"drivers/power/supply/qcom_battmgr.ko",
|
|
"drivers/regulator/gpio-regulator.ko",
|
|
"drivers/regulator/qcom-rpmh-regulator.ko",
|
|
"drivers/regulator/qcom_spmi-regulator.ko",
|
|
"drivers/regulator/qcom_usb_vbus-regulator.ko",
|
|
"drivers/remoteproc/qcom_common.ko",
|
|
"drivers/remoteproc/qcom_pil_info.ko",
|
|
"drivers/remoteproc/qcom_q6v5.ko",
|
|
"drivers/remoteproc/qcom_q6v5_adsp.ko",
|
|
"drivers/remoteproc/qcom_q6v5_mss.ko",
|
|
"drivers/remoteproc/qcom_q6v5_pas.ko",
|
|
"drivers/remoteproc/qcom_q6v5_wcss.ko",
|
|
"drivers/remoteproc/qcom_sysmon.ko",
|
|
"drivers/reset/reset-qcom-aoss.ko",
|
|
"drivers/reset/reset-qcom-pdc.ko",
|
|
"drivers/rpmsg/qcom_glink.ko",
|
|
"drivers/rpmsg/qcom_glink_rpm.ko",
|
|
"drivers/rpmsg/qcom_glink_smem.ko",
|
|
"drivers/rpmsg/qcom_smd.ko",
|
|
"drivers/rpmsg/rpmsg_ns.ko",
|
|
"drivers/rtc/rtc-pm8xxx.ko",
|
|
"drivers/slimbus/slim-qcom-ngd-ctrl.ko",
|
|
"drivers/slimbus/slimbus.ko",
|
|
"drivers/soc/qcom/apr.ko",
|
|
"drivers/soc/qcom/cmd-db.ko",
|
|
"drivers/soc/qcom/llcc-qcom.ko",
|
|
"drivers/soc/qcom/mdt_loader.ko",
|
|
"drivers/soc/qcom/pdr_interface.ko",
|
|
"drivers/soc/qcom/pmic_glink.ko",
|
|
"drivers/soc/qcom/pmic_glink_altmode.ko",
|
|
"drivers/soc/qcom/qcom_aoss.ko",
|
|
"drivers/soc/qcom/qcom_ice.ko",
|
|
"drivers/soc/qcom/qcom_pd_mapper.ko",
|
|
"drivers/soc/qcom/qcom_pdr_msg.ko",
|
|
"drivers/soc/qcom/qcom_rpmh.ko",
|
|
"drivers/soc/qcom/qmi_helpers.ko",
|
|
"drivers/soc/qcom/rmtfs_mem.ko",
|
|
"drivers/soc/qcom/smem.ko",
|
|
"drivers/soc/qcom/smp2p.ko",
|
|
"drivers/soc/qcom/smsm.ko",
|
|
"drivers/soc/qcom/socinfo.ko",
|
|
"drivers/soc/qcom/spm.ko",
|
|
"drivers/soundwire/soundwire-bus.ko",
|
|
"drivers/soundwire/soundwire-qcom.ko",
|
|
"drivers/spi/spi-geni-qcom.ko",
|
|
"drivers/spi/spi-pl022.ko",
|
|
"drivers/spi/spi-qcom-qspi.ko",
|
|
"drivers/spi/spi-qup.ko",
|
|
"drivers/spmi/spmi-pmic-arb.ko",
|
|
"drivers/thermal/qcom/lmh.ko",
|
|
"drivers/thermal/qcom/qcom-spmi-adc-tm5.ko",
|
|
"drivers/thermal/qcom/qcom-spmi-temp-alarm.ko",
|
|
"drivers/thermal/qcom/qcom_tsens.ko",
|
|
"drivers/tty/serial/msm_serial.ko",
|
|
"drivers/ufs/host/ufs-qcom.ko",
|
|
"drivers/usb/common/ulpi.ko",
|
|
"drivers/usb/host/ohci-hcd.ko",
|
|
"drivers/usb/host/ohci-pci.ko",
|
|
"drivers/usb/host/ohci-platform.ko",
|
|
"drivers/usb/host/xhci-pci-renesas.ko",
|
|
"drivers/usb/typec/mux/fsa4480.ko",
|
|
"drivers/usb/typec/mux/nb7vpq904m.ko",
|
|
"drivers/usb/typec/mux/wcd939x-usbss.ko",
|
|
"drivers/usb/typec/tcpm/qcom/qcom_pmic_tcpm.ko",
|
|
"drivers/usb/typec/ucsi/ucsi_glink.ko",
|
|
"net/mac80211/mac80211.ko",
|
|
"net/qrtr/qrtr.ko",
|
|
"net/qrtr/qrtr-mhi.ko",
|
|
"net/qrtr/qrtr-smd.ko",
|
|
"net/qrtr/qrtr-tun.ko",
|
|
"net/wireless/cfg80211.ko",
|
|
"sound/soc/codecs/snd-soc-dmic.ko",
|
|
"sound/soc/codecs/snd-soc-hdmi-codec.ko",
|
|
"sound/soc/codecs/snd-soc-lpass-macro-common.ko",
|
|
"sound/soc/codecs/snd-soc-lpass-rx-macro.ko",
|
|
"sound/soc/codecs/snd-soc-lpass-tx-macro.ko",
|
|
"sound/soc/codecs/snd-soc-lpass-va-macro.ko",
|
|
"sound/soc/codecs/snd-soc-lpass-wsa-macro.ko",
|
|
"sound/soc/codecs/snd-soc-max98927.ko",
|
|
"sound/soc/codecs/snd-soc-rl6231.ko",
|
|
"sound/soc/codecs/snd-soc-rt5663.ko",
|
|
"sound/soc/codecs/snd-soc-wcd-classh.ko",
|
|
"sound/soc/codecs/snd-soc-wcd-mbhc.ko",
|
|
"sound/soc/codecs/snd-soc-wcd9335.ko",
|
|
"sound/soc/codecs/snd-soc-wcd934x.ko",
|
|
"sound/soc/codecs/snd-soc-wcd938x.ko",
|
|
"sound/soc/codecs/snd-soc-wcd938x-sdw.ko",
|
|
"sound/soc/codecs/snd-soc-wcd939x.ko",
|
|
"sound/soc/codecs/snd-soc-wcd939x-sdw.ko",
|
|
"sound/soc/codecs/snd-soc-wsa881x.ko",
|
|
"sound/soc/codecs/snd-soc-wsa884x.ko",
|
|
"sound/soc/qcom/qdsp6/q6adm.ko",
|
|
"sound/soc/qcom/qdsp6/q6afe.ko",
|
|
"sound/soc/qcom/qdsp6/q6afe-clocks.ko",
|
|
"sound/soc/qcom/qdsp6/q6afe-dai.ko",
|
|
"sound/soc/qcom/qdsp6/q6apm-dai.ko",
|
|
"sound/soc/qcom/qdsp6/q6apm-lpass-dais.ko",
|
|
"sound/soc/qcom/qdsp6/q6asm.ko",
|
|
"sound/soc/qcom/qdsp6/q6asm-dai.ko",
|
|
"sound/soc/qcom/qdsp6/q6core.ko",
|
|
"sound/soc/qcom/qdsp6/q6prm.ko",
|
|
"sound/soc/qcom/qdsp6/q6prm-clocks.ko",
|
|
"sound/soc/qcom/qdsp6/q6routing.ko",
|
|
"sound/soc/qcom/qdsp6/snd-q6apm.ko",
|
|
"sound/soc/qcom/qdsp6/snd-q6dsp-common.ko",
|
|
"sound/soc/qcom/snd-soc-qcom-common.ko",
|
|
"sound/soc/qcom/snd-soc-qcom-sdw.ko",
|
|
"sound/soc/qcom/snd-soc-sc8280xp.ko",
|
|
"sound/soc/qcom/snd-soc-sdm845.ko",
|
|
"sound/soc/qcom/snd-soc-sm8250.ko",
|
|
]
|
|
|
|
_DB845C_WATCHDOG_MODULE_OUTS = [
|
|
"drivers/watchdog/pm8916_wdt.ko",
|
|
"drivers/watchdog/qcom-wdt.ko",
|
|
]
|
|
|
|
kernel_build(
|
|
name = "db845c_no_kgdb",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb",
|
|
"arch/arm64/boot/dts/qcom/sdm845-db845c.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8450-hdk.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8450-qrd.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8550-hdk.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8550-qrd.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8650-hdk.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8650-qrd.dtb",
|
|
],
|
|
arch = "arm64",
|
|
# Enable mixed build.
|
|
base_kernel = ":kernel_aarch64",
|
|
defconfig = "arch/arm64/configs/gki_defconfig",
|
|
make_goals = [
|
|
"modules",
|
|
"qcom/qrb5165-rb5.dtb",
|
|
"qcom/sdm845-db845c.dtb",
|
|
"qcom/sm8450-hdk.dtb",
|
|
"qcom/sm8450-qrd.dtb",
|
|
"qcom/sm8550-hdk.dtb",
|
|
"qcom/sm8550-qrd.dtb",
|
|
"qcom/sm8650-hdk.dtb",
|
|
"qcom/sm8650-qrd.dtb",
|
|
],
|
|
makefile = ":Makefile",
|
|
module_outs = _DB845C_MODULE_OUTS + _DB845C_WATCHDOG_MODULE_OUTS,
|
|
pre_defconfig_fragments = ["arch/arm64/configs/db845c_gki.fragment"],
|
|
strip_modules = True,
|
|
)
|
|
|
|
kernel_build(
|
|
name = "db845c_with_kgdb",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb",
|
|
"arch/arm64/boot/dts/qcom/sdm845-db845c.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8450-hdk.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8450-qrd.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8550-hdk.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8550-qrd.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8650-hdk.dtb",
|
|
"arch/arm64/boot/dts/qcom/sm8650-qrd.dtb",
|
|
],
|
|
arch = "arm64",
|
|
# Enable mixed build.
|
|
base_kernel = ":kernel_aarch64",
|
|
defconfig = "arch/arm64/configs/gki_defconfig",
|
|
make_goals = [
|
|
"modules",
|
|
"qcom/qrb5165-rb5.dtb",
|
|
"qcom/sdm845-db845c.dtb",
|
|
"qcom/sm8450-hdk.dtb",
|
|
"qcom/sm8450-qrd.dtb",
|
|
"qcom/sm8550-hdk.dtb",
|
|
"qcom/sm8550-qrd.dtb",
|
|
"qcom/sm8650-hdk.dtb",
|
|
"qcom/sm8650-qrd.dtb",
|
|
],
|
|
makefile = ":Makefile",
|
|
module_outs = _DB845C_MODULE_OUTS,
|
|
pre_defconfig_fragments = ["arch/arm64/configs/db845c_gki.fragment"],
|
|
strip_modules = True,
|
|
)
|
|
|
|
alias(
|
|
name = "db845c",
|
|
actual = select({
|
|
"//build/kernel/kleaf:kgdb_is_true": "db845c_with_kgdb",
|
|
"//conditions:default": "db845c_no_kgdb",
|
|
}),
|
|
)
|
|
|
|
kernel_modules_install(
|
|
name = "db845c_modules_install",
|
|
kernel_build = ":db845c",
|
|
)
|
|
|
|
merged_kernel_uapi_headers(
|
|
name = "db845c_merged_kernel_uapi_headers",
|
|
kernel_build = ":db845c",
|
|
)
|
|
|
|
initramfs(
|
|
name = "db845c_initramfs",
|
|
kernel_modules_install = ":db845c_modules_install",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "db845c_dist_files",
|
|
srcs = [
|
|
":db845c",
|
|
":db845c_initramfs",
|
|
":db845c_modules_install",
|
|
":db845c_merged_kernel_uapi_headers",
|
|
# Mixed build: Additional GKI artifacts.
|
|
":kernel_aarch64",
|
|
":kernel_aarch64_modules",
|
|
":kernel_aarch64_additional_artifacts",
|
|
":tests_zip_arm64",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "db845c_dist",
|
|
srcs = [":db845c_dist_files"],
|
|
destdir = "out/db845/dist",
|
|
)
|
|
|
|
_ROCKPI4_MODULE_OUTS = [
|
|
# keep sorted
|
|
"drivers/char/hw_random/virtio-rng.ko",
|
|
"drivers/clk/clk-rk808.ko",
|
|
"drivers/cpufreq/cpufreq-dt.ko",
|
|
"drivers/dma/pl330.ko",
|
|
"drivers/gpu/drm/bridge/analogix/analogix_dp.ko",
|
|
"drivers/gpu/drm/bridge/synopsys/dw-hdmi.ko",
|
|
"drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.ko",
|
|
"drivers/gpu/drm/display/drm_display_helper.ko",
|
|
"drivers/gpu/drm/drm_dma_helper.ko",
|
|
"drivers/gpu/drm/rockchip/rockchipdrm.ko",
|
|
"drivers/i2c/busses/i2c-rk3x.ko",
|
|
"drivers/iio/adc/rockchip_saradc.ko",
|
|
"drivers/iio/buffer/industrialio-triggered-buffer.ko",
|
|
"drivers/iio/buffer/kfifo_buf.ko",
|
|
"drivers/mfd/rk8xx-core.ko",
|
|
"drivers/mfd/rk8xx-i2c.ko",
|
|
"drivers/mfd/rk8xx-spi.ko",
|
|
"drivers/mmc/core/pwrseq_simple.ko",
|
|
"drivers/mmc/host/cqhci.ko",
|
|
"drivers/mmc/host/dw_mmc.ko",
|
|
"drivers/mmc/host/dw_mmc-pltfm.ko",
|
|
"drivers/mmc/host/dw_mmc-rockchip.ko",
|
|
"drivers/mmc/host/sdhci-of-arasan.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-rk.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/stmmac.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/stmmac-platform.ko",
|
|
"drivers/net/net_failover.ko",
|
|
"drivers/net/pcs/pcs_xpcs.ko",
|
|
"drivers/net/virtio_net.ko",
|
|
"drivers/pci/controller/pcie-rockchip-host.ko",
|
|
"drivers/phy/rockchip/phy-rockchip-emmc.ko",
|
|
"drivers/phy/rockchip/phy-rockchip-inno-usb2.ko",
|
|
"drivers/phy/rockchip/phy-rockchip-pcie.ko",
|
|
"drivers/phy/rockchip/phy-rockchip-typec.ko",
|
|
"drivers/pwm/pwm-rockchip.ko",
|
|
"drivers/regulator/fan53555.ko",
|
|
"drivers/regulator/pwm-regulator.ko",
|
|
"drivers/regulator/rk808-regulator.ko",
|
|
"drivers/rtc/rtc-rk808.ko",
|
|
"drivers/soc/rockchip/io-domain.ko",
|
|
"drivers/thermal/rockchip_thermal.ko",
|
|
"drivers/usb/host/ohci-hcd.ko",
|
|
"drivers/usb/host/ohci-platform.ko",
|
|
"net/core/failover.ko",
|
|
]
|
|
|
|
_ROCKPI4_WATCHDOG_MODULE_OUTS = [
|
|
# keep sorted
|
|
"drivers/watchdog/dw_wdt.ko",
|
|
]
|
|
|
|
# TODO(b/258259749): Convert rockpi4 to mixed build
|
|
kernel_build(
|
|
name = "rockpi4_no_kgdb",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"Image",
|
|
"System.map",
|
|
"modules.builtin",
|
|
"modules.builtin.modinfo",
|
|
"rk3399-rock-pi-4b.dtb",
|
|
"vmlinux",
|
|
"vmlinux.symvers",
|
|
],
|
|
arch = "arm64",
|
|
build_config = "build.config.rockpi4",
|
|
defconfig = "arch/arm64/configs/gki_defconfig",
|
|
dtstree = "//common-modules/virtual-device:rockpi4_dts",
|
|
kmi_symbol_list_strict_mode = False,
|
|
make_goals = [
|
|
"Image",
|
|
"modules",
|
|
"rk3399-rock-pi-4b.dtb",
|
|
],
|
|
makefile = ":Makefile",
|
|
module_outs = get_gki_modules_list("arm64") + get_kunit_modules_list("arm64") + _ROCKPI4_MODULE_OUTS + _ROCKPI4_WATCHDOG_MODULE_OUTS,
|
|
pre_defconfig_fragments = ["arch/arm64/configs/rockpi4_gki.fragment"],
|
|
trim_nonlisted_kmi = False,
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# TODO(b/258259749): Convert rockpi4 to mixed build
|
|
kernel_build(
|
|
name = "rockpi4_with_kgdb",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"Image",
|
|
"System.map",
|
|
"modules.builtin",
|
|
"modules.builtin.modinfo",
|
|
"rk3399-rock-pi-4b.dtb",
|
|
"vmlinux",
|
|
"vmlinux.symvers",
|
|
],
|
|
arch = "arm64",
|
|
build_config = "build.config.rockpi4",
|
|
dtstree = "//common-modules/virtual-device:rockpi4_dts",
|
|
kmi_symbol_list_strict_mode = False,
|
|
make_goals = [
|
|
"Image",
|
|
"modules",
|
|
"rk3399-rock-pi-4b.dtb",
|
|
],
|
|
makefile = ":Makefile",
|
|
module_outs = get_gki_modules_list("arm64") + get_kunit_modules_list("arm64") + _ROCKPI4_MODULE_OUTS,
|
|
trim_nonlisted_kmi = False,
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
alias(
|
|
name = "rockpi4",
|
|
actual = select({
|
|
"//build/kernel/kleaf:kgdb_is_true": "rockpi4_with_kgdb",
|
|
"//conditions:default": "rockpi4_no_kgdb",
|
|
}),
|
|
)
|
|
|
|
kernel_modules_install(
|
|
name = "rockpi4_modules_install",
|
|
kernel_build = ":rockpi4",
|
|
)
|
|
|
|
initramfs(
|
|
name = "rockpi4_initramfs",
|
|
kernel_modules_install = ":rockpi4_modules_install",
|
|
ramdisk_compression = "lz4",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "rockpi4_dist_files",
|
|
srcs = [
|
|
":rockpi4",
|
|
":rockpi4_initramfs",
|
|
":rockpi4_modules_install",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "rockpi4_dist",
|
|
srcs = [":rockpi4_dist_files"],
|
|
destdir = "out/rockpi4/dist",
|
|
)
|
|
|
|
|
|
|
|
# Orangepi 5_pro support-
|
|
kernel_build(
|
|
name = "opi5_pro_defconfig",
|
|
outs = [
|
|
".config",
|
|
],
|
|
build_config = "build.config.opi5_pro",
|
|
make_goals = [
|
|
"android_orangepi5_defconfig",
|
|
],
|
|
)
|
|
|
|
kernel_build(
|
|
name = "opi5_pro",
|
|
outs = [
|
|
"arch/arm64/boot/Image",
|
|
"arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-pro-1.dtb",
|
|
|
|
],
|
|
build_config = "build.config.opi5_pro",
|
|
make_goals = [
|
|
"Image",
|
|
"dtbs",
|
|
|
|
],
|
|
|
|
|
|
kcflags = ["-D__ANDROID_COMMON_KERNEL__"],
|
|
)
|
|
|
|
# Orangepi 5_pro support-
|
|
kernel_build(
|
|
name = "opi5_defconfig",
|
|
outs = [
|
|
".config",
|
|
],
|
|
build_config = "build.config.opi5",
|
|
make_goals = [
|
|
"android_orangepi5_defconfig",
|
|
],
|
|
)
|
|
|
|
kernel_build(
|
|
name = "opi5",
|
|
outs = [
|
|
"arch/arm64/boot/Image",
|
|
"arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtb",
|
|
|
|
],
|
|
build_config = "build.config.opi5",
|
|
make_goals = [
|
|
"Image",
|
|
"dtbs",
|
|
|
|
],
|
|
|
|
|
|
kcflags = ["-D__ANDROID_COMMON_KERNEL__"],
|
|
)
|
|
|
|
|
|
|
|
_AMLOGIC_MODULE_OUTS = [
|
|
# keep sorted
|
|
"drivers/char/hw_random/meson-rng.ko",
|
|
"drivers/clk/clk-pwm.ko",
|
|
"drivers/clk/meson/axg.ko",
|
|
"drivers/clk/meson/axg-aoclk.ko",
|
|
"drivers/clk/meson/axg-audio.ko",
|
|
"drivers/clk/meson/clk-cpu-dyndiv.ko",
|
|
"drivers/clk/meson/clk-phase.ko",
|
|
"drivers/clk/meson/g12a.ko",
|
|
"drivers/clk/meson/g12a-aoclk.ko",
|
|
"drivers/clk/meson/gxbb.ko",
|
|
"drivers/clk/meson/gxbb-aoclk.ko",
|
|
"drivers/clk/meson/meson-aoclk.ko",
|
|
"drivers/clk/meson/meson-eeclk.ko",
|
|
"drivers/clk/meson/sclk-div.ko",
|
|
"drivers/clk/meson/vclk.ko",
|
|
"drivers/crypto/amlogic/amlogic-gxl-crypto.ko",
|
|
"drivers/firmware/meson/meson_sm.ko",
|
|
"drivers/gpu/drm/bridge/display-connector.ko",
|
|
"drivers/gpu/drm/bridge/synopsys/dw-hdmi.ko",
|
|
"drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.ko",
|
|
"drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.ko",
|
|
"drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.ko",
|
|
"drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.ko",
|
|
"drivers/gpu/drm/display/drm_display_helper.ko",
|
|
"drivers/gpu/drm/drm_dma_helper.ko",
|
|
"drivers/gpu/drm/meson/meson-drm.ko",
|
|
"drivers/gpu/drm/meson/meson_dw_hdmi.ko",
|
|
"drivers/gpu/drm/meson/meson_dw_mipi_dsi.ko",
|
|
"drivers/i2c/busses/i2c-meson.ko",
|
|
"drivers/iio/adc/meson_saradc.ko",
|
|
"drivers/irqchip/irq-meson-gpio.ko",
|
|
"drivers/leds/leds-gpio.ko",
|
|
"drivers/media/cec/platform/meson/ao-cec.ko",
|
|
"drivers/media/cec/platform/meson/ao-cec-g12a.ko",
|
|
"drivers/media/platform/amlogic/meson-ge2d/ge2d.ko",
|
|
"drivers/media/rc/meson-ir.ko",
|
|
"drivers/mfd/khadas-mcu.ko",
|
|
"drivers/mmc/core/pwrseq_emmc.ko",
|
|
"drivers/mmc/core/pwrseq_simple.ko",
|
|
"drivers/mmc/host/meson-gx-mmc.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-generic.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-meson.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/stmmac.ko",
|
|
"drivers/net/ethernet/stmicro/stmmac/stmmac-platform.ko",
|
|
"drivers/net/mdio/mdio-mux.ko",
|
|
"drivers/net/mdio/mdio-mux-meson-g12a.ko",
|
|
"drivers/net/mdio/mdio-mux-meson-gxl.ko",
|
|
"drivers/net/pcs/pcs_xpcs.ko",
|
|
"drivers/net/phy/meson-gxl.ko",
|
|
"drivers/net/phy/realtek.ko",
|
|
"drivers/net/phy/smsc.ko",
|
|
"drivers/pci/controller/dwc/pci-meson.ko",
|
|
"drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.ko",
|
|
"drivers/phy/amlogic/phy-meson-axg-pcie.ko",
|
|
"drivers/phy/amlogic/phy-meson-g12a-usb2.ko",
|
|
"drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.ko",
|
|
"drivers/phy/amlogic/phy-meson-gxl-usb2.ko",
|
|
"drivers/phy/amlogic/phy-meson8b-usb2.ko",
|
|
"drivers/pinctrl/meson/pinctrl-amlogic-c3.ko",
|
|
"drivers/pinctrl/meson/pinctrl-amlogic-t7.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson-a1.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson-axg.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson-axg-pmx.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson-g12a.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson-gxbb.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson-gxl.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson-s4.ko",
|
|
"drivers/pinctrl/meson/pinctrl-meson8-pmx.ko",
|
|
"drivers/pmdomain/amlogic/meson-ee-pwrc.ko",
|
|
"drivers/pmdomain/amlogic/meson-secure-pwrc.ko",
|
|
"drivers/pwm/pwm-meson.ko",
|
|
"drivers/regulator/pwm-regulator.ko",
|
|
"drivers/reset/reset-meson.ko",
|
|
"drivers/reset/reset-meson-audio-arb.ko",
|
|
"drivers/rtc/rtc-meson-vrtc.ko",
|
|
"drivers/soc/amlogic/meson-canvas.ko",
|
|
"drivers/soc/amlogic/meson-clk-measure.ko",
|
|
"drivers/spi/spi-meson-spicc.ko",
|
|
"drivers/spi/spi-meson-spifc.ko",
|
|
"drivers/thermal/amlogic_thermal.ko",
|
|
"drivers/thermal/khadas_mcu_fan.ko",
|
|
"drivers/tty/serial/meson_uart.ko",
|
|
"drivers/usb/dwc2/dwc2.ko",
|
|
"drivers/usb/dwc3/dwc3-meson-g12a.ko",
|
|
"sound/soc/codecs/snd-soc-dmic.ko",
|
|
"sound/soc/codecs/snd-soc-hdmi-codec.ko",
|
|
"sound/soc/codecs/snd-soc-spdif-rx.ko",
|
|
"sound/soc/codecs/snd-soc-spdif-tx.ko",
|
|
"sound/soc/meson/snd-soc-meson-aiu.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-fifo.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-frddr.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-pdm.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-sound-card.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-spdifin.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-spdifout.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-tdm-formatter.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-tdm-interface.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-tdmin.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-tdmout.ko",
|
|
"sound/soc/meson/snd-soc-meson-axg-toddr.ko",
|
|
"sound/soc/meson/snd-soc-meson-card-utils.ko",
|
|
"sound/soc/meson/snd-soc-meson-codec-glue.ko",
|
|
"sound/soc/meson/snd-soc-meson-g12a-toacodec.ko",
|
|
"sound/soc/meson/snd-soc-meson-g12a-tohdmitx.ko",
|
|
"sound/soc/meson/snd-soc-meson-gx-sound-card.ko",
|
|
"sound/soc/meson/snd-soc-meson-t9015.ko",
|
|
]
|
|
|
|
_AMLOGIC_WATCHDOG_MODULE_OUTS = [
|
|
# keep sorted
|
|
"drivers/watchdog/meson_gxbb_wdt.ko",
|
|
"drivers/watchdog/meson_wdt.ko",
|
|
]
|
|
|
|
kernel_build(
|
|
name = "yukawa_no_kgdb",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"Image",
|
|
"System.map",
|
|
"arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dtb",
|
|
"arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb",
|
|
"arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dtb",
|
|
"arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dtb",
|
|
"modules.builtin",
|
|
"modules.builtin.modinfo",
|
|
"vmlinux",
|
|
"vmlinux.symvers",
|
|
],
|
|
arch = "arm64",
|
|
defconfig = "arch/arm64/configs/gki_defconfig",
|
|
make_goals = [
|
|
"Image",
|
|
"modules",
|
|
"amlogic/meson-g12a-sei510.dtb",
|
|
"amlogic/meson-sm1-sei610.dtb",
|
|
"amlogic/meson-g12b-a311d-khadas-vim3.dtb",
|
|
"amlogic/meson-sm1-khadas-vim3l.dtb",
|
|
],
|
|
makefile = ":Makefile",
|
|
module_outs = get_gki_modules_list("arm64") + get_kunit_modules_list("arm64") + _AMLOGIC_MODULE_OUTS + _AMLOGIC_WATCHDOG_MODULE_OUTS,
|
|
pre_defconfig_fragments = ["arch/arm64/configs/amlogic_gki.fragment"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
kernel_build(
|
|
name = "yukawa_with_kgdb",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
outs = [
|
|
"Image",
|
|
"System.map",
|
|
"arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dtb",
|
|
"arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb",
|
|
"arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dtb",
|
|
"arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dtb",
|
|
"modules.builtin",
|
|
"modules.builtin.modinfo",
|
|
"vmlinux",
|
|
"vmlinux.symvers",
|
|
],
|
|
arch = "arm64",
|
|
defconfig = "arch/arm64/configs/gki_defconfig",
|
|
make_goals = [
|
|
"Image",
|
|
"modules",
|
|
"amlogic/meson-g12a-sei510.dtb",
|
|
"amlogic/meson-sm1-sei610.dtb",
|
|
"amlogic/meson-g12b-a311d-khadas-vim3.dtb",
|
|
"amlogic/meson-sm1-khadas-vim3l.dtb",
|
|
],
|
|
makefile = ":Makefile",
|
|
module_outs = get_gki_modules_list("arm64") + get_kunit_modules_list("arm64") + _AMLOGIC_MODULE_OUTS,
|
|
pre_defconfig_fragments = ["arch/arm64/configs/amlogic_gki.fragment"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
alias(
|
|
name = "yukawa",
|
|
actual = select({
|
|
"//build/kernel/kleaf:kgdb_is_true": "yukawa_with_kgdb",
|
|
"//conditions:default": "yukawa_no_kgdb",
|
|
}),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
kernel_modules_install(
|
|
name = "yukawa_modules_install",
|
|
kernel_build = ":yukawa",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
initramfs(
|
|
name = "yukawa_initramfs",
|
|
kernel_modules_install = ":yukawa_modules_install",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "yukawa_dist_files",
|
|
srcs = [
|
|
":yukawa",
|
|
":yukawa_initramfs",
|
|
":yukawa_modules_install",
|
|
],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "yukawa_dist",
|
|
srcs = [":yukawa_dist_files"],
|
|
visibility = ["//visibility:private"],
|
|
destdir = "out/yukawa/dist",
|
|
)
|
|
|
|
# allmodconfig build tests.
|
|
# These are build tests only, so:
|
|
# - outs are intentionally set to empty to not copy anything to DIST_DIR
|
|
# - --allow-undeclared-modules must be used so modules are not declared or copied.
|
|
# - No dist target because these are build tests. We don't care about the artifacts.
|
|
|
|
# tools/bazel build --allow_undeclared_modules //common:kernel_aarch64_allmodconfig
|
|
kernel_build(
|
|
name = "kernel_aarch64_allmodconfig",
|
|
srcs = [":kernel_aarch64_sources"],
|
|
# Hack to actually check the build.
|
|
# Otherwise, Bazel thinks that there are no output files, and skip building.
|
|
outs = [".config"],
|
|
arch = "arm64",
|
|
defconfig = "//build/kernel/kleaf:allmodconfig",
|
|
make_goals = [
|
|
"Image",
|
|
"modules",
|
|
],
|
|
makefile = ":Makefile",
|
|
post_defconfig_fragments = ["arch/arm64/configs/allmodconfig.fragment"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# tools/bazel build --allow_undeclared_modules //common:kernel_x86_64_allmodconfig
|
|
kernel_build(
|
|
name = "kernel_x86_64_allmodconfig",
|
|
srcs = [":kernel_x86_64_sources"],
|
|
# Hack to actually check the build.
|
|
# Otherwise, Bazel thinks that there are no output files, and skip building.
|
|
outs = [".config"],
|
|
arch = "x86_64",
|
|
defconfig = "//build/kernel/kleaf:allmodconfig",
|
|
make_goals = [
|
|
"bzImage",
|
|
"modules",
|
|
],
|
|
makefile = ":Makefile",
|
|
post_defconfig_fragments = ["arch/x86/configs/allmodconfig.fragment"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# tools/bazel build //common:allmodconfig_modinfo_summaries --allow_undeclared_modules
|
|
modinfo_summary_report(
|
|
name = "allmodconfig_modinfo_summaries",
|
|
deps = [
|
|
":kernel_aarch64_allmodconfig",
|
|
":kernel_x86_64_allmodconfig",
|
|
],
|
|
)
|
|
|
|
# tools/bazel build --allow_undeclared_modules //common:kernel_arm_allmodconfig
|
|
kernel_build(
|
|
name = "kernel_arm_allmodconfig",
|
|
# We don't have an arm-specific source list, so use the common one.
|
|
srcs = [":common_kernel_sources"],
|
|
# Hack to actually check the build.
|
|
# Otherwise, Bazel thinks that there are no output files, and skip building.
|
|
outs = [".config"],
|
|
arch = "arm",
|
|
defconfig = "//build/kernel/kleaf:allmodconfig",
|
|
make_goals = [
|
|
"zImage",
|
|
"modules",
|
|
],
|
|
makefile = ":Makefile",
|
|
post_defconfig_fragments = ["arch/arm/configs/allmodconfig.fragment"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# KUnit test targets
|
|
_KUNIT_DIR = "testcases/kunit"
|
|
|
|
pkg_files(
|
|
name = "kunit_tests_config_arm64",
|
|
srcs = [
|
|
"tools/testing/kunit/android/tradefed_configs/config_arm64.xml",
|
|
],
|
|
renames = {
|
|
"tools/testing/kunit/android/tradefed_configs/config_arm64.xml": _KUNIT_DIR + "/kunit.config",
|
|
},
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kunit_tests_config_x86_64",
|
|
srcs = [
|
|
"tools/testing/kunit/android/tradefed_configs/config_x86_64.xml",
|
|
],
|
|
renames = {
|
|
"tools/testing/kunit/android/tradefed_configs/config_x86_64.xml": _KUNIT_DIR + "/kunit.config",
|
|
},
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kunit_modules_arm64",
|
|
srcs = [
|
|
":kernel_aarch64/" + e
|
|
for e in get_kunit_modules_list("arm64")
|
|
],
|
|
prefix = _KUNIT_DIR + "/arm64",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kunit_modules_x86_64",
|
|
srcs = [
|
|
":kernel_x86_64/" + e
|
|
for e in get_kunit_modules_list("x86_64")
|
|
],
|
|
prefix = _KUNIT_DIR + "/x86_64",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kunit_tests_arm64_pkg_files",
|
|
srcs = [
|
|
":kunit_modules_arm64",
|
|
":kunit_tests_config_arm64",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kunit_tests_x86_64_pkg_files",
|
|
srcs = [
|
|
":kunit_modules_x86_64",
|
|
":kunit_tests_config_x86_64",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# KUnit build rules for local execution workflow
|
|
# Run by bazel run //common:kunit_tests_arm64 -- -v --destdir /tmp/kernel_tests/
|
|
pkg_install(
|
|
name = "kunit_tests_arm64",
|
|
srcs = [
|
|
":kunit_tests_arm64_pkg_files",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kunit_tests_x86_64",
|
|
srcs = [
|
|
":kunit_tests_x86_64_pkg_files",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
py_library(
|
|
name = "kunit_parser",
|
|
srcs = [
|
|
"tools/testing/kunit/kunit_parser.py",
|
|
"tools/testing/kunit/kunit_printer.py",
|
|
],
|
|
imports = ["tools/testing/kunit"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# DDK Headers
|
|
# All headers. These are the public targets for DDK modules to use.
|
|
alias(
|
|
name = "all_headers",
|
|
actual = "all_headers_aarch64",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
ddk_headers(
|
|
name = "all_headers_aarch64",
|
|
hdrs = [":all_headers_allowlist_aarch64"] + select({
|
|
"//build/kernel/kleaf:allow_ddk_unsafe_headers_set": [":all_headers_unsafe"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
ddk_headers_archive(
|
|
name = "kernel_aarch64_ddk_headers_archive",
|
|
srcs = [
|
|
"all_headers_aarch64",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
ddk_headers(
|
|
name = "all_headers_arm",
|
|
hdrs = [":all_headers_allowlist_arm"] + select({
|
|
"//build/kernel/kleaf:allow_ddk_unsafe_headers_set": [":all_headers_unsafe"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
ddk_headers(
|
|
name = "all_headers_x86_64",
|
|
hdrs = [":all_headers_allowlist_x86_64"] + select({
|
|
"//build/kernel/kleaf:allow_ddk_unsafe_headers_set": [":all_headers_unsafe"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# Implementation details for DDK headers. The targets below cannot be directly
|
|
# depended on by DDK modules.
|
|
|
|
# Headers needed to include drivers/usb/host/xhci.h.
|
|
ddk_headers(
|
|
name = "xhci_headers",
|
|
hdrs = [
|
|
"drivers/usb/core/hub.h",
|
|
"drivers/usb/core/usb.h",
|
|
"drivers/usb/host/pci-quirks.h",
|
|
"drivers/usb/host/xhci.h",
|
|
"drivers/usb/host/xhci-caps.h",
|
|
"drivers/usb/host/xhci-ext-caps.h",
|
|
"drivers/usb/host/xhci-plat.h",
|
|
"drivers/usb/host/xhci-port.h",
|
|
],
|
|
linux_includes = [
|
|
"drivers/usb",
|
|
"drivers/usb/host",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# DDK headers allowlist. This is the list of all headers and include
|
|
# directories that are safe to use in DDK modules.
|
|
ddk_headers(
|
|
name = "all_headers_allowlist_aarch64",
|
|
hdrs = [
|
|
"drivers/extcon/extcon.h",
|
|
"drivers/pci/controller/dwc/pcie-designware.h",
|
|
"drivers/pci/pci.h",
|
|
"drivers/thermal/thermal_core.h",
|
|
"drivers/thermal/thermal_debugfs.h",
|
|
"drivers/thermal/thermal_netlink.h",
|
|
"drivers/thermal/thermal_thresholds.h",
|
|
"drivers/usb/dwc3/core.h",
|
|
"sound/usb/card.h",
|
|
"sound/usb/usbaudio.h",
|
|
":all_headers_allowlist_aarch64_globs",
|
|
":all_headers_allowlist_common_globs",
|
|
":all_headers_allowlist_exynos",
|
|
":xhci_headers",
|
|
],
|
|
# The list of include directories where source files can #include headers
|
|
# from. In other words, these are the `-I` option to the C compiler.
|
|
# These are prepended to LINUXINCLUDE.
|
|
linux_includes = [
|
|
"arch/arm64/include",
|
|
"arch/arm64/include/uapi",
|
|
"drivers/extcon",
|
|
"drivers/pci",
|
|
"drivers/pci/controller/dwc",
|
|
"drivers/thermal",
|
|
"drivers/usb",
|
|
"sound/usb",
|
|
"include",
|
|
"include/uapi",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
ddk_headers(
|
|
name = "all_headers_allowlist_arm",
|
|
hdrs = [
|
|
":all_headers_allowlist_arm_globs",
|
|
":all_headers_allowlist_common_globs",
|
|
],
|
|
# The list of include directories where source files can #include headers
|
|
# from. In other words, these are the `-I` option to the C compiler.
|
|
# These are prepended to LINUXINCLUDE.
|
|
linux_includes = [
|
|
"arch/arm/include",
|
|
"arch/arm/include/uapi",
|
|
"include",
|
|
"include/uapi",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
ddk_headers(
|
|
name = "all_headers_allowlist_x86_64",
|
|
hdrs = [
|
|
":all_headers_allowlist_common_globs",
|
|
":all_headers_allowlist_x86_64_globs",
|
|
],
|
|
# The list of include directories where source files can #include headers
|
|
# from. In other words, these are the `-I` option to the C compiler.
|
|
# These are prepended to LINUXINCLUDE.
|
|
linux_includes = [
|
|
"arch/x86/include",
|
|
"arch/x86/include/uapi",
|
|
"include",
|
|
"include/uapi",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# List of DDK headers allowlist that are glob()-ed to avoid changes of BUILD
|
|
# file when the list of files changes. All headers in these directories
|
|
# are safe to use.
|
|
# These are separate filegroup targets so the all_headers_allowlist_* are
|
|
# more friendly to batch BUILD file update tools like buildozer.
|
|
|
|
# globs() for arm64 only
|
|
filegroup(
|
|
name = "all_headers_allowlist_aarch64_globs",
|
|
srcs = glob(["arch/arm64/include/**/*.h"]),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# globs() for arm only
|
|
filegroup(
|
|
name = "all_headers_allowlist_arm_globs",
|
|
srcs = glob(["arch/arm/include/**/*.h"]),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# globs() for x86 only
|
|
filegroup(
|
|
name = "all_headers_allowlist_x86_64_globs",
|
|
srcs = glob(["arch/x86/include/**/*.h"]),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# globs() for all architectures
|
|
filegroup(
|
|
name = "all_headers_allowlist_common_globs",
|
|
srcs = glob(["include/**/*.h"]),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
# DDK headers unsafe list. This is the list of all headers and include
|
|
# directories that may be used during migration from kernel_module's, but
|
|
# should be avoided in general.
|
|
# Use with caution; items may:
|
|
# - be removed without notice
|
|
# - be moved into all_headers
|
|
ddk_headers(
|
|
name = "all_headers_unsafe",
|
|
hdrs = [
|
|
"//build/kernel/kleaf:user_ddk_unsafe_headers",
|
|
],
|
|
# The list of include directories where source files can #include headers
|
|
# from. In other words, these are the `-I` option to the C compiler.
|
|
# Unsafe include directories are appended to ccflags-y.
|
|
includes = [
|
|
".",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
ddk_headers(
|
|
name = "all_headers_allowlist_exynos",
|
|
hdrs = [
|
|
"drivers/android/binder_alloc.h",
|
|
"drivers/android/binder_internal.h",
|
|
"drivers/android/binder_trace.h",
|
|
"drivers/android/dbitmap.h",
|
|
"kernel/sched/cpudeadline.h",
|
|
"kernel/sched/cpupri.h",
|
|
"kernel/sched/ext.h",
|
|
"kernel/sched/features.h",
|
|
"kernel/sched/sched.h",
|
|
"kernel/sched/stats.h",
|
|
"kernel/workqueue_internal.h",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
_KSELFTEST_DIR = "testcases/selftests"
|
|
|
|
_KSELFTEST_COPTS = [
|
|
"-O3",
|
|
"-pthread",
|
|
"-std=gnu99",
|
|
"-include",
|
|
paths.join(
|
|
package_relative_label(":x").workspace_root,
|
|
package_relative_label(":x").package,
|
|
"tools/testing/selftests/android/include/bionic-compat.h",
|
|
),
|
|
] + select({
|
|
"//build/kernel/kleaf/platforms/config_settings:android_arm": ["-mcpu=cortex-a8"],
|
|
"//conditions:default": [],
|
|
})
|
|
|
|
cc_library(
|
|
name = "kselftest_headers_lib",
|
|
hdrs = glob(["tools/testing/selftests/*.h"]) + [
|
|
"tools/testing/selftests/android/include/bionic-compat.h",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
defines = [
|
|
"_GNU_SOURCE=",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_binderfs_binderfs_test",
|
|
srcs = ["tools/testing/selftests/filesystems/binderfs/binderfs_test.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_breakpoints_breakpoint_test",
|
|
srcs = select({
|
|
"//build/kernel/kleaf/platforms/config_settings:android_x86_64": ["tools/testing/selftests/breakpoints/breakpoint_test.c"],
|
|
"//build/kernel/kleaf/platforms/config_settings:android_i386": ["tools/testing/selftests/breakpoints/breakpoint_test.c"],
|
|
"//build/kernel/kleaf/platforms/config_settings:android_arm64": ["tools/testing/selftests/breakpoints/breakpoint_test_arm64.c"],
|
|
"//conditions:default": [],
|
|
}),
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_kcmp_kcmp_test",
|
|
srcs = ["tools/testing/selftests/kcmp/kcmp_test.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_ptrace_peeksiginfo",
|
|
srcs = ["tools/testing/selftests/ptrace/peeksiginfo.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_rtc_rtctest",
|
|
srcs = ["tools/testing/selftests/rtc/rtctest.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "kselftest_vdso",
|
|
srcs = ["tools/testing/selftests/vDSO/parse_vdso.c"],
|
|
hdrs = [
|
|
"include/uapi/linux/auxvec.h",
|
|
"include/uapi/linux/elf.h",
|
|
"tools/testing/selftests/vDSO/parse_vdso.h",
|
|
"tools/testing/selftests/vDSO/vdso_call.h",
|
|
"tools/testing/selftests/vDSO/vdso_config.h",
|
|
],
|
|
copts = _KSELFTEST_COPTS + [
|
|
"-I",
|
|
paths.join(
|
|
package_relative_label(":x").workspace_root,
|
|
package_relative_label(":x").package,
|
|
"include/uapi/",
|
|
),
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_vdso_vdso_test_abi",
|
|
srcs = ["tools/testing/selftests/vDSO/vdso_test_abi.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_vdso",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_vdso_vdso_test_clock_getres",
|
|
srcs = ["tools/testing/selftests/vDSO/vdso_test_clock_getres.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_vdso",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_vdso_vdso_test_getcpu",
|
|
srcs = ["tools/testing/selftests/vDSO/vdso_test_getcpu.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_vdso",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_vdso_vdso_test_gettimeofday",
|
|
srcs = ["tools/testing/selftests/vDSO/vdso_test_gettimeofday.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_vdso",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "kselftest_futex_headers_lib",
|
|
hdrs = glob(["tools/testing/selftests/futex/include/*.h"]),
|
|
copts = _KSELFTEST_COPTS,
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_requeue_pi_mismatched_ops",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_requeue_pi_mismatched_ops.c"],
|
|
out = "futex_requeue_pi_mismatched_ops",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_requeue_pi_signal_restart",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c"],
|
|
out = "futex_requeue_pi_signal_restart",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_requeue_pi",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_requeue_pi.c"],
|
|
out = "futex_requeue_pi",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_requeue",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_requeue.c"],
|
|
out = "futex_requeue",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_wait_private_mapped_file",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_wait_private_mapped_file.c"],
|
|
out = "futex_wait_private_mapped_file",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_wait_timeout",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_wait_timeout.c"],
|
|
out = "futex_wait_timeout",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_wait_uninitialized_heap",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap.c"],
|
|
out = "futex_wait_uninitialized_heap",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_wait_wouldblock",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_wait_wouldblock.c"],
|
|
out = "futex_wait_wouldblock",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_futex_futex_wait",
|
|
srcs = ["tools/testing/selftests/futex/functional/futex_wait.c"],
|
|
out = "futex_wait",
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/futex/include",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_futex_headers_lib",
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "kselftest_memfd",
|
|
srcs = ["tools/testing/selftests/memfd/common.c"],
|
|
hdrs = ["tools/testing/selftests/memfd/common.h"],
|
|
copts = _KSELFTEST_COPTS,
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_memfd_test",
|
|
srcs = ["tools/testing/selftests/memfd/memfd_test.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_memfd"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_compaction_test",
|
|
srcs = ["tools/testing/selftests/mm/compaction_test.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_hugepage_mmap",
|
|
srcs = ["tools/testing/selftests/mm/hugepage-mmap.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_hugepage_shm",
|
|
srcs = ["tools/testing/selftests/mm/hugepage-shm.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_map_hugetlb",
|
|
srcs = ["tools/testing/selftests/mm/map_hugetlb.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_mm_vm_util",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_mlock_random_test",
|
|
srcs = [
|
|
"tools/testing/selftests/mm/mlock-random-test.c",
|
|
"tools/testing/selftests/mm/mlock2.h",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/mm",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_mlock2_tests",
|
|
srcs = [
|
|
"tools/testing/selftests/mm/mlock2.h",
|
|
"tools/testing/selftests/mm/mlock2-tests.c",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/mm",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_on_fault_limit",
|
|
srcs = ["tools/testing/selftests/mm/on-fault-limit.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_mremap_dontunmap",
|
|
srcs = ["tools/testing/selftests/mm/mremap_dontunmap.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_mremap_test",
|
|
srcs = ["tools/testing/selftests/mm/mremap_test.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "kselftest_mm_vm_util",
|
|
srcs = ["tools/testing/selftests/mm/vm_util.c"],
|
|
hdrs = [
|
|
"include/uapi/linux/fs.h",
|
|
"tools/testing/selftests/mm/vm_util.h",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"include/uapi/",
|
|
"tools/testing/selftests",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_thuge_gen",
|
|
srcs = [
|
|
"tools/testing/selftests/mm/thuge-gen.c",
|
|
],
|
|
copts = _KSELFTEST_COPTS + [
|
|
"-Wno-macro-redefined",
|
|
],
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_mm_vm_util",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_transhuge_stress",
|
|
srcs = [
|
|
"tools/testing/selftests/mm/transhuge-stress.c",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/mm/",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_mm_vm_util",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "kselftest_mm_uffd_common",
|
|
srcs = ["tools/testing/selftests/mm/uffd-common.c"],
|
|
hdrs = [
|
|
"include/uapi/linux/userfaultfd.h",
|
|
"mm/gup_test.h",
|
|
"tools/testing/selftests/kselftest.h",
|
|
"tools/testing/selftests/mm/uffd-common.h",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"include/uapi/",
|
|
"tools/testing/selftests/mm/",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_mm_vm_util",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_mm_uffd_unit_tests",
|
|
srcs = [
|
|
"tools/testing/selftests/mm/uffd-unit-tests.c",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
"tools/testing/selftests/mm/",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_mm_uffd_common",
|
|
":kselftest_mm_vm_util",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_size_test_get_size",
|
|
srcs = ["tools/testing/selftests/size/get_size.c"],
|
|
copts = _KSELFTEST_COPTS + select({
|
|
"//build/kernel/kleaf/platforms/config_settings:android_x86_64": ["-mstackrealign"],
|
|
"//conditions:default": [],
|
|
}),
|
|
includes = [
|
|
"tools/testing/selftests",
|
|
],
|
|
linkopts = ["-nostartfiles"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_adjtick",
|
|
srcs = ["tools/testing/selftests/timers/adjtick.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_alarmtimer_suspend",
|
|
srcs = ["tools/testing/selftests/timers/alarmtimer-suspend.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_change_skew",
|
|
srcs = ["tools/testing/selftests/timers/change_skew.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_inconsistency_check",
|
|
":kselftest_timers_nanosleep",
|
|
":kselftest_timers_tests_raw_skew",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_clocksource_switch",
|
|
srcs = ["tools/testing/selftests/timers/clocksource-switch.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_inconsistency_check",
|
|
":kselftest_timers_nanosleep",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_freq_step",
|
|
srcs = ["tools/testing/selftests/timers/freq-step.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_inconsistency_check",
|
|
srcs = ["tools/testing/selftests/timers/inconsistency-check.c"],
|
|
out = "inconsistency-check",
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_leap_a_day",
|
|
srcs = ["tools/testing/selftests/timers/leap-a-day.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_leapcrash",
|
|
srcs = ["tools/testing/selftests/timers/leapcrash.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_nanosleep",
|
|
srcs = ["tools/testing/selftests/timers/nanosleep.c"],
|
|
out = "nanosleep",
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "kselftest_timers_common_hdrs",
|
|
hdrs = [
|
|
"include/vdso/time64.h",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["."],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_nsleep_lat",
|
|
srcs = ["tools/testing/selftests/timers/nsleep-lat.c"],
|
|
out = "nsleep-lat",
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_posix_timers",
|
|
srcs = ["tools/testing/selftests/timers/posix_timers.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_tests_raw_skew",
|
|
srcs = ["tools/testing/selftests/timers/raw_skew.c"],
|
|
out = "raw_skew",
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_set_2038",
|
|
srcs = ["tools/testing/selftests/timers/set-2038.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
":kselftest_timers_inconsistency_check",
|
|
":kselftest_timers_nanosleep",
|
|
":kselftest_timers_nsleep_lat",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_set_tai",
|
|
srcs = ["tools/testing/selftests/timers/set-tai.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_set_timer_lat",
|
|
srcs = ["tools/testing/selftests/timers/set-timer-lat.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_set_tz",
|
|
srcs = ["tools/testing/selftests/timers/set-tz.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_skew_consistency",
|
|
srcs = ["tools/testing/selftests/timers/skew_consistency.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_inconsistency_check",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_threadtest",
|
|
srcs = ["tools/testing/selftests/timers/threadtest.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_timers_valid_adjtimex",
|
|
srcs = ["tools/testing/selftests/timers/valid-adjtimex.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
":kselftest_timers_common_hdrs",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_net_socket",
|
|
srcs = ["tools/testing/selftests/net/socket.c"],
|
|
copts = _KSELFTEST_COPTS + ["-Wno-gnu-variable-sized-type-not-at-end"],
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_net_reuseaddr_conflict",
|
|
srcs = ["tools/testing/selftests/net/reuseaddr_conflict.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_net_psock_tpacket",
|
|
srcs = [
|
|
"tools/testing/selftests/net/psock_lib.h",
|
|
"tools/testing/selftests/net/psock_tpacket.c",
|
|
],
|
|
copts = _KSELFTEST_COPTS + ["-Wno-gnu-variable-sized-type-not-at-end"],
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [":kselftest_headers_lib"],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_capabilities_test_execve",
|
|
srcs = ["tools/testing/selftests/capabilities/test_execve.c"],
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_capabilities_validate_cap",
|
|
":kselftest_headers_lib",
|
|
"@libcap_ng//:libcap-ng",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_capabilities_validate_cap",
|
|
srcs = ["tools/testing/selftests/capabilities/validate_cap.c"],
|
|
out = "validate_cap",
|
|
copts = _KSELFTEST_COPTS,
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap_ng//:libcap-ng",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_seccomp_seccomp_bpf",
|
|
srcs = [
|
|
"tools/testing/selftests/clone3/clone3_selftests.h",
|
|
"tools/testing/selftests/seccomp/seccomp_bpf.c",
|
|
],
|
|
copts = _KSELFTEST_COPTS + [
|
|
"-Wno-unused-function",
|
|
"-D__GLIBC_PREREQ(a,b)",
|
|
],
|
|
includes = ["tools/testing/selftests"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
"@libcap",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_x86_single_step_syscall",
|
|
srcs = [
|
|
"tools/testing/selftests/x86/helpers.h",
|
|
"tools/testing/selftests/x86/single_step_syscall.c",
|
|
],
|
|
abis = [
|
|
"x86_64",
|
|
"x86",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
linkopts = ["-static"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_x86_syscall_nt",
|
|
srcs = [
|
|
"tools/testing/selftests/x86/helpers.h",
|
|
"tools/testing/selftests/x86/syscall_nt.c",
|
|
],
|
|
abis = [
|
|
"x86_64",
|
|
"x86",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
linkopts = ["-static"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_x86_ptrace_syscall",
|
|
srcs = [
|
|
"tools/testing/selftests/x86/helpers.h",
|
|
"tools/testing/selftests/x86/ptrace_syscall.c",
|
|
],
|
|
abis = [
|
|
"x86_64",
|
|
"x86",
|
|
],
|
|
copts = _KSELFTEST_COPTS + ["-fomit-frame-pointer"],
|
|
includes = ["tools/testing/selftests"],
|
|
linkopts = ["-static"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_x86_test_mremap_vdso",
|
|
srcs = [
|
|
"tools/testing/selftests/x86/helpers.h",
|
|
"tools/testing/selftests/x86/test_mremap_vdso.c",
|
|
],
|
|
abis = [
|
|
"x86_64",
|
|
"x86",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
linkopts = ["-static"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_x86_check_initial_reg_state",
|
|
srcs = [
|
|
"tools/testing/selftests/x86/check_initial_reg_state.c",
|
|
"tools/testing/selftests/x86/helpers.h",
|
|
],
|
|
abis = [
|
|
"x86_64",
|
|
"x86",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
linkopts = [
|
|
"-static",
|
|
"-Wl,-ereal_start",
|
|
],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_abi(
|
|
name = "kselftest_x86_ldt_gdt",
|
|
srcs = [
|
|
"tools/testing/selftests/x86/helpers.h",
|
|
"tools/testing/selftests/x86/ldt_gdt.c",
|
|
],
|
|
abis = [
|
|
"x86_64",
|
|
"x86",
|
|
],
|
|
copts = _KSELFTEST_COPTS,
|
|
includes = ["tools/testing/selftests"],
|
|
linkopts = ["-static"],
|
|
path_prefix = _KSELFTEST_DIR,
|
|
target_compatible_with = ["@platforms//os:android"],
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
":kselftest_headers_lib",
|
|
],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kselftest_config_x86_64",
|
|
srcs = ["tools/testing/selftests/android/config_x86_64.xml"],
|
|
renames = {"tools/testing/selftests/android/config_x86_64.xml": _KSELFTEST_DIR + "/selftests.config"},
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "kselftest_config_arm64",
|
|
srcs = ["tools/testing/selftests/android/config_arm64.xml"],
|
|
renames = {"tools/testing/selftests/android/config_arm64.xml": _KSELFTEST_DIR + "/selftests.config"},
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kselftest_tests_x86_64",
|
|
srcs = [
|
|
":kselftest_binderfs_binderfs_test_x86_64",
|
|
":kselftest_breakpoints_breakpoint_test_x86_64",
|
|
":kselftest_capabilities_test_execve_x86_64",
|
|
":kselftest_capabilities_validate_cap_x86_64",
|
|
":kselftest_futex_futex_requeue_pi_mismatched_ops_x86_64",
|
|
":kselftest_futex_futex_requeue_pi_signal_restart_x86_64",
|
|
":kselftest_futex_futex_requeue_pi_x86_64",
|
|
":kselftest_futex_futex_requeue_x86_64",
|
|
":kselftest_futex_futex_wait_private_mapped_file_x86_64",
|
|
":kselftest_futex_futex_wait_timeout_x86_64",
|
|
":kselftest_futex_futex_wait_uninitialized_heap_x86_64",
|
|
":kselftest_futex_futex_wait_wouldblock_x86_64",
|
|
":kselftest_futex_futex_wait_x86_64",
|
|
":kselftest_kcmp_kcmp_test_x86_64",
|
|
":kselftest_memfd_test_x86_64",
|
|
":kselftest_mm_compaction_test_x86_64",
|
|
":kselftest_mm_hugepage_mmap_x86_64",
|
|
":kselftest_mm_hugepage_shm_x86_64",
|
|
":kselftest_mm_map_hugetlb_x86_64",
|
|
":kselftest_mm_mlock2_tests_x86_64",
|
|
":kselftest_mm_mlock_random_test_x86_64",
|
|
":kselftest_mm_mremap_dontunmap_x86_64",
|
|
":kselftest_mm_mremap_test_x86_64",
|
|
":kselftest_mm_on_fault_limit_x86_64",
|
|
":kselftest_mm_thuge_gen_x86_64",
|
|
":kselftest_mm_transhuge_stress_x86_64",
|
|
":kselftest_mm_uffd_unit_tests_x86_64",
|
|
":kselftest_net_psock_tpacket_x86_64",
|
|
":kselftest_net_reuseaddr_conflict_x86_64",
|
|
":kselftest_net_socket_x86_64",
|
|
":kselftest_ptrace_peeksiginfo_x86_64",
|
|
":kselftest_rtc_rtctest_x86_64",
|
|
":kselftest_seccomp_seccomp_bpf_x86_64",
|
|
":kselftest_size_test_get_size_x86_64",
|
|
":kselftest_timers_adjtick_x86_64",
|
|
":kselftest_timers_alarmtimer_suspend_x86_64",
|
|
":kselftest_timers_change_skew_x86_64",
|
|
":kselftest_timers_clocksource_switch_x86_64",
|
|
":kselftest_timers_freq_step_x86_64",
|
|
":kselftest_timers_inconsistency_check_x86_64",
|
|
":kselftest_timers_leap_a_day_x86_64",
|
|
":kselftest_timers_leapcrash_x86_64",
|
|
":kselftest_timers_nanosleep_x86_64",
|
|
":kselftest_timers_nsleep_lat_x86_64",
|
|
":kselftest_timers_posix_timers_x86_64",
|
|
":kselftest_timers_set_2038_x86_64",
|
|
":kselftest_timers_set_tai_x86_64",
|
|
":kselftest_timers_set_timer_lat_x86_64",
|
|
":kselftest_timers_set_tz_x86_64",
|
|
":kselftest_timers_skew_consistency_x86_64",
|
|
":kselftest_timers_tests_raw_skew_x86_64",
|
|
":kselftest_timers_threadtest_x86_64",
|
|
":kselftest_timers_valid_adjtimex_x86_64",
|
|
":kselftest_vdso_vdso_test_abi_x86_64",
|
|
":kselftest_vdso_vdso_test_clock_getres_x86_64",
|
|
":kselftest_vdso_vdso_test_getcpu_x86_64",
|
|
":kselftest_vdso_vdso_test_gettimeofday_x86_64",
|
|
":kselftest_x86_check_initial_reg_state_x86_64",
|
|
":kselftest_x86_ldt_gdt_x86_64",
|
|
":kselftest_x86_ptrace_syscall_x86_64",
|
|
":kselftest_x86_single_step_syscall_x86_64",
|
|
":kselftest_x86_syscall_nt_x86_64",
|
|
":kselftest_x86_test_mremap_vdso_x86_64",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kselftest_tests_x86",
|
|
srcs = [
|
|
":kselftest_binderfs_binderfs_test_x86",
|
|
":kselftest_breakpoints_breakpoint_test_x86",
|
|
":kselftest_capabilities_test_execve_x86",
|
|
":kselftest_capabilities_validate_cap_x86",
|
|
":kselftest_futex_futex_requeue_pi_mismatched_ops_x86",
|
|
":kselftest_futex_futex_requeue_pi_signal_restart_x86",
|
|
":kselftest_futex_futex_requeue_pi_x86",
|
|
":kselftest_futex_futex_requeue_x86",
|
|
":kselftest_futex_futex_wait_private_mapped_file_x86",
|
|
":kselftest_futex_futex_wait_timeout_x86",
|
|
":kselftest_futex_futex_wait_uninitialized_heap_x86",
|
|
":kselftest_futex_futex_wait_wouldblock_x86",
|
|
":kselftest_futex_futex_wait_x86",
|
|
":kselftest_kcmp_kcmp_test_x86",
|
|
":kselftest_mm_compaction_test_x86",
|
|
":kselftest_mm_hugepage_mmap_x86",
|
|
":kselftest_mm_hugepage_shm_x86",
|
|
":kselftest_mm_map_hugetlb_x86",
|
|
":kselftest_mm_mlock2_tests_x86",
|
|
":kselftest_mm_mlock_random_test_x86",
|
|
":kselftest_mm_mremap_dontunmap_x86",
|
|
":kselftest_mm_mremap_test_x86",
|
|
":kselftest_mm_on_fault_limit_x86",
|
|
":kselftest_mm_thuge_gen_x86",
|
|
":kselftest_mm_transhuge_stress_x86",
|
|
":kselftest_mm_uffd_unit_tests_x86",
|
|
":kselftest_net_psock_tpacket_x86",
|
|
":kselftest_net_reuseaddr_conflict_x86",
|
|
":kselftest_net_socket_x86",
|
|
":kselftest_ptrace_peeksiginfo_x86",
|
|
":kselftest_rtc_rtctest_x86",
|
|
":kselftest_seccomp_seccomp_bpf_x86",
|
|
":kselftest_size_test_get_size_x86",
|
|
":kselftest_timers_adjtick_x86",
|
|
":kselftest_timers_alarmtimer_suspend_x86",
|
|
":kselftest_timers_change_skew_x86",
|
|
":kselftest_timers_clocksource_switch_x86",
|
|
":kselftest_timers_freq_step_x86",
|
|
":kselftest_timers_inconsistency_check_x86",
|
|
":kselftest_timers_leap_a_day_x86",
|
|
":kselftest_timers_leapcrash_x86",
|
|
":kselftest_timers_nanosleep_x86",
|
|
":kselftest_timers_nsleep_lat_x86",
|
|
":kselftest_timers_posix_timers_x86",
|
|
":kselftest_timers_set_2038_x86",
|
|
":kselftest_timers_set_tai_x86",
|
|
":kselftest_timers_set_timer_lat_x86",
|
|
":kselftest_timers_set_tz_x86",
|
|
":kselftest_timers_skew_consistency_x86",
|
|
":kselftest_timers_tests_raw_skew_x86",
|
|
":kselftest_timers_threadtest_x86",
|
|
":kselftest_timers_valid_adjtimex_x86",
|
|
":kselftest_vdso_vdso_test_abi_x86",
|
|
":kselftest_vdso_vdso_test_clock_getres_x86",
|
|
":kselftest_vdso_vdso_test_getcpu_x86",
|
|
":kselftest_vdso_vdso_test_gettimeofday_x86",
|
|
":kselftest_x86_check_initial_reg_state_x86",
|
|
":kselftest_x86_ldt_gdt_x86",
|
|
":kselftest_x86_ptrace_syscall_x86",
|
|
":kselftest_x86_single_step_syscall_x86",
|
|
":kselftest_x86_syscall_nt_x86",
|
|
":kselftest_x86_test_mremap_vdso_x86",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kselftest_tests_arm",
|
|
srcs = [
|
|
":kselftest_binderfs_binderfs_test_arm",
|
|
":kselftest_capabilities_test_execve_arm",
|
|
":kselftest_capabilities_validate_cap_arm",
|
|
":kselftest_futex_futex_requeue_arm",
|
|
":kselftest_futex_futex_requeue_pi_arm",
|
|
":kselftest_futex_futex_requeue_pi_mismatched_ops_arm",
|
|
":kselftest_futex_futex_requeue_pi_signal_restart_arm",
|
|
":kselftest_futex_futex_wait_arm",
|
|
":kselftest_futex_futex_wait_private_mapped_file_arm",
|
|
":kselftest_futex_futex_wait_timeout_arm",
|
|
":kselftest_futex_futex_wait_uninitialized_heap_arm",
|
|
":kselftest_futex_futex_wait_wouldblock_arm",
|
|
":kselftest_kcmp_kcmp_test_arm",
|
|
":kselftest_mm_compaction_test_arm",
|
|
":kselftest_mm_hugepage_mmap_arm",
|
|
":kselftest_mm_hugepage_shm_arm",
|
|
":kselftest_mm_map_hugetlb_arm",
|
|
":kselftest_mm_mlock2_tests_arm",
|
|
#":kselftest_mm_mlock_random_test_arm",
|
|
":kselftest_mm_mremap_dontunmap_arm",
|
|
":kselftest_mm_mremap_test_arm",
|
|
":kselftest_mm_on_fault_limit_arm",
|
|
":kselftest_mm_thuge_gen_arm",
|
|
":kselftest_mm_transhuge_stress_arm",
|
|
":kselftest_mm_uffd_unit_tests_arm",
|
|
#":kselftest_net_psock_tpacket_arm",
|
|
":kselftest_net_reuseaddr_conflict_arm",
|
|
":kselftest_net_socket_arm",
|
|
":kselftest_ptrace_peeksiginfo_arm",
|
|
":kselftest_rtc_rtctest_arm",
|
|
#":kselftest_seccomp_seccomp_bpf_arm",
|
|
":kselftest_size_test_get_size_arm",
|
|
":kselftest_timers_adjtick_arm",
|
|
":kselftest_timers_alarmtimer_suspend_arm",
|
|
":kselftest_timers_change_skew_arm",
|
|
":kselftest_timers_clocksource_switch_arm",
|
|
#":kselftest_timers_freq_step_arm",
|
|
":kselftest_timers_inconsistency_check_arm",
|
|
":kselftest_timers_leap_a_day_arm",
|
|
":kselftest_timers_leapcrash_arm",
|
|
":kselftest_timers_nanosleep_arm",
|
|
":kselftest_timers_nsleep_lat_arm",
|
|
":kselftest_timers_posix_timers_arm",
|
|
":kselftest_timers_set_2038_arm",
|
|
":kselftest_timers_set_tai_arm",
|
|
":kselftest_timers_set_timer_lat_arm",
|
|
":kselftest_timers_set_tz_arm",
|
|
":kselftest_timers_skew_consistency_arm",
|
|
":kselftest_timers_tests_raw_skew_arm",
|
|
":kselftest_timers_threadtest_arm",
|
|
":kselftest_timers_valid_adjtimex_arm",
|
|
":kselftest_vdso_vdso_test_abi_arm",
|
|
":kselftest_vdso_vdso_test_clock_getres_arm",
|
|
":kselftest_vdso_vdso_test_getcpu_arm",
|
|
":kselftest_vdso_vdso_test_gettimeofday_arm",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kselftest_tests_arm64",
|
|
srcs = [
|
|
":kselftest_binderfs_binderfs_test_arm64",
|
|
":kselftest_breakpoints_breakpoint_test_arm64",
|
|
":kselftest_capabilities_test_execve_arm64",
|
|
":kselftest_capabilities_validate_cap_arm64",
|
|
":kselftest_futex_futex_requeue_arm64",
|
|
":kselftest_futex_futex_requeue_pi_arm64",
|
|
":kselftest_futex_futex_requeue_pi_mismatched_ops_arm64",
|
|
":kselftest_futex_futex_requeue_pi_signal_restart_arm64",
|
|
":kselftest_futex_futex_wait_arm64",
|
|
":kselftest_futex_futex_wait_private_mapped_file_arm64",
|
|
":kselftest_futex_futex_wait_timeout_arm64",
|
|
":kselftest_futex_futex_wait_uninitialized_heap_arm64",
|
|
":kselftest_futex_futex_wait_wouldblock_arm64",
|
|
":kselftest_kcmp_kcmp_test_arm64",
|
|
":kselftest_memfd_test_arm64",
|
|
":kselftest_mm_compaction_test_arm64",
|
|
":kselftest_mm_hugepage_mmap_arm64",
|
|
":kselftest_mm_hugepage_shm_arm64",
|
|
":kselftest_mm_map_hugetlb_arm64",
|
|
":kselftest_mm_mlock2_tests_arm64",
|
|
":kselftest_mm_mlock_random_test_arm64",
|
|
":kselftest_mm_mremap_dontunmap_arm64",
|
|
":kselftest_mm_mremap_test_arm64",
|
|
":kselftest_mm_on_fault_limit_arm64",
|
|
":kselftest_mm_thuge_gen_arm64",
|
|
":kselftest_mm_transhuge_stress_arm64",
|
|
":kselftest_mm_uffd_unit_tests_arm64",
|
|
":kselftest_net_psock_tpacket_arm64",
|
|
":kselftest_net_reuseaddr_conflict_arm64",
|
|
":kselftest_net_socket_arm64",
|
|
":kselftest_ptrace_peeksiginfo_arm64",
|
|
":kselftest_rtc_rtctest_arm64",
|
|
":kselftest_seccomp_seccomp_bpf_arm64",
|
|
":kselftest_size_test_get_size_arm64",
|
|
":kselftest_timers_adjtick_arm64",
|
|
":kselftest_timers_alarmtimer_suspend_arm64",
|
|
":kselftest_timers_change_skew_arm64",
|
|
":kselftest_timers_clocksource_switch_arm64",
|
|
":kselftest_timers_freq_step_arm64",
|
|
":kselftest_timers_inconsistency_check_arm64",
|
|
":kselftest_timers_leap_a_day_arm64",
|
|
":kselftest_timers_leapcrash_arm64",
|
|
":kselftest_timers_nanosleep_arm64",
|
|
":kselftest_timers_nsleep_lat_arm64",
|
|
":kselftest_timers_posix_timers_arm64",
|
|
":kselftest_timers_set_2038_arm64",
|
|
":kselftest_timers_set_tai_arm64",
|
|
":kselftest_timers_set_timer_lat_arm64",
|
|
":kselftest_timers_set_tz_arm64",
|
|
":kselftest_timers_skew_consistency_arm64",
|
|
":kselftest_timers_tests_raw_skew_arm64",
|
|
":kselftest_timers_threadtest_arm64",
|
|
":kselftest_timers_valid_adjtimex_arm64",
|
|
":kselftest_vdso_vdso_test_abi_arm64",
|
|
":kselftest_vdso_vdso_test_clock_getres_arm64",
|
|
":kselftest_vdso_vdso_test_getcpu_arm64",
|
|
":kselftest_vdso_vdso_test_gettimeofday_arm64",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kselftest_tests_x86_64_pkg_filegroup",
|
|
srcs = [
|
|
":kselftest_config_x86_64",
|
|
":kselftest_tests_x86",
|
|
":kselftest_tests_x86_64",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_filegroup(
|
|
name = "kselftest_tests_arm64_pkg_filegroup",
|
|
srcs = [
|
|
":kselftest_config_arm64",
|
|
":kselftest_tests_arm",
|
|
":kselftest_tests_arm64",
|
|
],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kselftest_tests_x86_64_install",
|
|
srcs = [":kselftest_tests_x86_64_pkg_filegroup"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "kselftest_tests_arm64_install",
|
|
srcs = [":kselftest_tests_arm64_pkg_filegroup"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_zip(
|
|
name = "tests_zip_x86_64",
|
|
srcs = [
|
|
":kselftest_tests_x86_64_pkg_filegroup",
|
|
":kunit_tests_x86_64_pkg_files",
|
|
],
|
|
out = "x86_64/tests.zip",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_zip(
|
|
name = "tests_zip_arm64",
|
|
srcs = [
|
|
":kselftest_tests_arm64_pkg_filegroup",
|
|
":kunit_tests_arm64_pkg_files",
|
|
],
|
|
out = "arm64/tests.zip",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
pkg_files(
|
|
name = "tests_zip_x86_64_files",
|
|
srcs = [":tests_zip_x86_64"],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "tests_zip_x86_64_dist",
|
|
srcs = [":tests_zip_x86_64_files"],
|
|
destdir = "out/tests_x86_64/dist",
|
|
)
|
|
|
|
pkg_files(
|
|
name = "tests_zip_arm64_files",
|
|
srcs = [":tests_zip_arm64"],
|
|
strip_prefix = strip_prefix.files_only(),
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_install(
|
|
name = "tests_zip_arm64_dist",
|
|
srcs = [":tests_zip_arm64_files"],
|
|
destdir = "out/tests_arm64/dist",
|
|
)
|
|
|
|
_TEST_MAPPINGS = glob(["**/TEST_MAPPING"])
|
|
|
|
pkg_files(
|
|
name = "test_mappings",
|
|
srcs = _TEST_MAPPINGS,
|
|
prefix = package_name(),
|
|
renames = {file: file for file in _TEST_MAPPINGS},
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
pkg_zip(
|
|
name = "test_mappings_zip",
|
|
srcs = [
|
|
":test_mappings",
|
|
],
|
|
out = "test_mappings.zip",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
exports_files([
|
|
"Makefile",
|
|
])
|