Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp480427lqs; Thu, 13 Jun 2024 16:47:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXV7epGGc38bRnNjJ6E2LpdZo/le8S3KhRXVfDipUwZQXKlbGk6C8BskhnWBnOp7fdXcchWUAoCqKvbSl0wnCIMulmO+XbFSkLR48isAg== X-Google-Smtp-Source: AGHT+IFdVAKhBMmMbe6YvTwdIk8zWGluLzokENiEJQxx1WrZ6k9MafRsZy2cysBiDAvW8967YMG/ X-Received: by 2002:a17:906:3948:b0:a6d:f339:f8 with SMTP id a640c23a62f3a-a6f60d296femr70881166b.31.1718322426232; Thu, 13 Jun 2024 16:47:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718322426; cv=pass; d=google.com; s=arc-20160816; b=R1/Wrk3KxT9Qw4WHStwkw8I09WMH1amTMx0n22ZBe1Kz1qlJNnHqrs5g9rDwDIicse 8kZ2iD/WbOtWc2yMZ7XyuSHYWfiTxGB9UPLQpwBcrI01V6h9PDAWkkVEUyLBmJTjbTdo Z78d3VshPfCLlOKtalaGXGm1fI7FQP724kiPG0YF3i15MNObmpdphtCA/CVA+m0ECuk0 0OZCONhSU/gp6qHRGEtJm3SjYRFZcHBVNLN2g1kDL+8hIs0FeoCQEohf2OYmSUoNW1fr X96YuWHpQirr7Nx+11XTiszca+oaL5aGoIyhnXb/ZyP+GpFHBIA8i2IWvmi3/J1TQRoA xycQ== 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=IEs/MJ91AXBCx+XV1sNfRd2WKurEXTx/CpAA2PzFqNM=; fh=XxblFvQ1MbD5ouxUFciz08CzAyjjiJsYO6kCBM4N7Kc=; b=nWm0hycDYR0VO/nP8VhAf4H+AcdrOiSwpcGnWleHiFsjNFZdDdesPGfd0mIKnALJQF UJHLhtA7rylqlzzWhbhgeXo7NiuhnzPspQUUBwESh8A9mhD9dgQbKV8SfgeaPisePInM EKhV8l53KB1unZR5aR8rG3qwWY20pLyQx/xvY+P54z8YrigZcP2TCjTVSJ7aVR3Z4EVJ lKLLOYx2CvXV49oy/Ypsv5MsGD/tjK4txXtAb8bodwKLSmHHUnBwxqQ8aXxNVjFfwbF7 FLJYv6xZbrJhHx3e+VOgikfCOISNaf7OIdb/nuV2ZsI6mvFbXj2uVBTmp9Iv8vt96eCs /heA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hrV8AOyH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-214126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214126-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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-a6f56e812f1si112558966b.987.2024.06.13.16.47.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 16:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214126-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=@linaro.org header.s=google header.b=hrV8AOyH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-214126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214126-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 EE5351F22BA0 for ; Thu, 13 Jun 2024 23:47:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1977E14F134; Thu, 13 Jun 2024 23:47:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hrV8AOyH" Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5181D80624 for ; Thu, 13 Jun 2024 23:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718322420; cv=none; b=ZusxWTCEnQQiK2+OHeJXPICMhXvM1bpgqZr5OERHQNS2d8Dv3R7mhKsKdM58sqYF756lBGPUm7u/jm2akx6vTyNOFv3KsPHqBzQLs92MEJ2HYCgAH12E95EA0FfQMS+C+iPmu1lqh++Ow7BFlIspE5eUQJ+wN6bN1UyjIEGEtAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718322420; c=relaxed/simple; bh=wP/HLGKUMKt2CBNQYC7OtGWy1rIdw+mGfSWEcQsldfQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bfDzIL5qdVpoytS51CN5D6dIGoqWGtPzSF9h8Y9CklIM7KSuNwtAI+zj1APpQD+mvR99LAS/LPYdonkhqG5uYQ7kbZ7lNspPRFZ2o8OJqY5MLLKEZLgtNn29KrNw0q4pGx3c1riodkuXp/oo8WsPghRd0bgJYreY+78RRcvkP/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hrV8AOyH; arc=none smtp.client-ip=209.85.219.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-dff0067a263so1865204276.0 for ; Thu, 13 Jun 2024 16:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718322416; x=1718927216; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IEs/MJ91AXBCx+XV1sNfRd2WKurEXTx/CpAA2PzFqNM=; b=hrV8AOyHdh++RZd/9WPz8DMuOZg7kYSGU51+kmSakyc7KmdzD40Xa5zkd8hdkDbcw8 CjpwtesLjVBCl6jpp3WMOcwlMFrpHeCxMu7r7K7tjOcLp43/sNE+oZ9kY4QCR4n9PzFY I7gHK7m8Rhlz/GoeNXsWQTCahm42FdXRx0z7bm8GrDKMLITzQ+UkHRfLw8Lck3ZX3ajU DPbNKh7IWinvlBurctFF3NNkb5e37QdiElm3qK+Dvf+Hn1Z4Y5dP8aPHPbp8Qec0Eb18 jJVNrUvJKvyM1eShLGaYBAVTzGRcmmBkd590SFih8zHbbFQC1Iqq1ip6lpNwL0Mgk10V 30Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718322416; x=1718927216; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IEs/MJ91AXBCx+XV1sNfRd2WKurEXTx/CpAA2PzFqNM=; b=tskTz+k0trf9wL6Uly+mUyx9DsPlhfVx6RK53XRADCxAnhCF0XEiBK1ulbHMKQkr/v UE0DTPmyjmyjHI03BSI0RAZxXU7MhoDNWIIbpLYsZ5IyfkP8F9rhm/o6eQ+fvS3+MkJa uD/sTHmGq1g+t16DfEIjcJN3jVr2DWHJjBRCtA/pn7lIQlR9C2c2gZicYjHHoPL4qJpe 675izCd1Bid+HeTB8aXZ1MBh7qd9se/JGXbcE82D5ui0F40QxEo+oJ5weYnGYu1SOJZS 9WEqI2NHhgYAdB55k41h/kYo3L1h/OJn0cntmvd0uS7rF8qdGYZqF9Hl/S02UDFIVnIF zSgA== X-Forwarded-Encrypted: i=1; AJvYcCXPTK42aWa5XOar2z3euJqtUr2gAlDLhySEfEzg1mn2ug1XzEXcQngT7NKokOhOTnG7MDeWT4tAA47YZ16FJZvNV9ubH6slctjKz0ep X-Gm-Message-State: AOJu0YwfDQPiyqSeVfQJGM4jkB6kTcFEoW37ReQdcElc8+FQdC6RXjHL SAcsRZyjikT1SQPs+NWPtkbyb1piXyWfwSvpWzg9HQq5qvfp3PTEFWcJSzkjCEd5qAWzXs14yJe UthlygK8l2hqRv16SrCPvPqhLOxcGsW0FeRFeCg== X-Received: by 2002:a25:2fd7:0:b0:dfd:a575:f309 with SMTP id 3f1490d57ef6-dff15343238mr988582276.4.1718322416407; Thu, 13 Jun 2024 16:46:56 -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: Dmitry Baryshkov Date: Fri, 14 Jun 2024 02:46:45 +0300 Message-ID: Subject: Re: [PATCH] kbuild: verify dtoverlay files against schema To: Rob Herring Cc: Masahiro Yamada , 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, 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 validated= . > > What do you mean by multipart schema files? Did you mean multipart DTs > (i.e. base plus overlays)? > > Looks good otherwise and I can fix that up. This patch was sent two weeks ago. Is there anything on me with respect to = it? > > 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 assem= bler-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)/$(DT_= 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/bindin= gs > > DT_TMP_SCHEMA :=3D $(objtree)/$(DT_BINDING_DIR)/processed-schema.json > > > > quiet_cmd_dtb =3D DTC_CHK $@ > > - cmd_dtb =3D $(cmd_dtc) ; $(DT_CHECKER) $(DT_CHECKER_FLAGS= ) -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 > > --=20 With best wishes Dmitry