Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp446167ybj; Tue, 5 May 2020 01:26:30 -0700 (PDT) X-Google-Smtp-Source: APiQypIm0cMBrDSg8bqwDcqrP9kTwlqIG7+Ds87qekBNx1VJldDhO1ioVmmBTf8gcojYqxr2bUEL X-Received: by 2002:a05:6402:2214:: with SMTP id cq20mr1587822edb.320.1588667190613; Tue, 05 May 2020 01:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588667190; cv=none; d=google.com; s=arc-20160816; b=mb5T769zB0FcB86GTM3fb80nt/7SyDUFQ/6Rko66XtWWAr1I4TuHtUDi/pYrL1V7gx BL6l+1IGBKxhICjj1VnCV02puwlIWJvoS2lRTZa67ZnDzjFYO0GkMry3cYQav/Ti/HfJ Kd7AvQ1Dlx1Cjc3hD+XX6cOYE2WUIuVcfq8EfJMAXY4ygX2iyqC6vORLllUtal7hBNA2 TgF82zYPKYeC4FqupFiT7/6ARAryplsVTOnQrvZJw38WNp98OTAdcMhDmSWXMJQDDGoG 2nMf+pTJO7Pz1psbr37eDiiZYWB2sQ8mL1p7sMI84ycCHWBwVq4mf7IjNzO1F+OKoQBO ly5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=awhKCUwBKnrY0PuQr1ZiYwWdjhoVOMuvHRPkGvuPBig=; b=PVKfpeELXx5IN4wE30FXIl1tQ5IzBI1qHMh1uoyD0OMygzHXIVwMEgGcTBFRQoafVL Pa5IeXOQwPXLeUwwBzv8KZvtkzZTDnYzEFdyOeAnK4FuTTx0S4ZrO4ASGuY7mdT5hxdi EL9wJc9/drF+DzPjEvyASE5v8riOEqmkgHbszCVPBgm8VFkwMBYAkTZu6nC19pYdoE/O GYwvypf1vM1vMQf/Ft7XwJxpHUjgVCSXj07dTjJ5mkFGICFdF2s9Hk3lvEnPIw5le6Kz GzLEwzcUVLPf26cjYrM0vF6PDU5JqzvjvqpF5ztXiugXbpV5bYW91ck9Dj+FDXASAGsx i7hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=19phWRHz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm18si799747edb.130.2020.05.05.01.26.07; Tue, 05 May 2020 01:26:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=19phWRHz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728402AbgEEIYm (ORCPT + 99 others); Tue, 5 May 2020 04:24:42 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:54216 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725320AbgEEIYl (ORCPT ); Tue, 5 May 2020 04:24:41 -0400 Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 0458ODXX025004; Tue, 5 May 2020 17:24:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 0458ODXX025004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1588667054; bh=awhKCUwBKnrY0PuQr1ZiYwWdjhoVOMuvHRPkGvuPBig=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=19phWRHzfucRuYFNCHmJtFb/7S9prMsy4+8xbnqO2UzkhhIYF3PDX0zkECzWjC9rP VPAamfUmx8FZXAphNx0xNboKMDcOukT7A2gcRIn5FCh1ayXqJHXEAtUsrQGAtftYFz W7Cvk0kQy/30DfPXhks3p0xkdNyI8HT6TMYNRqEF/cTlVyjYHauACGyZNE1jCpZQ/l 8ds8YhANRh5mAySe5wJNhhi6I5mbhg5kDnw07OH4xijc4kOtyLzIHvcMT3jZSPGDk0 w9mP4m2pOj9g7xBrqBtjUyAcWg3gH0ssTP3shR9uL568wRIrMQj7P5fNcspyhfCtfj CQjHfOgzUYTBw== X-Nifty-SrcIP: [209.85.217.48] Received: by mail-vs1-f48.google.com with SMTP id s11so708794vsq.13; Tue, 05 May 2020 01:24:14 -0700 (PDT) X-Gm-Message-State: AGi0PuYKwtPisPWvtbIE6iMSgusOIidWXM9PZtE+ANDGO/86n6KbzLNn JuP2HABB6yJnbP93suimd+6mFbO/t9pr/uQH+3A= X-Received: by 2002:a67:6e07:: with SMTP id j7mr1604563vsc.181.1588667052874; Tue, 05 May 2020 01:24:12 -0700 (PDT) MIME-Version: 1.0 References: <20200504020651.37031-1-masahiroy@kernel.org> <20200504020651.37031-2-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Tue, 5 May 2020 17:23:36 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] scripts/dtc: compile separate dtc-yaml To: Rob Herring Cc: DTML , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , =?UTF-8?B?TWFyZWsgQmVo77+977+9w6Ju?= , Frank Rowand , Michal Marek Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 5, 2020 at 12:04 PM Masahiro Yamada wrot= e: > > On Tue, May 5, 2020 at 4:15 AM Rob Herring wrote: > > > > On Sun, May 3, 2020 at 9:07 PM Masahiro Yamada w= rote: > > > > > > Marek Beh=C3=BAn reported a case where pkg-config fails to detect the > > > libyaml-dev package, which is presumably a bug of the distro. > > > > > > Irrespective of that, I am not a big fan of pkg-config in the Makefil= e > > > parse stage. The cost of pkg-config is quite small, but it is evaluat= ed > > > everytime we run make, even when we do 'make mrproper'. This commit > > > changes the Makefile to not rely on pkg-config at all. > > > > I don't really love the solution here... I'm inclined to just make > > libyaml always required. Anyone building dtbs should care about > > validating them. However, there's some dts files sprinkled in the tree > > such as DT unittests and I don't want to break allmodconfig for CI, > > 0-day, etc. Though eventually we may have to. > > > > > The normal build should not require libyaml-dev while we need to comp= ile > > > dtc with libyaml for the schema check. > > > > > > Build two dtc variants: > > > > > > scripts/dtc/dtc for *.dts -> *.dtb > > > scripts/dtc/dtc-yaml for *.dts -> *.dt.yaml > > > > My longer term plan is to integrate the schema checks into dtc. This > > would be some sort of plugin to dtc found or specified at run-time. It > > would eliminate the need for 2 passes of dtc and the 2nd case will go > > away. > > > OK. > > > > > > --- a/scripts/Makefile.lib > > > +++ b/scripts/Makefile.lib > > > @@ -246,6 +246,7 @@ quiet_cmd_gzip =3D GZIP $@ > > > # DTC > > > # ------------------------------------------------------------------= --------- > > > DTC ?=3D $(objtree)/scripts/dtc/dtc > > > +DTC_YAML ?=3D $(objtree)/scripts/dtc/dtc-yaml > > > > Can we make 'DTC' override both and keep this an internal detail. > > > > No. For parallel building *.dtb and *.dt.yaml, > they must be separate instances. > > > > > +HOSTLDLIBS_dtc-yaml :=3D -lyaml > > > > Does this work for yocto? As we had this before commit 067c650c456e. > > Not clear if this changed for any reason or just 'let's use pkg-config > > everywhere'. > > > > Or is there another way to fix yocto issue and we can just check the > > header exists. I assume yocto needs some prefix in front of > > '/usr/include/yaml.h'? > > > > My bad - I missed 067c650c456e > > We need pkg-config to deal with yocto. > > > Sorry, I take back this series. On my second thought, we can search libyaml in non-standard path without pkg-config. Kbuild provides a way to specify additional flags for building host tools. make HOSTCFLAGS=3D/include HOSTLDFLAGS=3D/lib --=20 Best Regards Masahiro Yamada