Skip to content

Commit

Permalink
kernel-install.eclass: run depmod after compressing modules
Browse files Browse the repository at this point in the history
(de)compressing modules changes the path of the module files so we need to
run depmod to ensure that tools such as modprobe/modinfo work.

Note that depmod is often, but *not* always, run by sys-kernel/installkernel.
Systemd installs a hook to do this, but there is no equivalent on openrc
systems. So instead just ensure that the tree of modules we install is
consistent here in the eclass.

Signed-off-by: Andrew Ammerlaan <[email protected]>
  • Loading branch information
Nowa-Ammerlaan committed Aug 9, 2024
1 parent 81a12cf commit 5d6d7c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eclass/kernel-install.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,9 @@ kernel-install_compress_modules() {
find "${ED}/lib/modules/${KV_FULL}" -name '*.ko' -print0 |
xargs -0 -P "$(makeopts_jobs)" -n 128 "${compress[@]}"
assert "Compressing kernel modules failed"

# Module paths have changed, run depmod
depmod --all --basedir "${ED}" ${KV_FULL} || die
fi
}

Expand Down

0 comments on commit 5d6d7c6

Please sign in to comment.