Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
depmod: Add -M parameter to print the value of MODULE_DIRECTORY
This is the only value left in kmod.pc. It is an overkill to create a pkgconfig file for one value. Also this file was initially introduced, then moved to a different loaction because its purpose is misunderstood. Using it is awkward because the binary search path and pkgconfig path must be matched in case there is a possibility that multiple builds of kmod exist. As to why multiple build of kmod might exist on a system - custom test build - build of kbuild that matches some target system which has different settings for sysconfdit, distconfdir, or module_directory - per-architecture tools on 'multiarch' system that is set up for building binaries/boot images for arbitrary architectures - when these use a filesystem scheme in which per-architecture libraries and modules are stored in per-architecture directories Linux sticks out like a sore thumb with all modules in /lib While in the past it was fine to have One Kmod To Rule Them All because everything was hardcoded to a fixed value (and all compression methods and signature options could be built at the same time) this is no longer the case. Values for sysconfdir, distconfdir, and module_directory may differ between systems, and thus a build can be hosted on a system with one set of values but targeted for a system with different set of values. The -m option is provided to make it possible to override module_directory. However, for the modules to be installed in the correct location by kernel build the kernel build needs a way to determine the default value of module_directory, which this -M option provides. With a corresponding change to the Linux kbuild system installing modules should just work for both host with arbitrary module_directory and target for which correctly configured target-depmod is available and used during build. There is always the option to pass arbitrary value as argument to the -m option to build modules for a target system that uses different module_directory, or to move the installed modules after the fact. However, that requires somehow examining the target system out-of-band to determine the correct value, and hardcode such value in a build script. When working with multiple different targets regularly using a target-specific depmod is a way to manage the depmod build-time settings in a standardized way that works equally for other tools. Signed-off-by: Michal Suchanek <[email protected]>
- Loading branch information