From nobody Fri Dec 19 18:27:44 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0775018891F; Wed, 4 Sep 2024 23:48:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725493698; cv=none; b=X6wLuq8DxyzDAY2wxZ5ZbqYssZND1P67A+/1PhTyvRuZDN4GPrCSJTf1riOyJlYodnhv0d9W6+XPG3PeY8CkqSC1KNTgFGc/675RLAo5vEF+FTP+6jlVEri6Dsg3VT9fcq6/ZQtz57aK6kOjnnmQb0oBJAoZ9Iev4JtkGqp1hss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725493698; c=relaxed/simple; bh=psn2cg3kyw66zSxZb5tD/YEWBmfy/XReWDQ1aOqEAdM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A2k6+O2G1zaxfPoVqYIHt6bowTN47kkcnGSBR5Bnm/ifLbhY2sH4Ty0E0+1iBSqN3PrX/DAUcmMDVhrYUxjkvLRFYh8zavskzI/xqPENJ7kiZf2pZ38XFLJRznQSVooqsBlLypz4YZjmCAtRdE+md6XVfdtAWCKGuwGdl1X8MRk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iCDqdtEb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iCDqdtEb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E2E2C4CEC8; Wed, 4 Sep 2024 23:48:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725493697; bh=psn2cg3kyw66zSxZb5tD/YEWBmfy/XReWDQ1aOqEAdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iCDqdtEb/NRkunhEP8DfaaSic38AIyn8tNJ2rLGAKtUyPyXxqKtGYCgxwgpKxaiLS HIbtbeyaKVWTHHR0C/Jku8elOT85u3lG57cZVIW23PluRNVRjG7sSjOCNxb6eA9H/E QNu1ebIEh/3Y6kyQLG22BvnXnyvX+euseFrhJFKs4ofAOsVbfrlZKTeM4HHrvGu3Om 3k1NHmeefVxzVwcmok8JUFSRutb9vLQCdpUL/Ruriq6H9KNLdEUS8/WEKlBx81mojx DRVROamh1TBiv44Tp/PYfRYappZ56LNg0Vi7DD9f5LoUU8RC5gxVUz4N0Lt/EBvCK7 AwGYysqRHHZ+A== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, Michal Simek , Rob Herring , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, Dinh Nguyen , Masahiro Yamada Subject: [PATCH 02/15] kbuild: split device tree build rules into scripts/Makefile.dtbs Date: Thu, 5 Sep 2024 08:47:38 +0900 Message-ID: <20240904234803.698424-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240904234803.698424-1-masahiroy@kernel.org> References: <20240904234803.698424-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" scripts/Makefile.lib is included not only from scripts/Makefile.build but also from scripts/Makefile.{modfinal,package,vmlinux,vmlinux_o}, where DT build rules are not required. Split the DT build rules out to scripts/Makefile.dtbs, and include it only when necessary. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring (Arm) --- drivers/of/fdt.c | 2 +- drivers/of/unittest.c | 4 +- scripts/Makefile.build | 25 +++----- scripts/Makefile.dtbs | 142 +++++++++++++++++++++++++++++++++++++++++ scripts/Makefile.lib | 115 --------------------------------- 5 files changed, 153 insertions(+), 135 deletions(-) create mode 100644 scripts/Makefile.dtbs diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 68103ad230ee..4d528c10df3a 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -34,7 +34,7 @@ =20 /* * __dtb_empty_root_begin[] and __dtb_empty_root_end[] magically created by - * cmd_dt_S_dtb in scripts/Makefile.lib + * cmd_wrap_S_dtb in scripts/Makefile.dtbs */ extern uint8_t __dtb_empty_root_begin[]; extern uint8_t __dtb_empty_root_end[]; diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index c830f346df45..fd8cb931b1cc 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1861,7 +1861,7 @@ static int __init unittest_data_add(void) struct device_node *unittest_data_node =3D NULL, *np; /* * __dtbo_testcases_begin[] and __dtbo_testcases_end[] are magically - * created by cmd_dt_S_dtbo in scripts/Makefile.lib + * created by cmd_wrap_S_dtbo in scripts/Makefile.dtbs */ extern uint8_t __dtbo_testcases_begin[]; extern uint8_t __dtbo_testcases_end[]; @@ -3525,7 +3525,7 @@ static void __init of_unittest_lifecycle(void) =20 /* * __dtbo_##overlay_name##_begin[] and __dtbo_##overlay_name##_end[] are - * created by cmd_dt_S_dtbo in scripts/Makefile.lib + * created by cmd_wrap_S_dtbo in scripts/Makefile.dtbs */ =20 #define OVERLAY_INFO_EXTERN(overlay_name) \ diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 4b6942653093..6385e7aa5dbb 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -57,7 +57,6 @@ endif # subdir-builtin and subdir-modorder may contain duplications. Use $(sort = ...) subdir-builtin :=3D $(sort $(filter %/built-in.a, $(real-obj-y))) subdir-modorder :=3D $(sort $(filter %/modules.order, $(obj-m))) -subdir-dtbslist :=3D $(sort $(filter %/dtbs-list, $(dtb-y))) =20 targets-for-builtin :=3D $(extra-y) =20 @@ -349,7 +348,7 @@ $(obj)/%.o: $(obj)/%.S FORCE =20 targets +=3D $(filter-out $(subdir-builtin), $(real-obj-y)) targets +=3D $(filter-out $(subdir-modorder), $(real-obj-m)) -targets +=3D $(real-dtb-y) $(lib-y) $(always-y) +targets +=3D $(lib-y) $(always-y) =20 # Linker scripts preprocessor (.lds.S -> .lds) # ------------------------------------------------------------------------= --- @@ -375,7 +374,6 @@ $(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtre= e)/scripts/asn1_compiler # To build objects in subdirs, we need to descend into the directories $(subdir-builtin): $(obj)/%/built-in.a: $(obj)/% ; $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ; -$(subdir-dtbslist): $(obj)/%/dtbs-list: $(obj)/% ; =20 # # Rule to compile a set of .o files into one .a file (without symbol table) @@ -391,12 +389,8 @@ quiet_cmd_ar_builtin =3D AR $@ $(obj)/built-in.a: $(real-obj-y) FORCE $(call if_changed,ar_builtin) =20 -# -# Rule to create modules.order and dtbs-list -# -# This is a list of build artifacts (module or dtb) from the current Makef= ile -# and its sub-directories. The timestamp should be updated when any of the -# member files. +# This is a list of build artifacts from the current Makefile and its +# sub-directories. The timestamp should be updated when any of the member = files. =20 cmd_gen_order =3D { $(foreach m, $(real-prereqs), \ $(if $(filter %/$(notdir $@), $m), cat $m, echo $m);) :; } \ @@ -405,9 +399,6 @@ cmd_gen_order =3D { $(foreach m, $(real-prereqs), \ $(obj)/modules.order: $(obj-m) FORCE $(call if_changed,gen_order) =20 -$(obj)/dtbs-list: $(dtb-y) FORCE - $(call if_changed,gen_order) - # # Rule to compile a set of .o files into one .a file (with symbol table) # @@ -436,11 +427,7 @@ intermediate_targets =3D $(foreach sfx, $(2), \ $(patsubst %$(strip $(1)),%$(sfx), \ $(filter %$(strip $(1)), $(targets)))) # %.asn1.o <- %.asn1.[ch] <- %.asn1 -# %.dtb.o <- %.dtb.S <- %.dtb <- %.dts -# %.dtbo.o <- %.dtbo.S <- %.dtbo <- %.dtso -targets +=3D $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \ - $(call intermediate_targets, .dtb.o, .dtb.S .dtb) \ - $(call intermediate_targets, .dtbo.o, .dtbo.S .dtbo) +targets +=3D $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) =20 # Include additional build rules when necessary # ------------------------------------------------------------------------= --- @@ -457,6 +444,10 @@ ifneq ($(userprogs),) include $(srctree)/scripts/Makefile.userprogs endif =20 +ifneq ($(need-dtbslist)$(dtb-y)$(dtb-)$(filter %.dtb.o %.dtbo.o,$(targets)= ),) +include $(srctree)/scripts/Makefile.dtbs +endif + # Build # ------------------------------------------------------------------------= --- =20 diff --git a/scripts/Makefile.dtbs b/scripts/Makefile.dtbs new file mode 100644 index 000000000000..46009d5f1486 --- /dev/null +++ b/scripts/Makefile.dtbs @@ -0,0 +1,142 @@ +# SPDX-License-Identifier: GPL-2.0-only + +# If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built +dtb-$(CONFIG_OF_ALL_DTBS) +=3D $(dtb-) + +# Composite DTB (i.e. DTB constructed by overlay) +multi-dtb-y :=3D $(call multi-search, $(dtb-y), .dtb, -dtbs) +# Primitive DTB compiled from *.dts +real-dtb-y :=3D $(call real-search, $(dtb-y), .dtb, -dtbs) +# Base DTB that overlay is applied onto +base-dtb-y :=3D $(filter %.dtb, $(call real-search, $(multi-dtb-y), .dtb, = -dtbs)) + +dtb-y :=3D $(addprefix $(obj)/, $(dtb-y)) +multi-dtb-y :=3D $(addprefix $(obj)/, $(multi-dtb-y)) +real-dtb-y :=3D $(addprefix $(obj)/, $(real-dtb-y)) + +always-y +=3D $(dtb-y) +targets +=3D $(real-dtb-y) + +# dtbs-list +# ------------------------------------------------------------------------= --- + +ifdef need-dtbslist +subdir-dtbslist :=3D $(addsuffix /dtbs-list, $(subdir-ym)) +dtb-y +=3D $(subdir-dtbslist) +always-y +=3D $(obj)/dtbs-list +endif + +$(subdir-dtbslist): $(obj)/%/dtbs-list: $(obj)/% ; + +$(obj)/dtbs-list: $(dtb-y) FORCE + $(call if_changed,gen_order) + +# Assembly file to wrap dtb(o) +# ------------------------------------------------------------------------= --- + +# Generate an assembly file to wrap the output of the device tree compiler +quiet_cmd_wrap_S_dtb =3D WRAP $@ + cmd_wrap_S_dtb =3D { \ + symbase=3D__$(patsubst .%,%,$(suffix $<))_$(subst -,_,$(notdir $*)); \ + echo '\#include '; \ + echo '.section .dtb.init.rodata,"a"'; \ + echo '.balign STRUCT_ALIGNMENT'; \ + echo ".global $${symbase}_begin"; \ + echo "$${symbase}_begin:"; \ + echo '.incbin "$<" '; \ + echo ".global $${symbase}_end"; \ + echo "$${symbase}_end:"; \ + echo '.balign STRUCT_ALIGNMENT'; \ + } > $@ + +$(obj)/%.dtb.S: $(obj)/%.dtb FORCE + $(call if_changed,wrap_S_dtb) + +$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE + $(call if_changed,wrap_S_dtb) + +# Schema check +# ------------------------------------------------------------------------= --- + +ifneq ($(CHECK_DTBS),) +DT_CHECKER ?=3D dt-validate +DT_CHECKER_FLAGS ?=3D $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m) +DT_BINDING_DIR :=3D Documentation/devicetree/bindings +DT_TMP_SCHEMA :=3D $(objtree)/$(DT_BINDING_DIR)/processed-schema.json +dtb-check-enabled =3D $(if $(filter %.dtb, $@),y) +endif + +quiet_dtb_check_tag =3D $(if $(dtb-check-enabled),[C], ) +cmd_dtb_check =3D $(if $(dtb-check-enabled),; $(DT_CHECKER) $(DT_CHECKER_F= LAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true) + +# Overlay +# ------------------------------------------------------------------------= --- + +# NOTE: +# Do not replace $(filter %.dtb %.dtbo, $^) with $(real-prereqs). When a s= ingle +# DTB is turned into a multi-blob DTB, $^ will contain header file depende= ncies +# recorded in the .*.cmd file. +quiet_cmd_fdtoverlay =3D OVL $(quiet_dtb_check_tag) $@ + cmd_fdtoverlay =3D $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filt= er %.dtb %.dtbo, $^) $(cmd_dtb_check) + +$(multi-dtb-y): $(DT_TMP_SCHEMA) FORCE + $(call if_changed,fdtoverlay) +$(call multi_depend, $(multi-dtb-y), .dtb, -dtbs) + +# DTC +# ------------------------------------------------------------------------= --- + +DTC ?=3D $(objtree)/scripts/dtc/dtc +DTC_FLAGS +=3D -Wno-unique_unit_address + +# Disable noisy checks by default +ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) +DTC_FLAGS +=3D -Wno-unit_address_vs_reg \ + -Wno-avoid_unnecessary_addr_size \ + -Wno-alias_paths \ + -Wno-graph_child_address \ + -Wno-simple_bus_reg +else +DTC_FLAGS +=3D -Wunique_unit_address_if_enabled +endif + +ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),) +DTC_FLAGS +=3D -Wnode_name_chars_strict \ + -Wproperty_name_chars_strict \ + -Wunique_unit_address +endif + +DTC_FLAGS +=3D $(DTC_FLAGS_$(target-stem)) + +# Set -@ if the target is a base DTB that overlay is applied onto +DTC_FLAGS +=3D $(if $(filter $(patsubst $(obj)/%,%,$@), $(base-dtb-y)), -@) + +DTC_INCLUDE :=3D $(srctree)/scripts/dtc/include-prefixes + +dtc_cpp_flags =3D -Wp,-MMD,$(depfile).pre.tmp -nostdinc -I $(DTC_INCLUDE) = -undef -D__DTS__ + +dtc-tmp =3D $(subst $(comma),_,$(dot-target).dts.tmp) + +quiet_cmd_dtc =3D DTC $(quiet_dtb_check_tag) $@ + cmd_dtc =3D \ + $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ + $(DTC) -o $@ -b 0 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) \ + $(DTC_FLAGS) -d $(depfile).dtc.tmp $(dtc-tmp) ; \ + cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) \ + $(cmd_dtb_check) + +$(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE + $(call if_changed_dep,dtc) + +$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE + $(call if_changed_dep,dtc) + +# targets +# ------------------------------------------------------------------------= --- + +targets +=3D $(always-y) + +# %.dtb.o <- %.dtb.S <- %.dtb <- %.dts +# %.dtbo.o <- %.dtbo.S <- %.dtbo <- %.dtso +targets +=3D $(call intermediate_targets, .dtb.o, .dtb.S .dtb) \ + $(call intermediate_targets, .dtbo.o, .dtbo.S .dtbo) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 207325eaf1d1..4fea9e9bec3c 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -45,11 +45,6 @@ else obj-y :=3D $(filter-out %/, $(obj-y)) endif =20 -ifdef need-dtbslist -dtb-y +=3D $(addsuffix /dtbs-list, $(subdir-ym)) -always-y +=3D dtbs-list -endif - # Expand $(foo-objs) $(foo-y) etc. by replacing their individuals suffix-search =3D $(strip $(foreach s, $3, $($(1:%$(strip $2)=3D%$s)))) # List composite targets that are constructed by combining other targets @@ -80,19 +75,6 @@ always-y +=3D $(hostprogs-always-y) $(hostprogs-always-m) userprogs +=3D $(userprogs-always-y) $(userprogs-always-m) always-y +=3D $(userprogs-always-y) $(userprogs-always-m) =20 -# DTB -# If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built -dtb-$(CONFIG_OF_ALL_DTBS) +=3D $(dtb-) - -# Composite DTB (i.e. DTB constructed by overlay) -multi-dtb-y :=3D $(call multi-search, $(dtb-y), .dtb, -dtbs) -# Primitive DTB compiled from *.dts -real-dtb-y :=3D $(call real-search, $(dtb-y), .dtb, -dtbs) -# Base DTB that overlay is applied onto -base-dtb-y :=3D $(filter %.dtb, $(call real-search, $(multi-dtb-y), .dtb, = -dtbs)) - -always-y +=3D $(dtb-y) - # Add subdir path =20 ifneq ($(obj),.) @@ -104,9 +86,6 @@ lib-y :=3D $(addprefix $(obj)/,$(lib-y)) real-obj-y :=3D $(addprefix $(obj)/,$(real-obj-y)) real-obj-m :=3D $(addprefix $(obj)/,$(real-obj-m)) multi-obj-m :=3D $(addprefix $(obj)/, $(multi-obj-m)) -dtb-y :=3D $(addprefix $(obj)/, $(dtb-y)) -multi-dtb-y :=3D $(addprefix $(obj)/, $(multi-dtb-y)) -real-dtb-y :=3D $(addprefix $(obj)/, $(real-dtb-y)) subdir-ym :=3D $(addprefix $(obj)/,$(subdir-ym)) endif =20 @@ -255,12 +234,6 @@ cpp_flags =3D -Wp,-MMD,$(depfile) $(NOSTDINC_FLAG= S) $(LINUXINCLUDE) \ =20 ld_flags =3D $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) =20 -DTC_INCLUDE :=3D $(srctree)/scripts/dtc/include-prefixes - -dtc_cpp_flags =3D -Wp,-MMD,$(depfile).pre.tmp -nostdinc = \ - $(addprefix -I,$(DTC_INCLUDE)) \ - -undef -D__DTS__ - ifdef CONFIG_OBJTOOL =20 objtool :=3D $(objtree)/tools/objtool/objtool @@ -350,94 +323,6 @@ cmd_objcopy =3D $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFL= AGS_$(@F)) $< $@ quiet_cmd_gzip =3D GZIP $@ cmd_gzip =3D cat $(real-prereqs) | $(KGZIP) -n -f -9 > $@ =20 -# DTC -# ------------------------------------------------------------------------= --- -DTC ?=3D $(objtree)/scripts/dtc/dtc -DTC_FLAGS +=3D \ - -Wno-unique_unit_address - -# Disable noisy checks by default -ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) -DTC_FLAGS +=3D -Wno-unit_address_vs_reg \ - -Wno-avoid_unnecessary_addr_size \ - -Wno-alias_paths \ - -Wno-graph_child_address \ - -Wno-simple_bus_reg -else -DTC_FLAGS +=3D \ - -Wunique_unit_address_if_enabled -endif - -ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),) -DTC_FLAGS +=3D -Wnode_name_chars_strict \ - -Wproperty_name_chars_strict \ - -Wunique_unit_address -endif - -DTC_FLAGS +=3D $(DTC_FLAGS_$(target-stem)) - -# Set -@ if the target is a base DTB that overlay is applied onto -DTC_FLAGS +=3D $(if $(filter $(patsubst $(obj)/%,%,$@), $(base-dtb-y)), -@) - -# Generate an assembly file to wrap the output of the device tree compiler -quiet_cmd_wrap_S_dtb =3D WRAP $@ - cmd_wrap_S_dtb =3D { \ - symbase=3D__$(patsubst .%,%,$(suffix $<))_$(subst -,_,$(notdir $*)); \ - echo '\#include '; \ - echo '.section .dtb.init.rodata,"a"'; \ - echo '.balign STRUCT_ALIGNMENT'; \ - echo ".global $${symbase}_begin"; \ - echo "$${symbase}_begin:"; \ - echo '.incbin "$<" '; \ - echo ".global $${symbase}_end"; \ - echo "$${symbase}_end:"; \ - echo '.balign STRUCT_ALIGNMENT'; \ - } > $@ - -$(obj)/%.dtb.S: $(obj)/%.dtb FORCE - $(call if_changed,wrap_S_dtb) - -$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE - $(call if_changed,wrap_S_dtb) - -quiet_dtb_check_tag =3D $(if $(dtb-check-enabled),[C], ) -cmd_dtb_check =3D $(if $(dtb-check-enabled),; $(DT_CHECKER) $(DT_CHECKER_F= LAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true) - -quiet_cmd_dtc =3D DTC $(quiet_dtb_check_tag) $@ -cmd_dtc =3D $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-t= mp) $< ; \ - $(DTC) -o $@ -b 0 \ - $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ - -d $(depfile).dtc.tmp $(dtc-tmp) ; \ - cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) \ - $(cmd_dtb_check) - -# NOTE: -# Do not replace $(filter %.dtb %.dtbo, $^) with $(real-prereqs). When a s= ingle -# DTB is turned into a multi-blob DTB, $^ will contain header file depende= ncies -# recorded in the .*.cmd file. -quiet_cmd_fdtoverlay =3D OVL $(quiet_dtb_check_tag) $@ - cmd_fdtoverlay =3D $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(filt= er %.dtb %.dtbo, $^) $(cmd_dtb_check) - -$(multi-dtb-y): FORCE - $(call if_changed,fdtoverlay) -$(call multi_depend, $(multi-dtb-y), .dtb, -dtbs) - -ifneq ($(CHECK_DTBS),) -DT_CHECKER ?=3D dt-validate -DT_CHECKER_FLAGS ?=3D $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m) -DT_BINDING_DIR :=3D Documentation/devicetree/bindings -DT_TMP_SCHEMA :=3D $(objtree)/$(DT_BINDING_DIR)/processed-schema.json -dtb-check-enabled =3D $(if $(filter %.dtb, $@),y) -endif - -$(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE - $(call if_changed_dep,dtc) - -$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE - $(call if_changed_dep,dtc) - -dtc-tmp =3D $(subst $(comma),_,$(dot-target).dts.tmp) - # Bzip2 # ------------------------------------------------------------------------= --- =20 --=20 2.43.0