Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: Add top-level target for building gen_init_cpio

Add a top-level target for building gen_init_cpio to prevent re-entering
kbuild for 'modules-cpio-pkg'.

The recently introduced target 'modules-cpio-pkg' depends on
gen_init_cpio but there is no simple way to add this dependency as a
prerequisite that can be built in parallel to other recipes.

Introducing the top-level target, enables fixing this and also prepares
a possible move of gen_init_cpio from usr/ to scripts/.

Signed-off-by: Nicolas Schier <nsc@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20251128-kbuild-add-top-level-target-for-building-gen_init_cpio-v1-1-84c63a8fc8d4@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Nicolas Schier and committed by
Nathan Chancellor
f8e05c10 18e2d526

+6 -1
+6
Makefile
··· 1417 1417 prepare: headers 1418 1418 endif 1419 1419 1420 + PHONY += usr_gen_init_cpio 1421 + usr_gen_init_cpio: scripts_basic 1422 + $(Q)$(MAKE) $(build)=usr usr/gen_init_cpio 1423 + 1420 1424 PHONY += scripts_unifdef 1421 1425 scripts_unifdef: scripts_basic 1422 1426 $(Q)$(MAKE) $(build)=scripts scripts/unifdef ··· 1672 1668 1673 1669 # Packaging of the kernel to various formats 1674 1670 # --------------------------------------------------------------------------- 1671 + 1672 + modules-cpio-pkg: usr_gen_init_cpio 1675 1673 1676 1674 %src-pkg: FORCE 1677 1675 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
-1
scripts/Makefile.package
··· 201 201 cmd_cpio = $(CONFIG_SHELL) $(srctree)/usr/gen_initramfs.sh -o $@ $< 202 202 203 203 modules-$(KERNELRELEASE)-$(ARCH).cpio: .tmp_modules_cpio 204 - $(Q)$(MAKE) $(build)=usr usr/gen_init_cpio 205 204 $(call cmd,cpio) 206 205 207 206 PHONY += modules-cpio-pkg