Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp565378lqb; Wed, 29 May 2024 04:32:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNl95zeS3/MtE6hJd0WXvRAgl83wDgJX0trx8BnYJXpaZA8gJ3VuTwjQBavx/59mrno/CmOBhPDr+5I4viLMcYQd86Eu5VZhGm+3o73Q== X-Google-Smtp-Source: AGHT+IFXZvkURozfbfbF4HOCcuBQQAWzZNPvW+aOJFceCKD1wTcJDGixMlIjOtNlIQjG3s7GUmZi X-Received: by 2002:a17:906:6854:b0:a59:ef75:5382 with SMTP id a640c23a62f3a-a62645d6378mr907298866b.43.1716982324688; Wed, 29 May 2024 04:32:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716982324; cv=pass; d=google.com; s=arc-20160816; b=RFPYubv1dz+gYvc2n8oGlqPkjgQHJKgFMimxyPVQd9GGsrL3I0qqkum79EEp4WHGDy RPWqZBSOUxe5mjZz36GRWp6MCKnZeihZB01UbNVwwa7HMQY+rE1mveVCaP76BHW7tn0v ItxuKpi/SjvzCTb7aXK0kdNzdsHU7k+YRbkn8sy+2iI8nDQW1gplyeli+pGxnbQ6QInU iVQoAxqnBBG/JzevdGjCpOncKNGG8Hhdxtip6SKoE+lvEMp1HMlK9+1PXaELyujoBpG2 jF1HnnIc5Z36TNG0XXqGQFIL/J3MLmTzs/emzi9xoyWaSle4Cmxz5nm6+8Lfdjm3EpSz Ag7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=yA7VDkSzCeFikDSbX0mXZlsBu83EUy2XKYd7zPDvgrQ=; fh=rqmv+lo3WIHahcTW+V+HUakoZwu9Kp21chu5ZokjZpA=; b=qx4yumLAzJ5U5yO/03LE54es67TqebdTljoZYNKOUIwnmHBwPhYltisYA7KUe2SmJg QX58H/NOW0axr3Z0dU2OsbVoae8TbXseZYK99azZ1XsPgqNrMeikmrXTvo6GGxt2rtSZ OP2/t0XIZq7u3AaFCmsnsFF4YxlO5s9ceUEak452bx34ptoXiw9RgNf3CpUjs9pNxGxk 4jy92NrItK0kYGv+u5k7q7RerUXWlFvAeV38iC2LLbD500PjiVrvZP+vrS/k5YBwgtDZ sQBF69ukqV7nu3gw0QyO8GAzmA2300AjKSPQOA/a2AKwJjCNVcHD/EYSGCW9Lu16GiHU uFIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QwxaQUTE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cd959c0si615210466b.852.2024.05.29.04.32.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 04:32:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QwxaQUTE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6B12F1F25B3A for ; Wed, 29 May 2024 11:32:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE44317F39A; Wed, 29 May 2024 11:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QwxaQUTE" 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 CC80013C83E; Wed, 29 May 2024 11:31:55 +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=1716982315; cv=none; b=VkQL7ATAW2gNyx6G686IuwXyl6ZIXgxk4ktpzM2ceCBO5WwFulOSWa3PpU1EddaKuVyw7sYpX+6MdidMj2tWeEU6l9qUcknUI08O51SrdfTlZreBqlDsQ2kllwTmoas5Zdgi9VpxEjVSD9MkIdZ6rbz1TBvyt36C6O4Hauzn0pQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716982315; c=relaxed/simple; bh=uESYWc7CHoToEHQVWQ0OlC9Wi0KT2BNb1DscZcNS3Qk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=t7wfPFpXx3am+KvtHLlM/BwxfHWuKemV65WYT72WrvRB0ShdvmXq5rIAajfUX8nTUBBEeLW8rHNogJUtBuBvm4SqbunraWtCK9wcW996rdU//KNeHwCqwGbEyqxo2GDm8jQZcUV9bTazFXNt4fqzrMnxVC4Z506c9zTFFnaWXGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QwxaQUTE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BCDAC32781; Wed, 29 May 2024 11:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716982315; bh=uESYWc7CHoToEHQVWQ0OlC9Wi0KT2BNb1DscZcNS3Qk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QwxaQUTEaOozKsFkTtAjlYDSmwQOcopG8kE1gZJe7lR4+hRSWl0YXg6WM+zL8hYLj GapR8zZ3fS3WzzMqSl64m5AT2vtKL4DPpnYUKtpfxmR9cKeVdns3TjrpH6ivqy0FCn 2CQXN9qyb3xakD7VSm/ISmwyL4FgunQCGj09hWRy6kHucZuQzvNbfEYVX2WmA3C3Y8 1Wq0HJtdC0rGOec2AwPBbTQADJm117sRX4sBFdZNSG3HWxOViWZG53b0LReojNxFu2 3kmHwemBv7aUbPCcCEgV2UqVLOsE9HKeBkJkqGmaVmmDGj33QUJ791TG4zLk2yEXDq HTJE57tZHp3Pw== Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2e974857588so20036901fa.3; Wed, 29 May 2024 04:31:55 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWYTOU845ccg4XhXjzUrwQqfONvz4sSnAdc60C7MD2tPxHz4/p9A8xdeVZOB8h1u1mGamzJ/9T9rQLjVm4Z+sr2VYqydm1VDd4ncJqsw37F/Q25VFJJ8ZPSdf9AAuiqkMq5rrQW1limKxuSHOvrx6ExKb39nV/2vEFwGr5VrOFIA9oQkLRoSw== X-Gm-Message-State: AOJu0Yz+WzIXB13Gc+4B6l8raGsVSVolzYroCnRpbR8Ta/ckCmD2UhIX 4l2/nNpaVRtMYOzAvN9Mm9ySW5G8XyWjYWXmXuPfJY7Z2rdoD/CkyJ+/TI6mzwddze9+uAcqRC1 0CVULMsvnhovxztcFNVzYDf344bU= X-Received: by 2002:a2e:b8d3:0:b0:2e1:ec20:9ae5 with SMTP id 38308e7fff4ca-2e95b0c2401mr108564941fa.31.1716982314130; Wed, 29 May 2024 04:31:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240527-dtbo-check-schema-v1-1-ee1094f88f74@linaro.org> In-Reply-To: From: Masahiro Yamada Date: Wed, 29 May 2024 20:31:17 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: verify dtoverlay files against schema To: Dmitry Baryshkov Cc: Rob Herring , Nathan Chancellor , Nicolas Schier , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 28, 2024 at 10:16=E2=80=AFPM Dmitry Baryshkov wrote: > > On Tue, 28 May 2024 at 16:15, Rob Herring wrote: > > > > On Mon, May 27, 2024 at 6:34=E2=80=AFAM Dmitry Baryshkov > > wrote: > > > > > > Currently only the single part device trees are validated against DT > > > schema. For the multipart schema files only the first file is validat= ed. > > > > What do you mean by multipart schema files? Did you mean multipart DTs > > (i.e. base plus overlays)? > > Yes, multipart DT files, dts + dtso =3D> dtb + dtbo =3D> final dtb > > > > > Looks good otherwise and I can fix that up. > > Awesome, thanks! This looks equivalent to the former patch rejected by Rob Herring: https://lore.kernel.org/lkml/20240225151209.343160-1-alexander.stein@mailbo= x.org/ Did he change his mind since then? > > > > > Extend the fdtoverlay commands to validate the resulting DTB file > > > against schema. > > > > > > Signed-off-by: Dmitry Baryshkov > > > --- > > > scripts/Makefile.lib | 9 ++++++++- > > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > > > index 9f06f6aaf7fc..29da0dc9776d 100644 > > > --- a/scripts/Makefile.lib > > > +++ b/scripts/Makefile.lib > > > @@ -407,8 +407,15 @@ cmd_dtc =3D $(HOSTCC) -E $(dtc_cpp_flags) -x ass= embler-with-cpp -o $(dtc-tmp) $< ; > > > -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > > > cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) > > > > > > +DT_CHECK_CMD =3D $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(D= T_BINDING_DIR) -p $(DT_TMP_SCHEMA) > > > + > > > +ifneq ($(CHECK_DTBS),) > > > +quiet_cmd_fdtoverlay =3D DTOVLCH $@ > > > + cmd_fdtoverlay =3D $(objtree)/scripts/dtc/fdtoverlay -o $@ -i = $(real-prereqs) ; $(DT_CHECK_CMD) $@ || true > > > +else > > > quiet_cmd_fdtoverlay =3D DTOVL $@ > > > cmd_fdtoverlay =3D $(objtree)/scripts/dtc/fdtoverlay -o $@ -i = $(real-prereqs) > > > +endif > > > > > > $(multi-dtb-y): FORCE > > > $(call if_changed,fdtoverlay) > > > @@ -421,7 +428,7 @@ DT_BINDING_DIR :=3D Documentation/devicetree/bind= ings > > > DT_TMP_SCHEMA :=3D $(objtree)/$(DT_BINDING_DIR)/processed-schema.jso= n > > > > > > quiet_cmd_dtb =3D DTC_CHK $@ > > > - cmd_dtb =3D $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLA= GS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true > > > + cmd_dtb =3D $(cmd_dtc) ; $(DT_CHECK_CMD) $@ || true > > > else > > > quiet_cmd_dtb =3D $(quiet_cmd_dtc) > > > cmd_dtb =3D $(cmd_dtc) > > > > > > --- > > > base-commit: 8314289a8d50a4e05d8ece1ae0445a3b57bb4d3b > > > change-id: 20240527-dtbo-check-schema-4f695cb98de5 > > > > > > Best regards, > > > -- > > > Dmitry Baryshkov > > > > > > > -- > With best wishes > Dmitry -- Best Regards Masahiro Yamada