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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02C10C4724C for ; Tue, 5 May 2020 03:05:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1C49206CC for ; Tue, 5 May 2020 03:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588647942; bh=v8+6/shMHv91m2xsNYKuZpKxOv85PNBq8mG+n5ABQUY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=PiGs7df0DB5VDmetOSDAtlid34AJXL2jvSk/1awF1rAmHzsJ3aT+qP8PtFIllqbV5 GQhkUo1pHgVO86QF9VNLqvUMZb/QnypFF7WtY3+cjv7GiLIwayMb4Y/Z99M+CF+xVU 7cFbFjPRSfi5UTy7bxpHVnP89gpwosMQ7R1pI7Wk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728187AbgEEDFm (ORCPT ); Mon, 4 May 2020 23:05:42 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:25270 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbgEEDFl (ORCPT ); Mon, 4 May 2020 23:05:41 -0400 Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 04535Oma001530; Tue, 5 May 2020 12:05:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 04535Oma001530 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1588647925; bh=7pzFWZ+G9qpXTN4C61MUU29XguMs9OYlbJNsdNGfSfU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=sD5LQfjUMZW/+6W5ap9AHsWx45Oxcwi2meGBANQ8HQXiWCd3sCQ8rTeEJON64IXYk Xzp4aIQDGndSGhY6dIbW6belAcrrIWC3mRQpCtmcQuLUAhimQzuVD8qyAZlvvuckMI R6+fkdQoRZlPemDqPYGqj1y2pNy83t+OKLu9MEsb//w2FSwPnD02AtAUMPYKT4IIrO BlA9F6VhoJHWNiZybbwGbjBX2BWTNmJDVDQXH+zEqKPfjyOOpuVl+1jNjD9kalEcv6 jPMbPnBoGjXWaV16O1O0xQVu4RIzTjdDY2ai3MjQ49fdts+/pCalaD9qhzycfF4F1N FjTiUtYXAi7UQ== X-Nifty-SrcIP: [209.85.217.45] Received: by mail-vs1-f45.google.com with SMTP id b10so381505vsh.1; Mon, 04 May 2020 20:05:25 -0700 (PDT) X-Gm-Message-State: AGi0Pua0m0mbL6UqyQAH6LXxJH0fDLqzdEnig0Cd7hHcY3j2g7yJArKg MDsgLGbO4NF1D1htXr3kh87QRdP/NU+h9ELEmAw= X-Google-Smtp-Source: APiQypIVLbiCyi3UVlzZqvVq4xSo4WhtHlo5CE5Wd081k8YxTyEAtaRSh+pUvaI6stqG0JDc5lQtYCJiwrLalo0VJTA= X-Received: by 2002:a67:3293:: with SMTP id y141mr1020371vsy.54.1588647923948; Mon, 04 May 2020 20:05:23 -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 12:04:47 +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 4:15 AM Rob Herring wrote: > > On Sun, May 3, 2020 at 9:07 PM Masahiro Yamada wro= te: > > > > 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 Makefile > > parse stage. The cost of pkg-config is quite small, but it is evaluated > > 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 compil= e > > 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. --=20 Best Regards Masahiro Yamada