mirror of
https://github.com/torvalds/linux.git
synced 2026-03-07 23:04:33 +01:00
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>
This commit is contained in:
parent
18e2d526bf
commit
f8e05c1063
2 changed files with 6 additions and 1 deletions
6
Makefile
6
Makefile
|
|
@ -1417,6 +1417,10 @@ ifdef CONFIG_HEADERS_INSTALL
|
|||
prepare: headers
|
||||
endif
|
||||
|
||||
PHONY += usr_gen_init_cpio
|
||||
usr_gen_init_cpio: scripts_basic
|
||||
$(Q)$(MAKE) $(build)=usr usr/gen_init_cpio
|
||||
|
||||
PHONY += scripts_unifdef
|
||||
scripts_unifdef: scripts_basic
|
||||
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
|
||||
|
|
@ -1669,6 +1673,8 @@ distclean: mrproper
|
|||
# Packaging of the kernel to various formats
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
modules-cpio-pkg: usr_gen_init_cpio
|
||||
|
||||
%src-pkg: FORCE
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
||||
%pkg: include/config/kernel.release FORCE
|
||||
|
|
|
|||
|
|
@ -201,7 +201,6 @@ quiet_cmd_cpio = CPIO $@
|
|||
cmd_cpio = $(CONFIG_SHELL) $(srctree)/usr/gen_initramfs.sh -o $@ $<
|
||||
|
||||
modules-$(KERNELRELEASE)-$(ARCH).cpio: .tmp_modules_cpio
|
||||
$(Q)$(MAKE) $(build)=usr usr/gen_init_cpio
|
||||
$(call cmd,cpio)
|
||||
|
||||
PHONY += modules-cpio-pkg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue