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 2925F2080C8; Fri, 28 Nov 2025 19:20:27 +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=1764357628; cv=none; b=Y7/wNIYxbVX17Wr7VUIIbeFAB3xw9yYdIkd5E4QP3a+4ADa0dFL63zefUmrP9jLZQ8DS7jV1uP+EdYU4JvK66sNw04t7a4gXxojLdLdfyZGoy9ygn+qpTI9QEZvXFYsT6DZqZ+aK1GjpN4jmwiw6QSlH+s/P0swcAlINBYOaohM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764357628; c=relaxed/simple; bh=DXuAaf5STIKAoe84/D098t22vZNecRboTQaJHyXoD2A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PabgjkK0IYbXX97vTCP92/4Qy2e/STopSJ69Y/FCJ6hR4wCRf7R3eBRYJSb/iYfstSf7ywUF/TVRoFLj122+wv9nntFZiepIvjKcK2CCtMr1xIXtT7l/ocDpwkiA0qv6l2LbizPycLbuLl0dTmhBIfc2ybeXILW19H+fPI0IbAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wmht+8Ko; 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="Wmht+8Ko" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59F2FC4CEF1; Fri, 28 Nov 2025 19:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764357627; bh=DXuAaf5STIKAoe84/D098t22vZNecRboTQaJHyXoD2A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wmht+8Ko39eG7Fklvsw4YCvD+FQVgaoyTbzP8/LD/oWcdvoBnsvpvYV312fhyQSgO 0nGMMvBaVY7zYKbl3lvCQl4JnobwugvYQcK2iew0z6nyP9L0rkYs/aC231k6f/90hf ehllF+xGiHaMpNm86RUUemag+d5fR/HNcKLpKokLLPgHUZrnSxR3QaPC7f2SyZV2X2 af8m6+ILmErvxBu0H9F5DBjoBljnFsbMX5ytGT8hjANZinC1mLEU9/c9/JdKKyzCJw MmcdbuaLD65AZPKQ6ZShbDRNq+dAtSi+yKdEjz54tp3Rf1oQrgIaXrh/rtVwwG3WsU 1NlhWLdQOPeqg== Date: Wed, 26 Nov 2025 22:03:04 +0100 From: Nicolas Schier To: Nathan Chancellor Cc: Ahmad Fatoum , Simon Glass , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Sascha Hauer Subject: Re: [PATCH] kbuild: add target to build a cpio containing modules Message-ID: References: <20251115-cpio-modules-pkg-v1-1-01d5a0748442@pengutronix.de> <20251120063936.GA3321365@ax162> Precedence: bulk X-Mailing-List: linux-kbuild@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: <20251120063936.GA3321365@ax162> On Wed, Nov 19, 2025 at 11:39:36PM -0700, Nathan Chancellor wrote: ... > > diff --git a/scripts/Makefile.package b/scripts/Makefile.package > > index 74bcb9e7f7a4516473481468a0fcf700c3bead33..20eec9e2dec4dda3fa0ef64a15b80dccdcb55f90 100644 > > --- a/scripts/Makefile.package > > +++ b/scripts/Makefile.package > > @@ -189,6 +189,22 @@ tar-pkg: linux-$(KERNELRELEASE)-$(ARCH).tar > > tar%-pkg: linux-$(KERNELRELEASE)-$(ARCH).tar.% FORCE > > @: > > > > +modules-install: FORCE > > + $(Q)$(MAKE) -f $(srctree)/Makefile > > + $(Q)rm -rf $@ > > + $(Q)$(MAKE) -f $(srctree)/Makefile INSTALL_MOD_PATH=$@ modules_install > > + > > +quiet_cmd_cpio = CPIO $@ > > + cmd_cpio = $(srctree)/usr/gen_initramfs.sh $< > $@ > > + > > +modules-$(KERNELRELEASE)-$(ARCH).cpio: modules-install > > + $(Q)$(MAKE) -f $(srctree)/Makefile $(build)=usr cpio-data= usr/gen_init_cpio > > This seems like a bit of a hack to generate gen_init_cpio this way but I > am not sure it is worth moving usr/gen_init_cpio.c and > usr/gen_initramfs.sh elsewhere (scripts?) to make it a most accessible > hostprog right now... Nicolas, do you have any opinions on this? Yes, it feels hacky to me, too. After digging into this a bit, I am in favor of moving at least gen_init* and friends to scripts/. I can prepare a patch in a few days. Kind regards, Nicolas