Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2241425ybf; Mon, 2 Mar 2020 04:56:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwCepTMooDZUbuKFIxxZPIhs/EBCuqO1zvUjMLwP8ex/55DfSrLvsWUy9OCZVHJo1Grb3gF X-Received: by 2002:aca:4843:: with SMTP id v64mr11003721oia.13.1583153811803; Mon, 02 Mar 2020 04:56:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583153811; cv=none; d=google.com; s=arc-20160816; b=MMQPjNNY5pj/Cj8EBnF1WTbHQ5v52CLKRS5W53Ml7amgp9I/mOYtQ9rbYZnoa22A1m nqByYkL+k8ef2ac9tKM3VdUW71hUAqzVqNEcxtxOawOGKjvhmWNTYHU9gKwy/TBPfzAy tLOQtCUgc09sfHSCb5XFFYtnHPlPb1Uvre6TwON3vHlSG0fFJ4zv5TKgpNtmmCu+uf08 J0kz0x9RTPTJ8In/dbKtOVlEx2QaivAEjTUX7hq+Tu4u670gID0uLbRBmLYR5fa9nLh2 sY4FfVRIo6ZGUayocDkuDoCjB8bDkxocf7JiyFmlOr1XRpVWyHoj611bVGAlcI4Oox8O 9n3Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=QR9by0y6+s6+BJpgqoy6IRatITNZ3Ur80DMO1uUZ41M=; b=kjezcX4E0if/SFb78x0nk/3ReL7R+92gXegW41+AChZdyPspPu7cIB7LIF9cwD/dFR epDmrpgGeCCSYSgB25vxA2zdwlXeAYKjWhkaojdQrB90CAnQnsVw62SimN27Po6dbaT0 oMePq7LsQEBlij8S8JpAjN3/DoB85roDaLL5tHTr/LNuoX11YcvbVa+157ENDetaDiZn LPP/oSq0WafduyuxpWIpPWBlDVaNrUboUUOTYaqKb95WCGayUyGuqTlrimxacqVlZJ/r MXQVmbDyQb3h3C378y+rvtL2QYDOG7aakE2Pkdch7bkah7xj6llgUukFj1ZqnQ2MslEU c5Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=udVb852b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u139si2371824oif.118.2020.03.02.04.56.40; Mon, 02 Mar 2020 04:56:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=udVb852b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727995AbgCBM4c (ORCPT + 99 others); Mon, 2 Mar 2020 07:56:32 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:51444 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727734AbgCBM4b (ORCPT ); Mon, 2 Mar 2020 07:56:31 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 022Crv3c009358; Mon, 2 Mar 2020 13:55:59 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=QR9by0y6+s6+BJpgqoy6IRatITNZ3Ur80DMO1uUZ41M=; b=udVb852b0hDrg3p/dn9+nGQdHGcCd+sQ/u+zWH5tTiem3bP4pQ/Dz1kcSHf6jfNz1U4Q gss/aU0aepwbZU7POktDo6iD4CdBUcO7Gcay8Arrs4FWFMpls69Emjn6S6WwFwDXJSUe GbjImbWXnUBP25+7rqWmPSRy19hO9Wq2dcwJjiJwirXc6sQF2Vylm3zB/rB+nyn6dx8t T/fG/dPwI3Qynrjo25rtRCTYNP1GvrvcUlA2E6WamgkAcwfFBWPNjPWQDMi4zQGD/AQR iLcHXLmjWBnuzPu6OwCrM97qF/u5d2hxP/b6sAugV4lxl5uInewdzRHiP3NcjlrhQFZg vw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2yffqpkfrc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Mar 2020 13:55:59 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id F27E9100038; Mon, 2 Mar 2020 13:55:56 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node2.st.com [10.75.127.8]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id DC7B52D3777; Mon, 2 Mar 2020 13:55:56 +0100 (CET) Received: from lmecxl0912.lme.st.com (10.75.127.49) by SFHDAG3NODE2.st.com (10.75.127.8) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 2 Mar 2020 13:55:55 +0100 Subject: Re: [RFC PATCH v2 0/4] Add device tree build information To: Frank Rowand , , Masahiro Yamada , Michal Marek , , CC: , , , , Ian Lepore References: <20200221161418.20225-1-alexandre.torgue@st.com> <1b946fcf-47a9-012d-1b04-f4bbd2682607@gmail.com> <67d75f0c-7478-23b0-8619-746cf83cedb5@gmail.com> From: Alexandre Torgue Message-ID: Date: Mon, 2 Mar 2020 13:55:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <67d75f0c-7478-23b0-8619-746cf83cedb5@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG3NODE2.st.com (10.75.127.8) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-02_04:2020-03-02,2020-03-02 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Franck On 2/28/20 6:47 PM, Frank Rowand wrote: > Hi Alexandred, > > Ping. > Sorry I was off last week. > -Frank > > > On 2/21/20 11:47 AM, Frank Rowand wrote: >> On 2/21/20 10:14 AM, Alexandre Torgue wrote: >>> (with title it's better ;) >>> >>> Hi, >>> >>> The goal of this series is to add device tree build information in dtb. >>> This information can be dtb build date, where devicetree files come from, >>> who built the dtb ... Actually, same kind of information that you can find >>> in the Linux banner which is printout during kernel boot. Having the same >>> kind of information for device tree is useful for debugging and maintenance. >>> >>> A file (dtb-build.txt) containing a string with build information (e.g., >>> >From Linux 5.5.0-rc1 by alex the Mon Jan 13 18:25:38 CET 2020) is generated by >>> "gen_dtb_build_info.sh" script. >>> >>> This file has to be included manually in each dts file that would like to use >>> this build information. >> >> In the RFC series, you said: >> >> "I gonna prepare a V2 with David proposition (to use overlay format) by >> keeping in mind not to modify existing dts(i) files." >> >> https://lore.kernel.org/linux-devicetree/9d83a36c-78c5-3452-bb48-209d68c46038@st.com/ >> >> But here in v2 instead requires including dtb-build.txt. >> >> This would require modifying every single main .dts file to get the build info >> I would prefer the method that Ian and David came up with (sorry, no lore link, >> it did not go to lkml). Extract from David's email: >> >> Date: Tue, 21 Jan 2020 13:05:25 +1100 >> From: David Gibson >> Subject: Re: [RFC PATCH 1/3] dtc: Add dtb build information option >> >> > Given that dts files are run through the C preprocessor before being >> > fed to dtc, the build script could use the '-include' flag to force- >> > include a fragment containing generated build info without any need to >> > modify existing dts files. >> >> Uh... maybe. -include will essentially prepend the forced file, which >> is a bit awkward for our purposes. It means that the prepended file >> would need the /dts-v1/ tag, and we couldn't have it in the main files >> which would be a bit confusing. I think it would also cause problems >> with any /memreserve/ tags and means that the main tree could in >> theory overwrite the build information which we don't necessarily >> want. >> >> I guess we could build things the other way around: have the main .dts >> file specified with -include and have the dts on the dtc commandline >> be a fixed one with the build information. It'd be a little weird, >> though. >> >> -Frank Yes. I try briefly this idea but I got issues with dts-v1 tag. I agree, it is cleaner to not modify input dts file. I can rework int this way. regards Alex >> >>> >>> of/fdt.c is modified to printout "build-info" property during Kernel boot and >>> scripts/Makefile.lib is modified to call "gen_dtb_build_info.sh" script. >>> >>> Patch 1 & 2 script and of/fdt.c updates >>> Patch 3 is an example of use in stm32mp157c-dk2.dts file. >>> Patch 4 is a tentative to make it automatic (not yet 100% functional). >>> >>> regards >>> Alex >>> >>> Changes since v1; >>> - Remove modification in dtc (no more -B option) >>> - Generate a file containing build info which is directly included in dts >>> file. >>> >>> >>> Regards >>> Alex >>> >>> Alexandre Torgue (4): >>> scripts: Add script to generate dtb build information >>> of: fdt: print dtb build information >>> ARM: dts: stm32: Add dtb build information entry for stm32mp157c-dk2 >>> script: make automatic dtb build info generation >>> >>> arch/arm/boot/dts/stm32mp157c-dk2.dts | 1 + >>> drivers/of/fdt.c | 9 +++++++++ >>> scripts/Makefile.lib | 3 +++ >>> scripts/gen_dtb_build_info.sh | 12 ++++++++++++ >>> 4 files changed, 25 insertions(+) >>> create mode 100755 scripts/gen_dtb_build_info.sh >>> >> >> >