bt-kernel: Additional bazel configuration
- add support to copy *.ko to out dir - enable conditional compilation with config flags - enable CONFIG_BT_HW_SECURE_DISABLE with dependency on securemsm-kernel - re-enable compilation of bt_fm_slim with new headers - add fallthrough attribute btfm_slim_hw_interface.c - move BTFMSLIM_DEV_NAME to btfm_slim.h - add target.bzl file to define specific targets Change-Id: I7f7920870d81125f95b020ef33df77df3f937682 Signed-off-by: Franklin Abreu Bueno <quic_fabreu@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

父節點
15d9682357
當前提交
176b51aefa
@@ -5,7 +5,7 @@ FMRTC_PATH = "rtc6226"
|
||||
# This dictionary holds all the BT modules included in the bt-kernel
|
||||
bt_modules = {}
|
||||
|
||||
def register_bt_modules(name, path = None, config_opt = None, srcs = {}, deps = []):
|
||||
def register_bt_modules(name, path = None, config_opt = None, srcs = [], config_srcs = {}, deps = [], config_deps = {}):
|
||||
"""
|
||||
Register modules
|
||||
Args:
|
||||
@@ -13,14 +13,37 @@ def register_bt_modules(name, path = None, config_opt = None, srcs = {}, deps =
|
||||
path: Path in which the source files can be found
|
||||
config_opt: Config name used in Kconfig (not needed currently)
|
||||
srcs: source files and local headers
|
||||
config_srcs: source files and local headers that depend on a config define being enabled.
|
||||
deps: a list of dependent targets
|
||||
config_deps: a list of dependent targets that depend on a config define being enabled.
|
||||
"""
|
||||
processed_config_srcs = {}
|
||||
processed_config_deps = {}
|
||||
|
||||
for config_src_name in config_srcs:
|
||||
config_src = config_srcs[config_src_name]
|
||||
|
||||
if type(config_src) == "list":
|
||||
processed_config_srcs[config_src_name] = {True: config_src}
|
||||
else:
|
||||
processed_config_srcs[config_src_name] = config_src
|
||||
|
||||
for config_deps_name in config_deps:
|
||||
config_dep = config_deps[config_deps_name]
|
||||
|
||||
if type(config_dep) == "list":
|
||||
processed_config_deps[config_deps_name] = {True: config_dep}
|
||||
else:
|
||||
processed_config_deps[config_deps_name] = config_dep
|
||||
|
||||
module = struct(
|
||||
name = name,
|
||||
path = path,
|
||||
srcs = srcs,
|
||||
config_srcs = processed_config_srcs,
|
||||
config_opt = config_opt,
|
||||
deps = deps
|
||||
deps = deps,
|
||||
config_deps = processed_config_deps,
|
||||
)
|
||||
bt_modules[name] = module
|
||||
|
||||
@@ -29,22 +52,43 @@ def register_bt_modules(name, path = None, config_opt = None, srcs = {}, deps =
|
||||
register_bt_modules(
|
||||
name = "btpower",
|
||||
path = PWR_PATH,
|
||||
config_opt = "CONFIG_MSM_BT_PWR",
|
||||
srcs = ["btpower.c"]
|
||||
config_opt = "CONFIG_MSM_BT_POWER",
|
||||
srcs = ["btpower.c"],
|
||||
config_deps = {
|
||||
"CONFIG_BT_HW_SECURE_DISABLE": [
|
||||
"//vendor/qcom/opensource/securemsm-kernel:%b_smcinvoke_dlkm",
|
||||
]
|
||||
},
|
||||
)
|
||||
|
||||
register_bt_modules(
|
||||
name = "bt_fm_slim",
|
||||
path = SLIMBUS_PATH,
|
||||
config_opt = "CONFIG_BTFM_SLIM",
|
||||
# config_opt = "CONFIG_BTFM_SLIM",
|
||||
srcs = [
|
||||
"btfm_slim.c",
|
||||
"btfm_slim.h",
|
||||
"btfm_slim_codec.c",
|
||||
"btfm_slim_slave.c",
|
||||
"btfm_slim_slave.h",
|
||||
"btfm_slim_codec.c",
|
||||
],
|
||||
deps = [":%b_btpower"]
|
||||
deps = [":%b_btpower"],
|
||||
)
|
||||
|
||||
# Not enabled/compiling until btfmcodec is enabled
|
||||
register_bt_modules(
|
||||
name = "btfm_slim_codec",
|
||||
path = SLIMBUS_PATH,
|
||||
# config_opt = "CONFIG_SLIM_BTFM_CODEC",
|
||||
srcs = [
|
||||
"btfm_slim.c",
|
||||
"btfm_slim.h",
|
||||
"btfm_slim_slave.c",
|
||||
"btfm_slim_slave.h",
|
||||
"btfm_slim_hw_interface.c",
|
||||
"btfm_slim_hw_interface.h",
|
||||
],
|
||||
deps = [":%b_btpower", ":btfmcodec_headers"],
|
||||
)
|
||||
|
||||
register_bt_modules(
|
||||
@@ -55,5 +99,5 @@ register_bt_modules(
|
||||
"radio-rtc6226-common.c",
|
||||
"radio-rtc6226-i2c.c",
|
||||
"radio-rtc6226.h",
|
||||
]
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user