From 79a44a8a5a1221dfca84d84e293802c10b3351b4 Mon Sep 17 00:00:00 2001 From: John Moon Date: Wed, 25 Oct 2023 11:14:42 -0700 Subject: [PATCH] ANDROID: build: Check for dtbo files before dpm definition Currently, if dpm_overlay is enabled for a platform, it will be added unconditionally. However, if there are no dtbo files, the build will fail. Check if there are no dtbo files and disable the dpm definition in that case. Change-Id: Ia213f1011dce29a42358c9414b5072f1a39ef7e2 Signed-off-by: John Moon --- msm_kernel_la.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/msm_kernel_la.bzl b/msm_kernel_la.bzl index 2b67998c1dcb..11e1cf82c8ae 100644 --- a/msm_kernel_la.bzl +++ b/msm_kernel_la.bzl @@ -451,6 +451,10 @@ def define_msm_la( gki_ramdisk_prebuilt_binary = get_gki_ramdisk_prebuilt_binary() build_config_fragments = get_build_config_fragments(msm_target) + # Can't enable dpm_overlay if no overlays are listed + if len(dtbo_list) == 0 and dpm_overlay: + dpm_overlay = False + _define_build_config( msm_target, target,