ANDROID: Add arch specific gki module list targets
* This is a no-op change preparing for the split of target and files based on the architecture used. Bug: 293529933 Change-Id: I7783b60e591aaad23b5446af5cb04af5765f4b3f Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
8b02674c1f
commit
49f32a8f1e
+35
-7
@@ -12,7 +12,7 @@ load(
|
||||
"kernel_modules_install",
|
||||
"merged_kernel_uapi_headers",
|
||||
)
|
||||
load(":modules.bzl", "COMMON_GKI_MODULES_LIST")
|
||||
load(":modules.bzl", "get_gki_modules_list")
|
||||
|
||||
package(
|
||||
default_visibility = [
|
||||
@@ -39,10 +39,38 @@ _GKI_X86_64_MAKE_GOALS = [
|
||||
"modules",
|
||||
]
|
||||
|
||||
# Deprecated - Use arch specific files from below.
|
||||
write_file(
|
||||
name = "gki_system_dlkm_modules",
|
||||
out = "android/gki_system_dlkm_modules",
|
||||
content = COMMON_GKI_MODULES_LIST + [
|
||||
content = get_gki_modules_list("arm64") + [
|
||||
# Ensure new line at the end.
|
||||
"",
|
||||
],
|
||||
)
|
||||
|
||||
write_file(
|
||||
name = "gki_system_dlkm_modules_arm64",
|
||||
out = "android/gki_system_dlkm_modules_arm64",
|
||||
content = get_gki_modules_list("arm64") + [
|
||||
# Ensure new line at the end.
|
||||
"",
|
||||
],
|
||||
)
|
||||
|
||||
write_file(
|
||||
name = "gki_system_dlkm_modules_x86_64",
|
||||
out = "android/gki_system_dlkm_modules_x86_64",
|
||||
content = get_gki_modules_list("x86_64") + [
|
||||
# Ensure new line at the end.
|
||||
"",
|
||||
],
|
||||
)
|
||||
|
||||
write_file(
|
||||
name = "gki_system_dlkm_modules_risc64",
|
||||
out = "android/gki_system_dlkm_modules_riscv64",
|
||||
content = get_gki_modules_list("riscv64") + [
|
||||
# Ensure new line at the end.
|
||||
"",
|
||||
],
|
||||
@@ -50,16 +78,16 @@ write_file(
|
||||
|
||||
define_common_kernels(target_configs = {
|
||||
"kernel_aarch64": {
|
||||
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
|
||||
"module_implicit_outs": get_gki_modules_list("arm64"),
|
||||
"make_goals": _GKI_AARCH64_MAKE_GOALS,
|
||||
},
|
||||
"kernel_riscv64": {
|
||||
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
|
||||
"module_implicit_outs": get_gki_modules_list("riscv64"),
|
||||
"make_goals": _GKI_RISCV64_MAKE_GOALS,
|
||||
},
|
||||
"kernel_x86_64": {
|
||||
"kmi_symbol_list_strict_mode": False,
|
||||
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
|
||||
"module_implicit_outs": get_gki_modules_list("x86_64"),
|
||||
"make_goals": _GKI_X86_64_MAKE_GOALS,
|
||||
},
|
||||
})
|
||||
@@ -411,7 +439,7 @@ kernel_build(
|
||||
"modules",
|
||||
"rk3399-rock-pi-4b.dtb",
|
||||
],
|
||||
module_outs = COMMON_GKI_MODULES_LIST + _ROCKPI4_MODULE_OUTS + _ROCKPI4_WATCHDOG_MODULE_OUTS,
|
||||
module_outs = get_gki_modules_list("arm64") + _ROCKPI4_MODULE_OUTS + _ROCKPI4_WATCHDOG_MODULE_OUTS,
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -434,7 +462,7 @@ kernel_build(
|
||||
"modules",
|
||||
"rk3399-rock-pi-4b.dtb",
|
||||
],
|
||||
module_outs = COMMON_GKI_MODULES_LIST + _ROCKPI4_MODULE_OUTS,
|
||||
module_outs = get_gki_modules_list("arm64") + _ROCKPI4_MODULE_OUTS,
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
|
||||
+41
-1
@@ -6,7 +6,7 @@ This module contains a full list of kernel modules
|
||||
compiled by GKI.
|
||||
"""
|
||||
|
||||
COMMON_GKI_MODULES_LIST = [
|
||||
_COMMON_GKI_MODULES_LIST = [
|
||||
# keep sorted
|
||||
"drivers/block/zram/zram.ko",
|
||||
"drivers/bluetooth/btbcm.ko",
|
||||
@@ -71,3 +71,43 @@ COMMON_GKI_MODULES_LIST = [
|
||||
"net/tipc/tipc.ko",
|
||||
"net/wireless/cfg80211.ko",
|
||||
]
|
||||
|
||||
# Deprecated - Use `get_gki_modules_list` function instead.
|
||||
COMMON_GKI_MODULES_LIST = _COMMON_GKI_MODULES_LIST
|
||||
|
||||
_ARM64_GKI_MODULES_LIST = [
|
||||
# keep sorted
|
||||
]
|
||||
|
||||
_RISCV64_GKI_MODULES_LIST = [
|
||||
# keep sorted
|
||||
]
|
||||
|
||||
_X86_64_GKI_MODULES_LIST = [
|
||||
# keep sorted
|
||||
]
|
||||
|
||||
# buildifier: disable=unnamed-macro
|
||||
def get_gki_modules_list(arch = None):
|
||||
""" Provides the list of GKI modules.
|
||||
|
||||
Args:
|
||||
arch: One of [arm64, x86_64, riscv64].
|
||||
|
||||
Returns:
|
||||
The list of GKI modules for the given |arch|.
|
||||
"""
|
||||
gki_modules_list = [] + _COMMON_GKI_MODULES_LIST
|
||||
if arch == "arm64":
|
||||
gki_modules_list += _ARM64_GKI_MODULES_LIST
|
||||
elif arch == "x86_64":
|
||||
gki_modules_list += _X86_64_GKI_MODULES_LIST
|
||||
elif arch == "riscv64":
|
||||
gki_modules_list += _RISCV64_GKI_MODULES_LIST
|
||||
else:
|
||||
fail("{}: arch {} not supported. Use one of [arm64, x86_64, riscv64]".format(
|
||||
str(native.package_relative_label(":x")).removesuffix(":x"),
|
||||
arch,
|
||||
))
|
||||
|
||||
return gki_modules_list
|
||||
|
||||
Reference in New Issue
Block a user