~registry/kmod/master

  • Committer: Lucas De Marchi
  • Author(s): Jose Ignacio Tornos Martinez
  • Date: 2024-05-09 04:37:38 UTC
  • Revision ID: git-v1:05828b4a6e9327a63ef94df544a042b5e9ce4fe7
libkmod: add weak dependecies

It has been seen that for some network mac drivers (i.e. lan78xx) the
related module for the phy is loaded dynamically depending on the current
hardware. In this case, the associated phy is read using mdio bus and then
the associated phy module is loaded during runtime (kernel function
phy_request_driver_module). However, no software dependency is defined, so
the user tools will no be able to get this dependency. For example, if
dracut is used and the hardware is present, lan78xx will be included but no
phy module will be added, and in the next restart the device will not work
from boot because no related phy will be found during initramfs stage.

In order to solve this, we could define a normal 'pre' software dependency
in lan78xx module with all the possible phy modules (there may be some),
but proceeding in that way, all the possible phy modules would be loaded
while only one is necessary.

The idea is to create a new type of dependency, that we are going to call
'weak' to be used only by the user tools that need to detect this situation.
In that way, for example, dracut could check the 'weak' dependency of the
modules involved in order to install these dependencies in initramfs too.
That is, for the commented lan78xx module, defining the 'weak' dependency
with the possible phy modules list, only the necessary phy would be loaded
on demand keeping the same behavior, but all the possible phy modules would
be available from initramfs.

A new function 'kmod_module_get_weakdeps' in libkmod will be added for
this to avoid breaking the API and maintain backward compatibility. This
general procedure could be useful for other similar cases (not only for
dynamic phy loading).

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Link: https://lore.kernel.org/r/20240327141116.97587-1-jtornosm@redhat.com
Filename Latest Rev Last Changed Committer Comment Size
..
docs 409 12 years ago Lucas De Marchi doc: add gtk-doc to generate documentation Curren Diff
.gitignore 2 12 years ago Lucas De Marchi Rename libabc to libkmod 45 bytes Diff Download File
COPYING 182 12 years ago Lucas De Marchi Change licenses libkmod is under LGPL 2.1 or late 25.8 KB Diff Download File
libkmod-builtin.c 1293 1 year ago Lucas De Marchi libkmod: annotate kmod_builtin_iter API as static 6.2 KB Diff Download File
libkmod-config.c 1341 5 months ago Lucas De Marchi libkmod: add weak dependecies It has been seen th 33.6 KB Diff Download File
libkmod-elf.c 1301 1 year ago Lucas De Marchi libkmod: Do not inititialize file->memory on open 27.9 KB Diff Download File
libkmod-file.c 1340 5 months ago Lucas De Marchi libkmod: keep KMOD_FILE_COMPRESSION_NONE/load_reg 10.3 KB Diff Download File
libkmod-index.c 1195 4 years ago Lucas De Marchi libkmod: fix return error when opening index When 23 KB Diff Download File
libkmod-index.h 1195 4 years ago Lucas De Marchi libkmod: fix return error when opening index When 1.7 KB Diff Download File
libkmod-internal.h 1341 5 months ago Lucas De Marchi libkmod: add weak dependecies It has been seen th 10.5 KB Diff Download File
libkmod-list.c 961 9 years ago Lucas De Marchi Remove FSF mailing address It has changed in the 6.8 KB Diff Download File
libkmod-module.c 1341 5 months ago Lucas De Marchi libkmod: add weak dependecies It has been seen th 73.6 KB Diff Download File
libkmod-signature.c 1313 11 months ago Lucas De Marchi libkmod: remove pkcs7 obj_to_hash_algo() Switch t 8.3 KB Diff Download File
libkmod.c 1314 10 months ago Lucas De Marchi libkmod, depmod, modprobe: Make directory for kern 23.8 KB Diff Download File
libkmod.h 1341 5 months ago Lucas De Marchi libkmod: add weak dependecies It has been seen th 9.6 KB Diff Download File
libkmod.pc.in 1198 4 years ago Lucas De Marchi add Zstandard compression support I changed the s 270 bytes Diff Download File
libkmod.sym 1341 5 months ago Lucas De Marchi libkmod: add weak dependecies It has been seen th 2.1 KB Diff Download File
Makefile 863 10 years ago Lucas De Marchi build-sys: add small redirecting Makefiles These 332 bytes Diff Download File
README 813 11 years ago Lucas De Marchi README: Move items from TODO Put the differences 1.2 KB Diff Download File