Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp325674pxb; Wed, 20 Jan 2021 07:55:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWPgTgytBKTW0VQFIaLRYI9LSCTQhoNmAL6OIROP+vHIt+LW+E4KTAr1pfZ3wyrPMbSSN7 X-Received: by 2002:a05:6402:5246:: with SMTP id t6mr7834549edd.62.1611158111650; Wed, 20 Jan 2021 07:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611158111; cv=none; d=google.com; s=arc-20160816; b=Clq1amlOMkPll5FI7iZ9r2Uu8H+YUQgi4r475djUFONiPZBQppAfvWCOH3yDo+HufA j8QybCky6TdcPvFwkpTlJBkncddxOwCTtET/fYVCkP2tNCr8azDBaGmZTlmgYleD3HhW dpmnTvUM/7rAkJOJcDRaHKG25lWN483/Sph5H89X2W+OE6O8sqFb7OFdtGu92p4caj0C fVgS5lpjUzr0qPXbAdtyW3X1whOjW8RuFvPhxSC4qvIl+d3pllSPav5RRkB9Zvfv6N2q akFojOSviJIH/OWTPi0ljuwe91ADdB+Fy6j5rAKN5fxtTjeItHlWUgCIo3pGpJQaUkWH nsVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Qr8ZRxlnoxACA80xb80Nl9X5Iwbmp9Bzzd4TQqiOtkQ=; b=NDsG6T5oJXuiipG4aWQxivWaA/WEgTx1rI3kNhev23fOagSH7C8OySQzDfltlX9kY/ U4vy7yHQLNAD5Wr7hGU6+PdnVBR623cQHt0cN23E+XGtV1NekMybJweKi+sky0Sh/ocq nKahmW1WN7BJxuP2gH5Igkkej6ZOdn0x94a8GWw4vGNUaoYJjk9Zb7+NUZ8WuVElghrR 7yGISgMl1I84eHOeffSkpU5WG+6PStoK04pO24/fuwPYzDjACh5Ugis8D79jWs5WoAmy Tqh4P/HZQk+S9T0Tx6t5QrRbwBKTH2oa5D2/ER9ydmQBXSwgrWvdGpYC0J68Wrg416KP nbKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="G7g8/XwF"; 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 qq23si802230ejb.140.2021.01.20.07.54.46; Wed, 20 Jan 2021 07:55:11 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b="G7g8/XwF"; 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 S1731520AbhATPwl (ORCPT + 99 others); Wed, 20 Jan 2021 10:52:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:59186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390990AbhATPs0 (ORCPT ); Wed, 20 Jan 2021 10:48:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D31F823381; Wed, 20 Jan 2021 15:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611157666; bh=2MocRlRCh66dE3X3CN+d7WGNSYOcv0cdbsXGp0jK/TI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=G7g8/XwFmDSefIYQ0/hM5DG32luuviYnhxsvGyyvqH71drjwgOnxl7cnq6qSETStC rgI/qBfGvFezKi/tXapt2RaP5X88f8g4Dey5uctSOrl24zJVMoru1W+KwuI5dWXwj1 074UBRLKcvc9cYYLY4vvyJYdKeivIIU9uTo24gArf5cGeisFOOhO/obuB3uLPo+j0S 3QI5hO4J0eR2275CxpTFc4VJzRdJ0w9MC5roUONYAOjGktXjA+zVDehx6ByFTjw0kc 7Oth2N+RPvveGHovy8Jrtf5S38e4hz0rQ80CSNMKTL+6rGCUDC7jETT1Z0o8POUZwa w+lKYjI19qjTQ== Received: by mail-ed1-f46.google.com with SMTP id p22so26282235edu.11; Wed, 20 Jan 2021 07:47:45 -0800 (PST) X-Gm-Message-State: AOAM532LVsSG+M5mvFEs8qO89GP5yue/+SN+8hLc/xJu5p/d5qjNtcds bTi1sgAVdfTjLEUHwuv1O/eBymILXSKh9LMx9A== X-Received: by 2002:a50:e78b:: with SMTP id b11mr7795479edn.165.1611157664395; Wed, 20 Jan 2021 07:47:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rob Herring Date: Wed, 20 Jan 2021 09:47:32 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V4 2/3] scripts: dtc: Build fdtoverlay tool To: Frank Rowand Cc: Viresh Kumar , Pantelis Antoniou , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux Kbuild mailing list , Vincent Guittot , Bill Mills , Anmar Oueja , Masahiro Yamada Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 19, 2021 at 12:28 PM Frank Rowand wrote: > > Hi Viresh, > > I made these comments in the v2 patch series. I am copying them here since > this is the current version. > > On 1/12/21 2:29 AM, Viresh Kumar wrote: > > We will start building overlays for platforms soon in the kernel and > > would need fdtoverlay going forward. Lets start building it. > > > > The fdtoverlay program applies (or merges) one ore more overlay dtb > > blobs to a base dtb blob. The kernel build system would later use > > fdtoverlay to generate the overlaid blobs based on platform specific > > configurations. > > > > Signed-off-by: Viresh Kumar > > --- > > scripts/dtc/Makefile | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile > > index 4852bf44e913..5f19386a49eb 100644 > > --- a/scripts/dtc/Makefile > > +++ b/scripts/dtc/Makefile > > @@ -1,13 +1,17 @@ > > # SPDX-License-Identifier: GPL-2.0 > > # scripts/dtc makefile > > > > -hostprogs-always-$(CONFIG_DTC) += dtc > > +hostprogs-always-$(CONFIG_DTC) += dtc fdtoverlay > > hostprogs-always-$(CHECK_DT_BINDING) += dtc > > > > dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ > > srcpos.o checks.o util.o > > dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o > > > > # The upstream project builds libfdt as a separate library. We are choosing to > # instead directly link the libfdt object files into fdtoverly > > > +libfdt-objs := fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o fdt_empty_tree.o fdt_addresses.o fdt_overlay.o > > +libfdt = $(addprefix libfdt/,$(libfdt-objs)) > > +fdtoverlay-objs := $(libfdt) fdtoverlay.o util.o > > + > > # Source files need to get at the userspace version of libfdt_env.h to compile > > HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt > > > > > > In general, I am a proponent of using shared libraries (which the upstream project > builds by default) because if a security bug in the library is fixed, it is fixed > for all users of the library. > > In this specific case, I actually prefer the implementation that the patch provides > (directly linking the library object files into fdtoverlay, which uses the library) > because it is the only user of the library _and_ fdtoverlay will not inadvertently > use the system wide libfdt if it happens to be installed (as it is on my system). > > Any thoughts on this Rob? I agree. No point in complicating the build to do a library. Rob