aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac J. Manjarres <isaacmanjarres@google.com>2023-01-05 17:53:25 -0800
committerIsaac J. Manjarres <isaacmanjarres@google.com>2024-05-20 17:08:55 -0700
commit9f5f2481c942b85dd90729d02e505e5e762177eb (patch)
tree2f6135d44666b6538d199857ea707baac0135125
parent50b4a2a7e180b242a6f016737629e56e2d5bc4a3 (diff)
downloadhikey-linaro-mirror-android12-5.10.tar.gz
ANDROID: kbuild: Search external devicetree path when running clean targetmirror-android12-5.10
When running the clean target, kbuild is supposed to remove dtbs and dtbos. However, kbuild only searches for those devicetree build artifacts in the directory that the kernel binaries or kernel modules are output to. This is not sufficient in cases where an external devicetree is used, so include the external devicetree path when searching for dtb and dtbo build artifacts. Bug: 264602319 Fixes: 3d42cc9e75a3 ("ANDROID: kbuild: add support for compiling external device trees") Change-Id: I45fdfdef09c3d57401d98e5db731273147d7d265 Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6de9e725daa8..0ac0eb442840 100644
--- a/Makefile
+++ b/Makefile
@@ -1931,7 +1931,9 @@ $(clean-dirs):
clean: $(clean-dirs)
$(call cmd,rmfiles)
- @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
+ @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) \
+ $(if $(filter-out arch/$(SRCARCH)/boot/dts, $(dtstree)), $(dtstree)) \
+ $(RCS_FIND_IGNORE) \
\( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '*.ko.*' \
-o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \