ARM: dts: qcom: Add Bazel files for DT compilation

Kleaf provides a kernel_dtstree rule that must be used
to define a directory containing dts/dtsi files.

The rule uses the Bazel hermetic device tree compiler to
generate the DTB and DTBO files.

A platform map is added to link target names to device tree
files.

Change-Id: I9964cb70ec2d661608227890395ab316fb6a6259
This commit is contained in:
John Moon
2022-07-12 10:12:41 -07:00
parent a84ad5a2f1
commit e7d3671873
2 changed files with 60 additions and 0 deletions

21
BUILD.bazel Normal file
View File

@@ -0,0 +1,21 @@
load("//build/kernel/kleaf:kernel.bzl", "kernel_dtstree")
kernel_dtstree(
name = "msm_dt",
srcs = glob(
[
"Makefile",
"qcom/Makefile",
"qcom/**/*.dtsi",
"qcom/**/*.dts",
"bindings/**/*",
],
exclude = [
"**/.*",
"**/.*/**",
"**/*.bazel",
"**/*.bzl",
],
),
visibility = ["//visibility:public"],
)

39
qcom/platform_map.bzl Normal file
View File

@@ -0,0 +1,39 @@
platform_map = {
"kalama": {
"dtb_list": [
# keep sorted
"kalama.dtb",
"kalamap.dtb",
"kalamap-v2.dtb",
],
"dtbo_list": [
# keep sorted
"kalama-atp-overlay.dtbo",
"kalama-cdp-nfc-overlay.dtbo",
"kalama-cdp-overlay.dtbo",
"kalama-cdp-wsa883x-overlay.dtbo",
"kalama-mtp-nfc-overlay.dtbo",
"kalama-mtp-overlay.dtbo",
"kalama-qrd-overlay.dtbo",
"kalama-rcm-overlay.dtbo",
"kalama-rumi-overlay.dtbo",
],
},
"pineapple": {
"dtb_list": [
# keep sorted
"pineapple.dtb",
"pineapple-v2.dtb",
"pineapplep.dtb",
"pineapplep-v2.dtb",
],
"dtbo_list": [
# keep sorted
"pineapple-atp-overlay.dtbo",
"pineapple-cdp-overlay.dtbo",
"pineapple-mtp-overlay.dtbo",
"pineapple-qrd-overlay.dtbo",
"pineapple-rumi-overlay.dtbo",
],
},
}