* [PATCH 0/2] Move tool for generating initramfs cpio to scripts/
@ 2026-03-09 7:56 Nicolas Schier
2026-03-09 7:56 ` [PATCH 1/2] kbuild: Mark usr_gen_init_cpio as no-dot-config-target Nicolas Schier
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Nicolas Schier @ 2026-03-09 7:56 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier; +Cc: linux-kbuild, linux-kernel, Askar Safin
initramfs cpio tools had been subject of several recent discussions on
linux-kbuild. Let's get two minor steps forward by enabling a
top-level target for building gen_init_cpio w/o the need of a valid
kbuild configuration [1] and move the tools for generating the builtin
initramfs from usr/ to scripts/ [2].
Link: https://lore.kernel.org/all/20260220191150.244006-1-safinaskar@gmail.com # [1]
Link: https://lore.kernel.org/all/aSdrCFkUQup3qb-q@derry.ads.avm.de/ # [2]
---
Nicolas Schier (2):
kbuild: Mark usr_gen_init_cpio as no-dot-config-target
kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/
MAINTAINERS | 1 +
Makefile | 9 +++++----
scripts/.gitignore | 1 +
scripts/Makefile | 2 ++
{usr => scripts}/gen_init_cpio.c | 0
{usr => scripts}/gen_initramfs.sh | 2 +-
scripts/remove-stale-files | 2 ++
usr/.gitignore | 4 +++-
usr/Makefile | 4 +---
9 files changed, 16 insertions(+), 9 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260225-move-gen_init_cpio-to-scripts-9e89ef99e51a
Best regards,
--
Nicolas
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH 1/2] kbuild: Mark usr_gen_init_cpio as no-dot-config-target 2026-03-09 7:56 [PATCH 0/2] Move tool for generating initramfs cpio to scripts/ Nicolas Schier @ 2026-03-09 7:56 ` Nicolas Schier 2026-03-09 7:56 ` [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ Nicolas Schier 2026-03-10 1:54 ` [PATCH 0/2] Move tool for generating initramfs cpio " Askar Safin 2 siblings, 0 replies; 12+ messages in thread From: Nicolas Schier @ 2026-03-09 7:56 UTC (permalink / raw) To: Nathan Chancellor, Nicolas Schier; +Cc: linux-kbuild, linux-kernel, Askar Safin Let usr/gen_init_cpio be built also if there is no kernel configuration. Askar Safin reported that gen_init_cpio may be of use before any kernel configuration is available. Add usr_gen_init_cpio to list of targets that do not require a .config file. Reported-by: Askar Safin <safinaskar@gmail.com> Closes: https://lore.kernel.org/all/20260220191150.244006-1-safinaskar@gmail.com Fixes: f8e05c10631e ("kbuild: Add top-level target for building gen_init_cpio") Signed-off-by: Nicolas Schier <nsc@kernel.org> --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index e944c6e71e81..0e788ce45457 100644 --- a/Makefile +++ b/Makefile @@ -296,6 +296,7 @@ no-dot-config-targets := $(clean-targets) \ $(version_h) headers headers_% archheaders archscripts \ %asm-generic kernelversion %src-pkg dt_binding_check \ outputmakefile rustavailable rustfmt rustfmtcheck \ + usr_gen_init_cpio \ run-command no-sync-config-targets := $(no-dot-config-targets) %install modules_sign kernelrelease \ image_name -- 2.51.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-09 7:56 [PATCH 0/2] Move tool for generating initramfs cpio to scripts/ Nicolas Schier 2026-03-09 7:56 ` [PATCH 1/2] kbuild: Mark usr_gen_init_cpio as no-dot-config-target Nicolas Schier @ 2026-03-09 7:56 ` Nicolas Schier 2026-03-09 13:41 ` Thomas Weißschuh 2026-03-10 1:49 ` Askar Safin 2026-03-10 1:54 ` [PATCH 0/2] Move tool for generating initramfs cpio " Askar Safin 2 siblings, 2 replies; 12+ messages in thread From: Nicolas Schier @ 2026-03-09 7:56 UTC (permalink / raw) To: Nathan Chancellor, Nicolas Schier; +Cc: linux-kbuild, linux-kernel, Askar Safin get_init_cpio and gen_initramfs.sh are part of kbuild and required for all kernel builds. Move it to scripts/ to be more clear about their importance. Link: https://lore.kernel.org/all/aSdrCFkUQup3qb-q@derry.ads.avm.de/ Signed-off-by: Nicolas Schier <nsc@kernel.org> --- Nathan, could this go through kbuild-fixes even though it is not really a fix? Introducing a top-level Makefile target 'usr_gen_init_cpio' in v7.0 and renaming it to 'scripts/gen_init_cpio` in v7.1 doesn't sound good to me. --- MAINTAINERS | 1 + Makefile | 10 +++++----- scripts/.gitignore | 1 + scripts/Makefile | 2 ++ {usr => scripts}/gen_init_cpio.c | 0 {usr => scripts}/gen_initramfs.sh | 2 +- scripts/remove-stale-files | 2 ++ usr/.gitignore | 4 +++- usr/Makefile | 4 +--- 9 files changed, 16 insertions(+), 10 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..0e374c92941f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13833,6 +13833,7 @@ F: scripts/basic/ F: scripts/clang-tools/ F: scripts/container F: scripts/dummy-tools/ +F: scripts/gen_init* F: scripts/include/ F: scripts/install.sh F: scripts/mk* diff --git a/Makefile b/Makefile index 0e788ce45457..7798863002ac 100644 --- a/Makefile +++ b/Makefile @@ -296,7 +296,7 @@ no-dot-config-targets := $(clean-targets) \ $(version_h) headers headers_% archheaders archscripts \ %asm-generic kernelversion %src-pkg dt_binding_check \ outputmakefile rustavailable rustfmt rustfmtcheck \ - usr_gen_init_cpio \ + scripts/gen_init_cpio \ run-command no-sync-config-targets := $(no-dot-config-targets) %install modules_sign kernelrelease \ image_name @@ -1437,9 +1437,9 @@ 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/gen_init_cpio +scripts/gen_init_cpio: scripts_basic + $(Q)$(MAKE) $(build)=scripts scripts/gen_init_cpio PHONY += scripts_unifdef scripts_unifdef: scripts_basic @@ -1709,7 +1709,7 @@ distclean: mrproper # Packaging of the kernel to various formats # --------------------------------------------------------------------------- -modules-cpio-pkg: usr_gen_init_cpio +modules-cpio-pkg: scripts/gen_init_cpio %src-pkg: FORCE $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@ diff --git a/scripts/.gitignore b/scripts/.gitignore index 4215c2208f7e..700456543910 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only /asn1_compiler +/gen_init_cpio /gen_packed_field_checks /generate_rust_target /insert-sys-cert diff --git a/scripts/Makefile b/scripts/Makefile index 0941e5ce7b57..039863cd064e 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -52,6 +52,8 @@ ifdef CONFIG_BUILDTIME_MCOUNT_SORT HOSTCFLAGS_sorttable.o += -DMCOUNT_SORT_ENABLED endif +hostprogs-always-y += gen_init_cpio + # The following programs are only built on demand hostprogs += unifdef gen_packed_field_checks diff --git a/usr/gen_init_cpio.c b/scripts/gen_init_cpio.c similarity index 100% rename from usr/gen_init_cpio.c rename to scripts/gen_init_cpio.c diff --git a/usr/gen_initramfs.sh b/scripts/gen_initramfs.sh similarity index 99% rename from usr/gen_initramfs.sh rename to scripts/gen_initramfs.sh index 7eba2fddf0ef..27ac1fd48001 100755 --- a/usr/gen_initramfs.sh +++ b/scripts/gen_initramfs.sh @@ -247,4 +247,4 @@ done # If output_file is set we will generate cpio archive # we are careful to delete tmp files -usr/gen_init_cpio $output $timestamp $cpio_list +scripts/gen_init_cpio $output $timestamp $cpio_list diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files index 6e39fa8540df..e46337e4bfb8 100755 --- a/scripts/remove-stale-files +++ b/scripts/remove-stale-files @@ -26,3 +26,5 @@ rm -f scripts/selinux/genheaders/genheaders rm -f *.spec rm -f lib/test_fortify.log + +rm -f usr/gen_init_cpio diff --git a/usr/.gitignore b/usr/.gitignore index 8996e7a88902..13bf7a38355c 100644 --- a/usr/.gitignore +++ b/usr/.gitignore @@ -1,4 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only -/gen_init_cpio /initramfs_data.cpio /initramfs_inc_data + +# Keep around until cleanup in scripts/remove-stale-files +/gen_init_cpio diff --git a/usr/Makefile b/usr/Makefile index e8f42478a0b7..5b97ee66c00a 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -16,8 +16,6 @@ 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 := @@ -72,7 +70,7 @@ quiet_cmd_initfs = GEN $@ # 2) There are changes in which files are included (added or deleted) # 3) If gen_init_cpio are newer than initramfs_data.cpio # 4) Arguments to gen_initramfs.sh changes -$(obj)/initramfs_data.cpio: $(src)/gen_initramfs.sh $(obj)/gen_init_cpio $(deps_initramfs) FORCE +$(obj)/initramfs_data.cpio: $(srctree)/scripts/gen_initramfs.sh scripts/gen_init_cpio $(deps_initramfs) FORCE $(call if_changed,initfs) endif -- 2.51.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-09 7:56 ` [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ Nicolas Schier @ 2026-03-09 13:41 ` Thomas Weißschuh 2026-03-10 7:14 ` Nicolas Schier 2026-03-10 1:49 ` Askar Safin 1 sibling, 1 reply; 12+ messages in thread From: Thomas Weißschuh @ 2026-03-09 13:41 UTC (permalink / raw) To: Nicolas Schier; +Cc: Nathan Chancellor, linux-kbuild, linux-kernel, Askar Safin On Mon, Mar 09, 2026 at 08:56:30AM +0100, Nicolas Schier wrote: > get_init_cpio and gen_initramfs.sh are part of kbuild and required for "gen_init_cpio" > all kernel builds. Move it to scripts/ to be more clear about their > importance. As far as I can see, gen_init_cpio is currently only built and used if CONFIG_BLK_DEV_INITRD is enabled. So "required for all kernel builds" sounds wrong. This on-demand build can probably be preserved like this: hostprogs += gen_init_cpio always-$(CONFIG_BLK_DEV_INITRD) += gen_init_cpio > Link: https://lore.kernel.org/all/aSdrCFkUQup3qb-q@derry.ads.avm.de/ > Signed-off-by: Nicolas Schier <nsc@kernel.org> > --- > > Nathan, could this go through kbuild-fixes even though it is not really > a fix? Introducing a top-level Makefile target 'usr_gen_init_cpio' > in v7.0 and renaming it to 'scripts/gen_init_cpio` in v7.1 doesn't sound > good to me. > --- > MAINTAINERS | 1 + > Makefile | 10 +++++----- > scripts/.gitignore | 1 + > scripts/Makefile | 2 ++ > {usr => scripts}/gen_init_cpio.c | 0 > {usr => scripts}/gen_initramfs.sh | 2 +- > scripts/remove-stale-files | 2 ++ > usr/.gitignore | 4 +++- > usr/Makefile | 4 +--- > 9 files changed, 16 insertions(+), 10 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 55af015174a5..0e374c92941f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -13833,6 +13833,7 @@ F: scripts/basic/ > F: scripts/clang-tools/ > F: scripts/container > F: scripts/dummy-tools/ > +F: scripts/gen_init* > F: scripts/include/ > F: scripts/install.sh > F: scripts/mk* > diff --git a/Makefile b/Makefile > index 0e788ce45457..7798863002ac 100644 > --- a/Makefile > +++ b/Makefile > @@ -296,7 +296,7 @@ no-dot-config-targets := $(clean-targets) \ > $(version_h) headers headers_% archheaders archscripts \ > %asm-generic kernelversion %src-pkg dt_binding_check \ > outputmakefile rustavailable rustfmt rustfmtcheck \ > - usr_gen_init_cpio \ > + scripts/gen_init_cpio \ > run-command > no-sync-config-targets := $(no-dot-config-targets) %install modules_sign kernelrelease \ > image_name > @@ -1437,9 +1437,9 @@ 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/gen_init_cpio > +scripts/gen_init_cpio: scripts_basic > + $(Q)$(MAKE) $(build)=scripts scripts/gen_init_cpio The other proxy targets for scripts/ use the 'scripts_' prefix. Why is this one different? (...) > diff --git a/scripts/Makefile b/scripts/Makefile > index 0941e5ce7b57..039863cd064e 100644 > --- a/scripts/Makefile > +++ b/scripts/Makefile > @@ -52,6 +52,8 @@ ifdef CONFIG_BUILDTIME_MCOUNT_SORT > HOSTCFLAGS_sorttable.o += -DMCOUNT_SORT_ENABLED > endif > > +hostprogs-always-y += gen_init_cpio > + > # The following programs are only built on demand > hostprogs += unifdef gen_packed_field_checks (...) ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-09 13:41 ` Thomas Weißschuh @ 2026-03-10 7:14 ` Nicolas Schier 2026-03-10 9:13 ` Thomas Weißschuh 0 siblings, 1 reply; 12+ messages in thread From: Nicolas Schier @ 2026-03-10 7:14 UTC (permalink / raw) To: Thomas Weißschuh Cc: Nathan Chancellor, linux-kbuild, linux-kernel, Askar Safin On Mon, Mar 09, 2026 at 02:41:53PM +0100, Thomas Weißschuh wrote: > On Mon, Mar 09, 2026 at 08:56:30AM +0100, Nicolas Schier wrote: > > get_init_cpio and gen_initramfs.sh are part of kbuild and required for > > "gen_init_cpio" thanks! > > all kernel builds. Move it to scripts/ to be more clear about their > > importance. > > As far as I can see, gen_init_cpio is currently only built and used if > CONFIG_BLK_DEV_INITRD is enabled. So "required for all kernel builds" > sounds wrong. > > This on-demand build can probably be preserved like this: > > hostprogs += gen_init_cpio > always-$(CONFIG_BLK_DEV_INITRD) += gen_init_cpio Ack, thanks! I'll take your suggestion. ... > > diff --git a/Makefile b/Makefile > > index 0e788ce45457..7798863002ac 100644 > > --- a/Makefile > > +++ b/Makefile ... > > @@ -1437,9 +1437,9 @@ 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/gen_init_cpio > > +scripts/gen_init_cpio: scripts_basic > > + $(Q)$(MAKE) $(build)=scripts scripts/gen_init_cpio > > The other proxy targets for scripts/ use the 'scripts_' prefix. > Why is this one different? Good question; I was ambiguous about that, but I chose 'scripts/' in favor of 'scripts_' as 1. The $(obj)/initramfs_data.cpio target in usr/Makefile has to depend on 'scripts/gen_init_cpio' regardless of how the top-level target is called, as the sub-make cannot depend on a phony top-level rule. If possible, I like to have the same name for dependencies as for the rule that generates them. 2. I cannot see the reason for the 'scripts_' prefix currently used in top-level Makefile for real targets building a single output file. It seems to me that commit bdd7714b6f4c ("kbuild: build all prerequisites of headers_install simultaneously") introduced the 'scripts_' prefix due to the historic origin 'scripts_basic'; which itself came with commit 952a0ae394f4 ("[PATCH] Fix early parallel make failures", v2.6.5) [1]. I _guess_ the 'scripts_' prefix was meant to clearly make a difference from the previous 'scripts' target, and the name makes clear that it is a phony target building several things. Masahiro, if you are around I'd appreciate a comment from you. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=952a0ae394f4 Thomas, does the reasoning make sense to you? Or do you expect troubles due to the 'scripts/' prefix? Thanks for the feedback! Kind regards, Nicolas ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-10 7:14 ` Nicolas Schier @ 2026-03-10 9:13 ` Thomas Weißschuh 2026-03-12 13:59 ` Nicolas Schier 0 siblings, 1 reply; 12+ messages in thread From: Thomas Weißschuh @ 2026-03-10 9:13 UTC (permalink / raw) To: Nicolas Schier; +Cc: Nathan Chancellor, linux-kbuild, linux-kernel, Askar Safin On Tue, Mar 10, 2026 at 08:14:36AM +0100, Nicolas Schier wrote: > On Mon, Mar 09, 2026 at 02:41:53PM +0100, Thomas Weißschuh wrote: > > On Mon, Mar 09, 2026 at 08:56:30AM +0100, Nicolas Schier wrote: (...) > > > @@ -1437,9 +1437,9 @@ 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/gen_init_cpio > > > +scripts/gen_init_cpio: scripts_basic > > > + $(Q)$(MAKE) $(build)=scripts scripts/gen_init_cpio > > > > The other proxy targets for scripts/ use the 'scripts_' prefix. > > Why is this one different? > > Good question; I was ambiguous about that, but I chose 'scripts/' in > favor of 'scripts_' as > > 1. The $(obj)/initramfs_data.cpio target in usr/Makefile has to depend > on 'scripts/gen_init_cpio' regardless of how the top-level target is > called, as the sub-make cannot depend on a phony top-level rule. > If possible, I like to have the same name for dependencies as for the > rule that generates them. > > 2. I cannot see the reason for the 'scripts_' prefix currently used in > top-level Makefile for real targets building a single output file. > It seems to me that commit bdd7714b6f4c ("kbuild: build all > prerequisites of headers_install simultaneously") introduced the > 'scripts_' prefix due to the historic origin 'scripts_basic'; which > itself came with commit 952a0ae394f4 ("[PATCH] Fix early parallel > make failures", v2.6.5) [1]. I _guess_ the 'scripts_' prefix was > meant to clearly make a difference from the previous 'scripts' > target, and the name makes clear that it is a phony target building > several things. > > Masahiro, if you are around I'd appreciate a comment from you. > > [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=952a0ae394f4 > > Thomas, does the reasoning make sense to you? Or do you expect troubles > due to the 'scripts/' prefix? Sounds reasonable. Personally I would still prefer consistency, but that is subjective of course. In any case: Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Thomas ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-10 9:13 ` Thomas Weißschuh @ 2026-03-12 13:59 ` Nicolas Schier 0 siblings, 0 replies; 12+ messages in thread From: Nicolas Schier @ 2026-03-12 13:59 UTC (permalink / raw) To: Thomas Weißschuh Cc: Nathan Chancellor, linux-kbuild, linux-kernel, Askar Safin On Tue, Mar 10, 2026 at 10:13:29AM +0100, Thomas Weißschuh wrote: > On Tue, Mar 10, 2026 at 08:14:36AM +0100, Nicolas Schier wrote: > > On Mon, Mar 09, 2026 at 02:41:53PM +0100, Thomas Weißschuh wrote: > > > On Mon, Mar 09, 2026 at 08:56:30AM +0100, Nicolas Schier wrote: > > (...) > > > > > @@ -1437,9 +1437,9 @@ 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/gen_init_cpio > > > > +scripts/gen_init_cpio: scripts_basic > > > > + $(Q)$(MAKE) $(build)=scripts scripts/gen_init_cpio > > > > > > The other proxy targets for scripts/ use the 'scripts_' prefix. > > > Why is this one different? > > > > Good question; I was ambiguous about that, but I chose 'scripts/' in > > favor of 'scripts_' as > > > > 1. The $(obj)/initramfs_data.cpio target in usr/Makefile has to depend > > on 'scripts/gen_init_cpio' regardless of how the top-level target is > > called, as the sub-make cannot depend on a phony top-level rule. > > If possible, I like to have the same name for dependencies as for the > > rule that generates them. > > > > 2. I cannot see the reason for the 'scripts_' prefix currently used in > > top-level Makefile for real targets building a single output file. > > It seems to me that commit bdd7714b6f4c ("kbuild: build all > > prerequisites of headers_install simultaneously") introduced the > > 'scripts_' prefix due to the historic origin 'scripts_basic'; which > > itself came with commit 952a0ae394f4 ("[PATCH] Fix early parallel > > make failures", v2.6.5) [1]. I _guess_ the 'scripts_' prefix was > > meant to clearly make a difference from the previous 'scripts' > > target, and the name makes clear that it is a phony target building > > several things. > > > > Masahiro, if you are around I'd appreciate a comment from you. > > > > [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=952a0ae394f4 > > > > Thomas, does the reasoning make sense to you? Or do you expect troubles > > due to the 'scripts/' prefix? > > Sounds reasonable. Personally I would still prefer consistency, but that is > subjective of course. I'll be considering that. > In any case: > Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Thanks! ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-09 7:56 ` [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ Nicolas Schier 2026-03-09 13:41 ` Thomas Weißschuh @ 2026-03-10 1:49 ` Askar Safin 2026-03-10 6:24 ` Nicolas Schier 1 sibling, 1 reply; 12+ messages in thread From: Askar Safin @ 2026-03-10 1:49 UTC (permalink / raw) To: nsc; +Cc: linux-kbuild, linux-kernel, nathan Nicolas Schier <nsc@kernel.org>: > +# Keep around until cleanup in scripts/remove-stale-files Linus said here https://lore.kernel.org/all/CAHk-=wiHK5_oBUdUiNAaevmN9f-ORe+QBqbRefAZaw-RbgEn3w@mail.gmail.com/ that he doesn't like scripts/remove-stale-files (this is my interpretation). -- Askar Safin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-10 1:49 ` Askar Safin @ 2026-03-10 6:24 ` Nicolas Schier 2026-03-22 12:50 ` Askar Safin 0 siblings, 1 reply; 12+ messages in thread From: Nicolas Schier @ 2026-03-10 6:24 UTC (permalink / raw) To: Askar Safin; +Cc: linux-kbuild, linux-kernel, nathan On Tue, Mar 10, 2026 at 04:49:12AM +0300, Askar Safin wrote: > Nicolas Schier <nsc@kernel.org>: > > +# Keep around until cleanup in scripts/remove-stale-files > > Linus said here https://lore.kernel.org/all/CAHk-=wiHK5_oBUdUiNAaevmN9f-ORe+QBqbRefAZaw-RbgEn3w@mail.gmail.com/ > that he doesn't like scripts/remove-stale-files (this is my interpretation). thanks for the pointer! Yes, remove-stale-files is suboptimal, but not adding entries there doesn't make anything better. And yes, entries in remove-stale-files should have a life-time of years rather than months; and removing entries from .gitignore before the remove-stale-files cleanup should be prevented. Therefore I chose to add the comment to usr/.gitignore to prevent accidental removal of the '/gen_init_cpio' before the time has come. Does that match for you? Kind regards, Nicolas ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ 2026-03-10 6:24 ` Nicolas Schier @ 2026-03-22 12:50 ` Askar Safin 0 siblings, 0 replies; 12+ messages in thread From: Askar Safin @ 2026-03-22 12:50 UTC (permalink / raw) To: Nicolas Schier; +Cc: linux-kbuild, linux-kernel, nathan On Tue, Mar 10, 2026 at 10:15 AM Nicolas Schier <nsc@kernel.org> wrote: > Therefore I chose to add the comment to usr/.gitignore to prevent > accidental removal of the '/gen_init_cpio' before the time has come. > > Does that match for you? Yes -- Askar Safin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] Move tool for generating initramfs cpio to scripts/ 2026-03-09 7:56 [PATCH 0/2] Move tool for generating initramfs cpio to scripts/ Nicolas Schier 2026-03-09 7:56 ` [PATCH 1/2] kbuild: Mark usr_gen_init_cpio as no-dot-config-target Nicolas Schier 2026-03-09 7:56 ` [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ Nicolas Schier @ 2026-03-10 1:54 ` Askar Safin 2026-03-10 4:30 ` H. Peter Anvin 2 siblings, 1 reply; 12+ messages in thread From: Askar Safin @ 2026-03-10 1:54 UTC (permalink / raw) To: nsc Cc: linux-kbuild, linux-kernel, nathan, safinaskar, Rob Landley, H. Peter Anvin I like this patchset. Rob (CC'd), does this solve your problem? Also, in [1] I said: > command > "make usr/gen_init_cpio" doesn't work in clean kernel tree even if > config exists (I checked this) Now I tested this again, and I see that "make usr/gen_init_cpio" indeed doesn't work in current mainline in that scenario, but "cd usr; make gen_init_cpio" works (how I supposed to know this?). So, problems in [1] are not as big as I thought. You don't need to build whole kernel two times in that scenario. But still I like this your new patchset. Also, I think that top-level "usr" directory exists as a placeholder for klibc-init project (this is merely my hypothesis, I don't know for sure). I. e. it was supposed to contain source for userspace init program, which was supposed to be put into default initramfs. But klibc-init project, unfortunately, seems to fail. So, I think we should remove whole top level "usr" directory and move its contents to other places. [1] https://lore.kernel.org/all/20260220191150.244006-1-safinaskar@gmail.com -- Askar Safin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] Move tool for generating initramfs cpio to scripts/ 2026-03-10 1:54 ` [PATCH 0/2] Move tool for generating initramfs cpio " Askar Safin @ 2026-03-10 4:30 ` H. Peter Anvin 0 siblings, 0 replies; 12+ messages in thread From: H. Peter Anvin @ 2026-03-10 4:30 UTC (permalink / raw) To: Askar Safin, nsc Cc: linux-kbuild, linux-kernel, nathan, safinaskar, Rob Landley On March 9, 2026 6:54:16 PM PDT, Askar Safin <safinaskar@gmail.com> wrote: >I like this patchset. > >Rob (CC'd), does this solve your problem? > >Also, in [1] I said: >> command >> "make usr/gen_init_cpio" doesn't work in clean kernel tree even if >> config exists (I checked this) > >Now I tested this again, and I see that "make usr/gen_init_cpio" indeed >doesn't work in current mainline in that scenario, but >"cd usr; make gen_init_cpio" works (how I supposed to know this?). >So, problems in [1] are not as big as I thought. You don't need to build >whole kernel two times in that scenario. But still I like this your >new patchset. > >Also, I think that top-level "usr" directory exists as a placeholder for >klibc-init project (this is merely my hypothesis, I don't know for sure). >I. e. it was supposed to contain source for userspace init program, which >was supposed to be put into default initramfs. > >But klibc-init project, unfortunately, seems to fail. So, I think we should >remove whole top level "usr" directory and move its contents to other places. > >[1] https://lore.kernel.org/all/20260220191150.244006-1-safinaskar@gmail.com > > > Well, it worked, but got vetoed. It is still maintained out of tree. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-03-22 12:51 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-03-09 7:56 [PATCH 0/2] Move tool for generating initramfs cpio to scripts/ Nicolas Schier 2026-03-09 7:56 ` [PATCH 1/2] kbuild: Mark usr_gen_init_cpio as no-dot-config-target Nicolas Schier 2026-03-09 7:56 ` [PATCH 2/2] kbuild: Move gen_init_cpio and gen_initramfs.sh to scripts/ Nicolas Schier 2026-03-09 13:41 ` Thomas Weißschuh 2026-03-10 7:14 ` Nicolas Schier 2026-03-10 9:13 ` Thomas Weißschuh 2026-03-12 13:59 ` Nicolas Schier 2026-03-10 1:49 ` Askar Safin 2026-03-10 6:24 ` Nicolas Schier 2026-03-22 12:50 ` Askar Safin 2026-03-10 1:54 ` [PATCH 0/2] Move tool for generating initramfs cpio " Askar Safin 2026-03-10 4:30 ` H. Peter Anvin
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.