Re: [PATCH kmod v4 4/4] libkmod, depmod, modprobe: Make directory for kernel modules configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Mon, Jul 17, 2023 at 09:28:30PM +0200, Jan Engelhardt wrote:
> 
> On Monday 2023-07-17 12:39, Michal Suchanek wrote:
> 
> >modprobe.d is now searched under ${prefix}/lib, add ${module_directory} to
> >specify the directory where to search for kernel modules.
> >
> >With this distributions that do not want to ship files in /lib can also
> >move kernel modules to /usr while others can keep them in /lib.
> 
> This patch breaks kernel builds/installation.
> 
>  * assume $distro has given me a kmod that has your submission included,
>    and such kmod was ./configure'd --with-module-directory=/usr/lib/modules
> 
> With such a kmod, the module installation of current and past kernels
> is not possible, in other words, ** bisecting kernels ** is broken:

It might be nice to provide backwads compatibility with earlier
configurations.

However, if it comes at the cost of making the implementation more
complex and future maintenance more difficult it might not be such a
great idea. So far I have not seen a proposal how to do it nicely.

You can use any of the number of workarounds that have been used for
installing kernels on usrmerged distributions up until now.

sed -i -e s,/lib/modules,/usr/lib/modules, Makefile scripts/depmod.sh is
one.

Failing depmod is not critical, you can fix it up after the fact once
the modules are deployed on the test system.

You can also build a differently configured kmod for the purpose and
pass it with DEPMOD= to the kernel build.

Thanks

Michal



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux