Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Nathan Chancellor <nathan@kernel.org>,
	 Nicolas Schier <nicolas.schier@linux.dev>
Cc: "Simon Glass" <sjg@chromium.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org,
	"Ahmad Fatoum" <a.fatoum@pengutronix.de>
Subject: [PATCH v2 1/2] initramfs: add gen_init_cpio to hostprogs unconditionally
Date: Tue, 25 Nov 2025 14:18:19 +0100	[thread overview]
Message-ID: <20251125-cpio-modules-pkg-v2-1-aa8277d89682@pengutronix.de> (raw)
In-Reply-To: <20251125-cpio-modules-pkg-v2-0-aa8277d89682@pengutronix.de>

gen_init_cpio is currently only needed when an initramfs cpio archive is
to be created out of CONFIG_INITRAMFS_SOURCE's contents. In other cases,
it's not added to hostprogs and no make target is available.

In preparation to use the host program from Makefile.package, define it
unconditionally. The program will still only be built as needed.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 usr/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/Makefile b/usr/Makefile
index f1779496bca78b4a56651b6af7221675ec7ade7a..e8f42478a0b76540180d191042cd58d3e4381f19 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -16,6 +16,8 @@ obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o
 
 $(obj)/initramfs_data.o: $(obj)/initramfs_inc_data
 
+hostprogs := gen_init_cpio
+
 ramfs-input := $(CONFIG_INITRAMFS_SOURCE)
 cpio-data :=
 
@@ -48,8 +50,6 @@ ifeq ($(cpio-data),)
 
 cpio-data := $(obj)/initramfs_data.cpio
 
-hostprogs := gen_init_cpio
-
 # .initramfs_data.cpio.d is used to identify all files included
 # in initramfs and to detect if any files are added/removed.
 # Removed files are identified by directory timestamp being updated

-- 
2.47.3


  reply	other threads:[~2025-11-25 13:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 13:18 [PATCH v2 0/2] kbuild: add target to build a cpio containing modules Ahmad Fatoum
2025-11-25 13:18 ` Ahmad Fatoum [this message]
2025-11-25 22:15   ` [PATCH v2 1/2] initramfs: add gen_init_cpio to hostprogs unconditionally Simon Glass
2025-11-25 13:18 ` [PATCH v2 2/2] kbuild: add target to build a cpio containing modules Ahmad Fatoum
2025-11-26 20:48   ` Nicolas Schier
2025-11-25 23:56 ` [PATCH v2 0/2] " Nathan Chancellor
2025-11-26  7:06 ` Thomas Weißschuh
2025-11-28 21:42 ` Nicolas Schier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251125-cpio-modules-pkg-v2-1-aa8277d89682@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas.schier@linux.dev \
    --cc=sjg@chromium.org \
    --cc=thomas.weissschuh@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox