Message ID | 36a4014c73a52af27d930d3ca31d362b60f4461c.1686356364.git.josh@joshtriplett.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1274866vqr; Fri, 9 Jun 2023 17:45:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79gYE2FRDFcoNRQ2h8zIZ8e8xnHBWU4Gwq4Ww7ifU69MCTVUyoWTxIGMeJQd+Y34HAx1rs X-Received: by 2002:a17:90b:4b46:b0:259:a603:936e with SMTP id mi6-20020a17090b4b4600b00259a603936emr7767200pjb.8.1686357931284; Fri, 09 Jun 2023 17:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686357931; cv=none; d=google.com; s=arc-20160816; b=ia3pf5e4XwhKmvr0qgPnjTypb8LomN/Gw2JHyd4zybenaF6bWZg/vCzkru7Evdd9jE fqXg/N315dm20ACzBLqTwpslZ001YX9uvV3mIoZTqybo3QYlM2Mhl4NnAliYfJFtjnQC RZax+zdjEagYVXKyGvq+QkmXPh01cnmXK44HTxmgANa2LBhxdCydi7UGIyA/i/cHJVYu KwV/QunRJFaG1sj+2TSrLPQ7BLvShuD8n6c4SEWk+X0PbqSxAWgzQFvCsDPbnrIfPEGp 1FqpcPOc90odaNP5RYodL/zilQLG9odcEfurS2TitK59nNZ7GElg0QR/Y8Hp7U5mgLbY iNpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:feedback-id:dkim-signature:dkim-signature; bh=MmxYjjMkckIeR2YerMD4Iu5F7+IlL0Yr7ofr4yjvAcg=; b=WsCsgE7Y4UhiJY1DlkjnZoaVP3vthUlHNtlo6tSOMHmGHxQ6bDcHkawg/IgjkBc0p/ +IpOHg/OIRdIdFxsz8BZp/CIw1zrkzSXYzQQIMIiOOLvGIcaUrtRC/ApfAbspjt1Tyg/ GHTZSPRxSNdspv0GtTAXNIV4fupj2+RMq6EsQe1bpXn78la0Ovzm14r6RhAkdmi8fntw f5u6IHH6atZ9Yujq3xwLGBeaQVyB0nG3kUlH+d8xFyYhWJZmB6IPBrwg1SByp+neIrbe gbLaIRZzQkQ6BPyH5mFJA2hfpndXPS8fNWs3i76EdJvacgjw4fd7cdYdy9G130LSqCxJ halw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joshtriplett.org header.s=fm3 header.b=lokKzEX7; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=L+z2PXoA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a170902b68b00b001aada12d628si3285979pls.585.2023.06.09.17.45.14; Fri, 09 Jun 2023 17:45:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@joshtriplett.org header.s=fm3 header.b=lokKzEX7; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=L+z2PXoA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbjFJA2R (ORCPT <rfc822;liningstudo@gmail.com> + 99 others); Fri, 9 Jun 2023 20:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232076AbjFJA2Q (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Jun 2023 20:28:16 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B59EF3A81; Fri, 9 Jun 2023 17:28:15 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 5EA8D320098A; Fri, 9 Jun 2023 20:28:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 09 Jun 2023 20:28:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= joshtriplett.org; h=cc:content-type:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm3; t=1686356891; x=1686443291; bh=Mm xYjjMkckIeR2YerMD4Iu5F7+IlL0Yr7ofr4yjvAcg=; b=lokKzEX7D56w8/Dpbe I7aJaADgN3uDvIqcEMC0j6ZOfWdY2sXGvnk4SY6/o4D/Apn2kbYwMyNmhJaOnL4f WhJEbc/C2OiNJ2vCIpB7rrFfPVONA3QkNVEraFtkZIgZXW3tcrMz0TWI1yhtVZ8t V1hVUJXHNs1CJGu+KI1TRVTCxXQYMQlQE39zE30+vfYHATjwimuomfnbYxltUPgg uZ/u5FX5nw95+kIJ2lqXRxIdWYktkcaoU/sPTfRMCWJw9hLENBM0hwArtzmQ00jR igdF2cBAwlgthNb2CCdqmYRdmBhSctD/cChy77PN7HFFLDHmqbi9mfTV2fTpGRFA SL2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1686356891; x=1686443291; bh=MmxYjjMkckIeR2YerMD4Iu5F7+IlL0Yr7of r4yjvAcg=; b=L+z2PXoALAnUzFAatwQyd8AOEyG6BTxEkRsH/1aSEM3ixT9mGYs 8inBfwMPkCKM0+v0RCdgKJbJpJh+EjMlp9K3bon2EItpvFXtSkE8p8VSCKl8va8b jmfZbk73bbZfrQk/FQVpkQE6wt8hWyO5OeqN/Gb9D1MteNV1kxk57n4v2J/WWgRC +IMQTFwmqKApeGAIP3FN1NTpXCF/6KJ9CxgesEfxMJw8ZUIAtnm9qyuo/h1uYCau 9we5yqOIIuF7VySyPnb5XuY0DXe3Q27SDePJxiixfZVP9OH6BAELoNRAInQPZ3s+ AjVzXfj+P4BGwH6nZ8LCscpsx7a5BK28H6A== X-ME-Sender: <xms:m8ODZMzpl3Pj6x2DjzKDXN-IxjAhCWVXMMXhd1z9FaBR2aUtBa9h7g> <xme:m8ODZATwwWuarKe8Nt6GqcuP2ATF7OdYwbdmKEQIs3zOgoT06l8lCOvlAtB4jEGES Sb9L11QrUJIHSMZyJc> X-ME-Received: <xmr:m8ODZOUhR9K9UUvTH5588xA4tdq0gA2u0zDtW9pJeCI4d2lfCvrdAdV7OA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedtledgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggusehttdertddttddvnecuhfhrohhmpeflohhshhcuvfhr ihhplhgvthhtuceojhhoshhhsehjohhshhhtrhhiphhlvghtthdrohhrgheqnecuggftrf grthhtvghrnhepleelgeegtdejjeefuedvudefgefgkedtfeekheevueevvddvhfegfffg vdfgffeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epjhhoshhhsehjohhshhhtrhhiphhlvghtthdrohhrgh X-ME-Proxy: <xmx:m8ODZKiYvIrF0iobGY7goVzeU2cIK9geLYL7afLqSOoer7i2UmvxyQ> <xmx:m8ODZOCzlyqu6ZOQeEZBc1cU-6Vs6WeM7QcTnqFoeg13dr1_Jl6G_g> <xmx:m8ODZLJymQFH6J3WqjHiGiM2ykwxnXgUbXKC0SdSCi8SiaSCOhI6gg> <xmx:m8ODZB_8QWV8g3JTboAfgGlq3uxuXrMeO4twQxn0vTu2uLOuZ1Fewg> Feedback-ID: i83e94755:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Jun 2023 20:28:10 -0400 (EDT) Date: Fri, 9 Jun 2023 17:28:09 -0700 From: Josh Triplett <josh@joshtriplett.org> To: Masahiro Yamada <masahiroy@kernel.org>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu>, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: deb-pkg: Include modules.builtin* even if non-modular Message-ID: <36a4014c73a52af27d930d3ca31d362b60f4461c.1686356364.git.josh@joshtriplett.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768274454038672051?= X-GMAIL-MSGID: =?utf-8?q?1768274454038672051?= |
Series |
kbuild: deb-pkg: Include modules.builtin* even if non-modular
|
|
Commit Message
Josh Triplett
June 10, 2023, 12:28 a.m. UTC
Even for a non-modular kernel, the kernel builds modules.builtin and
modules.builtin.modinfo, with information about the built-in modules.
Tools such as initramfs-tools need these files to build a working
initramfs on some systems, such as those requiring firmware.
Install modules.builtin and modules.builtin.modinfo into the linux-image
package even for a non-modular kernel.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
scripts/package/builddeb | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On Fri 09 Jun 2023 17:28:09 GMT, Josh Triplett wrote: > Even for a non-modular kernel, the kernel builds modules.builtin and > modules.builtin.modinfo, with information about the built-in modules. > Tools such as initramfs-tools need these files to build a working > initramfs on some systems, such as those requiring firmware. Searching via source.debian.org, I was suprised that there are really numerous other tools as well, that attempt to read modules.builtin. > > Install modules.builtin and modules.builtin.modinfo into the linux-image > package even for a non-modular kernel. > > Signed-off-by: Josh Triplett <josh@joshtriplett.org> > --- Thanks! Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Tested-by: Nicolas Schier <nicolas@fjasle.eu> > scripts/package/builddeb | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index 252faaa5561c..91261529f2c7 100755 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -70,6 +70,12 @@ install_linux_image () { > mkdir -p "${pdir}/usr/lib/uml/modules" > mv "${pdir}/lib/modules/${KERNELRELEASE}" "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}" > fi > + elif [ -f modules.builtin ]; then > + mkdir -p "${pdir}/lib/modules/${KERNELRELEASE}" > + cp modules.builtin "${pdir}/lib/modules/${KERNELRELEASE}/modules.builtin" > + if [ -f modules.builtin.modinfo ]; then > + cp modules.builtin.modinfo "${pdir}/lib/modules/${KERNELRELEASE}/modules.builtin.modinfo" > + fi > fi > > # Install the kernel > -- > 2.40.1
On Sat, Jun 10, 2023 at 9:28 AM Josh Triplett <josh@joshtriplett.org> wrote: > > Even for a non-modular kernel, the kernel builds modules.builtin and > modules.builtin.modinfo, with information about the built-in modules. > Tools such as initramfs-tools need these files to build a working > initramfs on some systems, such as those requiring firmware. > > Install modules.builtin and modules.builtin.modinfo into the linux-image > package even for a non-modular kernel. > > Signed-off-by: Josh Triplett <josh@joshtriplett.org> OK, I understood. But, this patch only aids Debian in an ad-hoc file copy. I think chaning modules_install would be a more general solution. Can you use this patch as a prerequisite? https://patchwork.kernel.org/project/linux-kbuild/patch/20230615111743.883891-1-masahiroy@kernel.org/ Then, you can simply remove "if is_enabled CONFIG_MODULES; then" so you can install the files unconditionally. > --- > scripts/package/builddeb | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index 252faaa5561c..91261529f2c7 100755 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -70,6 +70,12 @@ install_linux_image () { > mkdir -p "${pdir}/usr/lib/uml/modules" > mv "${pdir}/lib/modules/${KERNELRELEASE}" "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}" > fi > + elif [ -f modules.builtin ]; then > + mkdir -p "${pdir}/lib/modules/${KERNELRELEASE}" > + cp modules.builtin "${pdir}/lib/modules/${KERNELRELEASE}/modules.builtin" > + if [ -f modules.builtin.modinfo ]; then > + cp modules.builtin.modinfo "${pdir}/lib/modules/${KERNELRELEASE}/modules.builtin.modinfo" > + fi > fi > > # Install the kernel > -- > 2.40.1 >
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 252faaa5561c..91261529f2c7 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -70,6 +70,12 @@ install_linux_image () { mkdir -p "${pdir}/usr/lib/uml/modules" mv "${pdir}/lib/modules/${KERNELRELEASE}" "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}" fi + elif [ -f modules.builtin ]; then + mkdir -p "${pdir}/lib/modules/${KERNELRELEASE}" + cp modules.builtin "${pdir}/lib/modules/${KERNELRELEASE}/modules.builtin" + if [ -f modules.builtin.modinfo ]; then + cp modules.builtin.modinfo "${pdir}/lib/modules/${KERNELRELEASE}/modules.builtin.modinfo" + fi fi # Install the kernel