From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A8E1C001B2 for ; Tue, 20 Dec 2022 02:45:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232860AbiLTCpL (ORCPT ); Mon, 19 Dec 2022 21:45:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiLTCpI (ORCPT ); Mon, 19 Dec 2022 21:45:08 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C75212D29; Mon, 19 Dec 2022 18:45:07 -0800 (PST) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5DB2D80CB0; Tue, 20 Dec 2022 03:45:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1671504305; bh=IprEi+qVnctNMnKAlyk6243hIepwAWWu6ePom6r/wMg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ARtCj1wmZcCyOZI5N/kIaiLe+nT7YwpX6LLMVl6zseUgGZkHnh411bc1vcS94DgaL envbGCEUP423Xn/dFjhvRa8Pif0ffQHfUpDMsxM+KKOZwQEizXvV0z4bgyncaKMDxw YsAS7qQecit0OiyFDpA4QnpWwzChui0dikPadfEwVF+77rsQnrripx//ryzXqe/jPd 7DtYqrJHg9RhKl2OzcLJgB/hN57UWTWGvso/StWtehGO3GNxvcS59TVVE6xq19xjRl ZaUktmvc4szac42IqVUUeqPW6p5czJlSBnmJAy8anbUZPRIr2dgWaLJ37G6yZ4Qf3g aaTF2cLyY4X2g== Message-ID: Date: Tue, 20 Dec 2022 03:45:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] kbuild: Optionally enable schema checks for %.dtb targets Content-Language: en-US To: Rob Herring , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Cc: Dmitry Baryshkov , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221220013233.2890335-1-robh@kernel.org> From: Marek Vasut In-Reply-To: <20221220013233.2890335-1-robh@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/20/22 02:32, Rob Herring wrote: > While not documented, schema checks for single dtb targets mostly work > already by setting 'CHECK_DTBS=1'. However, the dependencies are not > handled and it only works if 'make dt_bindings_check' was run first and > generated processed-schema.json. In addition, changing a binding file > doesn't cause the schema to be rebuilt and dtb to be revalidated. > > Making this work turns out to be simple. Whenever CHECK_DTBS is set, > make 'dt_binding_check' a 'dtbs_prepare' dependency. > > I reimplemented here what Masahiro had originally come up with a while > back. > > Cc: Marek Vasut > Cc: Dmitry Baryshkov > Signed-off-by: Rob Herring > --- > Makefile | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 6aa709df6bde..a99d5c4de0fc 100644 > --- a/Makefile > +++ b/Makefile > @@ -1467,7 +1467,10 @@ dtbs_prepare: include/config/kernel.release scripts_dtc > > ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),) > export CHECK_DTBS=y > -dtbs: dt_binding_check > +endif > + > +ifneq ($(CHECK_DTBS),) > +dtbs_prepare: dt_binding_check > endif > > dtbs_check: dtbs Tested-by: Marek Vasut Thank you!