mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	kbuild: verify dtoverlay files against schema
Currently only the single part device trees are validated against DT schema. For the multipart DT files only the base DTB is validated. Extend the fdtoverlay commands to validate the resulting DTB file against schema. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240527-dtbo-check-schema-v1-1-ee1094f88f74@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
		
							parent
							
								
									2bcc896986
								
							
						
					
					
						commit
						49636c5680
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
					@ -407,8 +407,15 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ;
 | 
				
			||||||
		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
 | 
							-d $(depfile).dtc.tmp $(dtc-tmp) ; \
 | 
				
			||||||
	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 | 
						cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DT_CHECK_CMD = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ifneq ($(CHECK_DTBS),)
 | 
				
			||||||
 | 
					quiet_cmd_fdtoverlay = DTOVLCH $@
 | 
				
			||||||
 | 
					      cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs) ; $(DT_CHECK_CMD) $@ || true
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
quiet_cmd_fdtoverlay = DTOVL   $@
 | 
					quiet_cmd_fdtoverlay = DTOVL   $@
 | 
				
			||||||
      cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs)
 | 
					      cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs)
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(multi-dtb-y): FORCE
 | 
					$(multi-dtb-y): FORCE
 | 
				
			||||||
	$(call if_changed,fdtoverlay)
 | 
						$(call if_changed,fdtoverlay)
 | 
				
			||||||
| 
						 | 
					@ -421,7 +428,7 @@ DT_BINDING_DIR := Documentation/devicetree/bindings
 | 
				
			||||||
DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
 | 
					DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
quiet_cmd_dtb =	DTC_CHK $@
 | 
					quiet_cmd_dtb =	DTC_CHK $@
 | 
				
			||||||
      cmd_dtb =	$(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true
 | 
					      cmd_dtb =	$(cmd_dtc) ; $(DT_CHECK_CMD) $@ || true
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
quiet_cmd_dtb = $(quiet_cmd_dtc)
 | 
					quiet_cmd_dtb = $(quiet_cmd_dtc)
 | 
				
			||||||
      cmd_dtb = $(cmd_dtc)
 | 
					      cmd_dtb = $(cmd_dtc)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue