Skip to content

kmod /usr support

Michal Suchanek linux-kbuild linux-modules lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 12 repliesIn review
  2. v44 patches 10 repliesSuperseded
  3. v24 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches2 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5configure: Detect openssl sm3 supportconfigure.ac+7 -00 replies
2/5man/depmod.d: Fix incorrect /usr/lib search pathman/depmod.d.xml+1 -10 replies
3/5libkmod, depmod: Load modprobe.d, depmod.d from ${prefix}/lib.Makefile.am configure.ac libkmod/libkmod.c +4 more+20 -50 replies
4/5kmod: Add pkgconfig file with kmod compile time configurationMakefile.am configure.ac tools/kmod.pc.in+21 -10 replies
5/5libkmod, depmod, modprobe: Make directory for kernel modules configurableMakefile.am configure.ac libkmod/libkmod.c +15 more+107 -8417 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH kmod v5 0/5] kmod /usr support

Hello,

with these patches it is possible to install kernel modules in an arbitrary directory - eg. moving the /lib/modules to /usr/lib/modules or /opt/linux.

While the modprobe.d and depmod.d search which already includes multiple paths is expanded to also include $(prefix) the module directory still supports only one location, only a different one under $(module_directory).

Having kmod search multiple module locations while only one is supported now might break some assumption about relative module path corresponding to a specific file, would require more invasive changes to implement, and is not supportive of the goal of moving the modules away from /lib.

Both kmod and the kernel need to be patched to make use of this feature. Patched kernel is backwards compatible with older kmod. Patched kmod with $(module_directory) set to /lib/modules is equivalent to unpatched kmod.

Thanks

Michal

v4: set whole path to module directory instead of adding prefix
v5: use pkg-config instead of jq, fix build on openssl without sm3 support

Michal Suchanek (5):
configure: Detect openssl sm3 support
man/depmod.d: Fix incorrect /usr/lib search path libkmod, depmod: Load modprobe.d, depmod.d from ${prefix}/lib.
kmod: Add pkgconfig file with kmod compile time configuration libkmod, depmod, modprobe: Make directory for kernel modules
configurable

 Makefile.am                          |   6 +-
 configure.ac                         |  30 ++++++++
 libkmod/libkmod.c                    |  11 +--
 man/Makefile.am                      |  10 ++-
 man/depmod.d.xml                     |   9 ++-
 man/depmod.xml                       |   4 +-
 man/modinfo.xml                      |   2 +-
 man/modprobe.d.xml                   |   1 +
 man/modprobe.xml                     |   2 +-
 man/modules.dep.xml                  |   6 +-
 testsuite/module-playground/Makefile |   2 +-
 testsuite/setup-rootfs.sh            | 109 +++++++++++++++------------
 testsuite/test-depmod.c              |  16 ++--
 testsuite/test-testsuite.c           |   8 +-
 tools/depmod.c                       |   7 +-
 tools/kmod.pc.in                     |  10 +++
 tools/modinfo.c                      |   4 +-
 tools/modprobe.c                     |   4 +-
 tools/static-nodes.c                 |   6 +-
 19 files changed, 156 insertions(+), 91 deletions(-)
 create mode 100644 tools/kmod.pc.in
Signature · 1 line
2.41.0