From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35086255F28; Wed, 4 Feb 2026 02:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770171370; cv=none; b=VTT6Ye+mNVAM96HmmcRh1qXyRY+NSytbIBbkaG5OEDzrvWgAgRn05FGfrlJBbP/r4VKgcYuyYVaUAN04mjI9mIxZPbG2TVZV6m4vsZXuyErAfzuVl3CJAHJbd3C3GBedLKXqcaDAtYBY4XAW9RK8OY8Mh3yijs3KSDQtvh8urTE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770171370; c=relaxed/simple; bh=k05it80A5QQtU7WiSTvezYPHumnS066xeliAPSbMls0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o4uzuPqUG5mcE+8oPsrXSL3ShuiNm1rB/VJc5+qmW4yErsI58lXq5LTrAOivqJ+skgVVtp22Uct13p2nAtprc+4aX2N30TjZpP95KKyOmLxzENa97cVKvBv3QinQYopIBiQDyndX84QAlaUwJvMR+IhCSiaTEonX4DqPqO85FbQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TdifOlrW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TdifOlrW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EFB0C19425; Wed, 4 Feb 2026 02:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770171369; bh=k05it80A5QQtU7WiSTvezYPHumnS066xeliAPSbMls0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TdifOlrWcMimhvAbKblfc1buFYuNDf0ElelYKGPVxMeuCCf1DUtkCxeXNOnS6Wf/a 8QX9ycJjk6sXw2X+iwYlj4mYQ0EaOm8HMTlh1mR+vIZXHWBUDdYITZ6nvneIbnk8jq ev90fGgL66ISO0Et405YmCSspxjATktIm8XYE8U08ERobxTYr6jtxDf9MINn/Y3mcG dUrO+pV/Zd2RXfi2UJIIatK4eJ0nwsqfSIV80uMt9mlEDvtnh7aVBVXEEsz74MxnUM n69UGKgi3pdnJMuvbvHNciQhLcteOSGX60SUSEmp5oeTvBux75+jJnab6HfnbT1Wpr NnTC41zIZO91Q== Date: Tue, 3 Feb 2026 19:16:03 -0700 From: Nathan Chancellor To: Icenowy Zheng Cc: Nicolas Schier , Masahiro Yamada , Abel Vesa , Mingcong Bai , WangYuli , Inochi Amaoto , James Le Cuirot , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Icenowy Zheng , Rong Zhang , Rob Herring , Saravana Kannan , devicetree@vger.kernel.org Subject: Re: [PATCH] kbuild: install-extmod-build: do not exclude scripts/dtc/libfdt/ Message-ID: <20260204021603.GA2646832@ax162> References: <20260201130259.2906768-1-zhengxingda@iscas.ac.cn> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260201130259.2906768-1-zhengxingda@iscas.ac.cn> + Rob, Saravana, and devicetree@ since this concerns files they own. On Sun, Feb 01, 2026 at 09:02:59PM +0800, Icenowy Zheng wrote: > There exists a header file in include/linux/ called libfdt.h that is > just a wrapper for libfdt header file in scripts/dtc/libfdt/. This makes > the headers inside libfdt copy at scripts/dtc/libfdt/ part of the kernel > headers for building external modules. > > Do not exclude them, otherwise modules that include > will fail to build externally. > > Fixes: aaed5c7739be ("kbuild: slim down package for building external modules") > Signed-off-by: Icenowy Zheng This does indeed bring back scripts/dtc/libfdt back into the headers package that I examined. However, how does including libfdt.h in an external module actually work, even with this change? libfdt appears to be built into vmlinux IIUC and I do not see any EXPORT_SYMBOLs in the list, so how can you actually use any of the functions from libfdt within the module? Would you just build and link the pieces that your module needs using the other source files? > --- > scripts/package/install-extmod-build | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build > index 2576cf7902dbb..d1e448d7f59f6 100755 > --- a/scripts/package/install-extmod-build > +++ b/scripts/package/install-extmod-build > @@ -11,7 +11,8 @@ is_enabled() { > > find_in_scripts() { > find scripts \ > - \( -name atomic -o -name dtc -o -name kconfig -o -name package \) -prune -o \ > + \( -name atomic -o -name kconfig -o -name package -o \ > + \( -path '*/dtc/*' -a ! -path '*/libfdt*' \) \) -prune -o \ > ! -name unifdef -a ! -name mk_elfconfig -a \( -type f -o -type l \) -print > } > > -- > 2.52.0 >