devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs: dt: writing-schema: Describe validating one DTB
@ 2025-01-23 14:50 Krzysztof Kozlowski
  2025-01-24 22:39 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-23 14:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-kernel
  Cc: Krzysztof Kozlowski

Running DT schema validation with `dtbs_check` is time consuming thus we
also have ability to check only one DTB target like:

  make -j8 DT_SCHEMA_FILES=gpio CHECK_DTBS=y qcom/sm8450-hdk.dtb

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/writing-schema.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/writing-schema.rst b/Documentation/devicetree/bindings/writing-schema.rst
index eb8ced400c7e..6dea741c5962 100644
--- a/Documentation/devicetree/bindings/writing-schema.rst
+++ b/Documentation/devicetree/bindings/writing-schema.rst
@@ -222,6 +222,10 @@ separated by ':'.
     make dt_binding_check DT_SCHEMA_FILES=/gpio/
     make dtbs_check DT_SCHEMA_FILES=trivial-devices.yaml
 
+Validation of one DT source by providing Makefile target::
+
+    make CHECK_DTBS=y target.dtb
+    make DT_SCHEMA_FILES=xxx.yaml CHECK_DTBS=y target.dtb
 
 json-schema Resources
 ---------------------
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: dt: writing-schema: Describe validating one DTB
  2025-01-23 14:50 [PATCH] docs: dt: writing-schema: Describe validating one DTB Krzysztof Kozlowski
@ 2025-01-24 22:39 ` Rob Herring
  2025-01-27  7:10   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2025-01-24 22:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Krzysztof Kozlowski, Conor Dooley, devicetree, linux-kernel

On Thu, Jan 23, 2025 at 03:50:09PM +0100, Krzysztof Kozlowski wrote:
> Running DT schema validation with `dtbs_check` is time consuming thus we
> also have ability to check only one DTB target like:
> 
>   make -j8 DT_SCHEMA_FILES=gpio CHECK_DTBS=y qcom/sm8450-hdk.dtb

It's kind of duplicated because "make help" has:

  make CHECK_DTBS=1 [targets] Check all generated dtb files against schema
         This can be applied both to "dtbs" and to individual "foo.dtb" targets

> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/writing-schema.rst | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/writing-schema.rst b/Documentation/devicetree/bindings/writing-schema.rst
> index eb8ced400c7e..6dea741c5962 100644
> --- a/Documentation/devicetree/bindings/writing-schema.rst
> +++ b/Documentation/devicetree/bindings/writing-schema.rst
> @@ -222,6 +222,10 @@ separated by ':'.
>      make dt_binding_check DT_SCHEMA_FILES=/gpio/
>      make dtbs_check DT_SCHEMA_FILES=trivial-devices.yaml
>  
> +Validation of one DT source by providing Makefile target::
> +
> +    make CHECK_DTBS=y target.dtb
> +    make DT_SCHEMA_FILES=xxx.yaml CHECK_DTBS=y target.dtb

Perhaps dir/target.dtb

Though that may prompt folks to do:

make arch/$ARCH/boot/dts/target.dtb

You need just the sub-dirs under arch/*/boot/dts/ as part of the target. 

>  
>  json-schema Resources
>  ---------------------
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: dt: writing-schema: Describe validating one DTB
  2025-01-24 22:39 ` Rob Herring
@ 2025-01-27  7:10   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-27  7:10 UTC (permalink / raw)
  To: Rob Herring; +Cc: Krzysztof Kozlowski, Conor Dooley, devicetree, linux-kernel

On 24/01/2025 23:39, Rob Herring wrote:
> On Thu, Jan 23, 2025 at 03:50:09PM +0100, Krzysztof Kozlowski wrote:
>> Running DT schema validation with `dtbs_check` is time consuming thus we
>> also have ability to check only one DTB target like:
>>
>>   make -j8 DT_SCHEMA_FILES=gpio CHECK_DTBS=y qcom/sm8450-hdk.dtb
> 
> It's kind of duplicated because "make help" has:
> 
>   make CHECK_DTBS=1 [targets] Check all generated dtb files against schema
>          This can be applied both to "dtbs" and to individual "foo.dtb" targets

People not always look there, so it is nice to have one place
documenting possible usages. Just like we have for C=1/coccinelle.

> 
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  Documentation/devicetree/bindings/writing-schema.rst | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/writing-schema.rst b/Documentation/devicetree/bindings/writing-schema.rst
>> index eb8ced400c7e..6dea741c5962 100644
>> --- a/Documentation/devicetree/bindings/writing-schema.rst
>> +++ b/Documentation/devicetree/bindings/writing-schema.rst
>> @@ -222,6 +222,10 @@ separated by ':'.
>>      make dt_binding_check DT_SCHEMA_FILES=/gpio/
>>      make dtbs_check DT_SCHEMA_FILES=trivial-devices.yaml
>>  
>> +Validation of one DT source by providing Makefile target::
>> +
>> +    make CHECK_DTBS=y target.dtb
>> +    make DT_SCHEMA_FILES=xxx.yaml CHECK_DTBS=y target.dtb
> 
> Perhaps dir/target.dtb
> 
> Though that may prompt folks to do:
> 
> make arch/$ARCH/boot/dts/target.dtb
> 
> You need just the sub-dirs under arch/*/boot/dts/ as part of the target. 

I'll put that to text:

Validation of one DT source by providing Makefile target (sub-dir of dts)::

	make CHECK_DTBS=y sub-dir/target.dtb
	make DT_SCHEMA_FILES=xxx.yaml CHECK_DTBS=y sub-dir/target.dtb


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-27  7:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 14:50 [PATCH] docs: dt: writing-schema: Describe validating one DTB Krzysztof Kozlowski
2025-01-24 22:39 ` Rob Herring
2025-01-27  7:10   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).