kbuild: make modules_install copy modules.builtin(.modinfo)
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 15 Jun 2023 11:17:43 +0000 (20:17 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 24 Jun 2023 09:04:12 +0000 (18:04 +0900)
commit8ae071fc216a25f4f797f33c56857f4dd6b4408e
tree9d224a0ef666364a07320d999decdafa56685795
parent8ed7e33a685a679c04cfe5ffdbb3b4c396ac8076
kbuild: make modules_install copy modules.builtin(.modinfo)

Josh Triplett reports that initramfs-tools needs modules.builtin and
modules.builtin.modinfo to create a working initramfs for a non-modular
kernel.

If this is a general tooling issue not limited to Debian, I think it
makes sense to change modules_install.

This commit changes the targets as follows when CONFIG_MODULES=n.

In-tree builds:
  make modules          -> no-op
  make modules_install  -> install modules.builtin(.modinfo)

External module builds:
  make modules          -> show error message like before
  make modules_install  -> show error message like before

Link: https://lore.kernel.org/lkml/36a4014c73a52af27d930d3ca31d362b60f4461c.1686356364.git.josh@joshtriplett.org/
Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Tested-by: Josh Triplett <josh@joshtriplett.org>
Makefile