From e07b026ae0f0354f31e46db0cc457f4e84c53464 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Fri, 21 Oct 2022 20:19:28 -0700 Subject: [PATCH] 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 Change-Id: I2daf9c1583e59e6852c247c2f3f59a7c91d0022e --- BUILD.bazel | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 2431373ee5e2..5f96a036a29c 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -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"], )