]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
kbuild: modules-cpio-pkg: Respect INSTALL_MOD_PATH
authorJanne Grunau <j@jannau.net>
Fri, 27 Mar 2026 08:30:29 +0000 (09:30 +0100)
committerNathan Chancellor <nathan@kernel.org>
Mon, 30 Mar 2026 05:38:26 +0000 (07:38 +0200)
commit742de64b62b690a368dbeb846499eb8ac8ceedb9
treeced618b6dd01125c49a9604c77653305f495babf
parent7aaa8047eafd0bd628065b15757d9b48c5f9c07d
kbuild: modules-cpio-pkg: Respect INSTALL_MOD_PATH

The modules-cpio-pkg target added in commit 2a9c8c0b59d3 ("kbuild: add
target to build a cpio containing modules") is incompatible with
initramfs with merged /lib and /usr/lib directories [1]. "/lib" cannot
be a link and directory at the same time.
Respect a non-empty INSTALL_MOD_PATH in the modules-cpio-pkg target so
that `make INSTALL_MOD_PATH=/usr modules-cpio-pkg` results in the same
module install location as `make INSTALL_MOD_PATH=/usr modules_install`.

Tested with Fedora distribution initramfs produced by dracut.

Link: https://systemd.io/THE_CASE_FOR_THE_USR_MERGE/
Fixes: 2a9c8c0b59d3 ("kbuild: add target to build a cpio containing modules")
Cc: stable@vger.kernel.org
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Tested-by: Nicolas Schier <nsc@kernel.org>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://patch.msgid.link/20260327-kbuild-modules-cpio-pkg-usr-merge-v3-1-ef507dfa006c@jannau.net
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
scripts/Makefile.package