Re: [PATCH v2] kbuild: modules-cpio-pkg: Respect INSTALL_MOD_PATH

From: Thomas Weißschuh

Date: Wed Mar 25 2026 - 11:51:47 EST


On Wed, Mar 25, 2026 at 03:57:25PM +0100, Janne Grunau wrote:
> 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/ [1]
> Fixes: 2a9c8c0b59d3 ("kbuild: add target to build a cpio containing modules")
> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Simon Glass <sjg@xxxxxxxxxxxx>
> Signed-off-by: Janne Grunau <j@xxxxxxxxxx>

Looks reasonable.

Reviewed-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>


Thomas