ANDROID: kleaf: Initial list of ddk_headers (1: arm64)

This CL includes headers used by the external modules of
a typical arm64 device.

Allowlist: This is a list of headers and a list of
include directories that are known to be safe
to be used by modules.

- This list includes:
  - Everything under
    - arch/arm64/include
    - include

Unsafe list: This is the list of headers that are known to be used
by a certain Pixel device kernel build, minus allowlist.

The unsafe list is untouched in this CL because:
- mainline is volatile;
- we don't have ddk_module's for arm64 devices on mainline yet.

The command to generate this list is:

bazel run //build/kernel/kleaf:gen_ddk_headers \
  --gen_ddk_headers_target=//gs/google-modules/soc-modules:slider_modules_install
  -- -k

Manual edits:

- manually deleted changes to all_headers_unsafe

This change is a partial cherry-pick of
14e14cc4e9407783a559b22dffd4bd2062714dd5

Bug: 248351908
Bug: 254735056
Signed-off-by: Yifan Hong <elsk@google.com>
Change-Id: I2daf9c1583e59e6852c247c2f3f59a7c91d0022e
This commit is contained in:
Yifan Hong 2022-10-21 20:19:28 -07:00
parent 45d94b7bcf
commit e07b026ae0

View File

@ -262,10 +262,15 @@ ddk_headers(
# directories that are safe to use in DDK modules.
ddk_headers(
name = "all_headers_allowlist",
hdrs = [],
hdrs = [":all_headers_allowlist_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.
includes = [],
includes = [
"arch/arm64/include",
"arch/arm64/include/uapi",
"include",
"include/uapi",
],
visibility = ["//visibility:private"],
)
@ -274,7 +279,10 @@ ddk_headers(
# are safe to use.
filegroup(
name = "all_headers_allowlist_globs",
srcs = [],
srcs = glob([
"arch/arm64/include/**/*.h",
"include/**/*.h",
]),
visibility = ["//visibility:private"],
)