Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 May 2016 20:37:53 +0200
From:      olli hauer <ohauer@gmx.de>
To:        'freebsd-arch' <freebsd-arch@freebsd.org>
Subject:   Re: Default KMODDIR
Message-ID:  <5728F001.50402@gmx.de>
In-Reply-To: <2852715.sr6RVszBnq@ralph.baldwin.cx>
References:  <1702887.zov9WbhYWY@ralph.baldwin.cx> <5728E634.7010108@gmx.de> <2852715.sr6RVszBnq@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-05-03 20:16, John Baldwin wrote:
> On Tuesday, May 03, 2016 07:56:04 PM olli hauer wrote:
>> On 2016-05-03 19:36, John Baldwin wrote:
>>> I'd like to change KMODDIR's default from /boot/kernel to /boot/modules.
>>> Kernel builds already set KMODDIR explicitly in sys/conf/kern.pre.mk, so
>>> the only modules affected would be modules built standalone outside of a
>>> kernel build.  There are two cases to consider I think:
>>>
>>> 1) Someone has installed a custom kernel and finds they need module
>>>    'foo' that wasn't in their custom kernel.  They might do:
>>>
>>> # cd /sys/modules/foo
>>> # make all install
>>> # kldload foo
>>>
>>>    For myself, if I need this I find myself instead modifying my kernel
>>>    config to include the module in MODULES_OVERRIDE and then doing a
>>>    'make buildkernel && make reinstallkernel' as this will work after my
>>>    next source upgrade.
>>>
>>>    In this case, foo.ko would now end up in /boot/modules rather than
>>>    /boot/kernel.  Note that if a user just does 'make load' instead of
>>>    'make install' then nothing changes.
>>>
>>> 2) A module lives outside of the tree (or a vendor wishes to ship a
>>>    newer version as a standalone module).  All of these modules (including
>>>    all of the one in ports) currently have to override KMODDIR explicitly
>>>    in the module Makefile.
>>>
>>> It is the 2) case I would like to make more seamless by changing the
>>> default.  This does change the behavior for 1) if someone is doing 
>>> 'make install' rather than 'make load' from a module build directory.
>> ...
>>
>> Not totally sure about, but isn't /boot/modules used by third party drivers like original VMware and others?
>>
>> Will be there any impacts for this third party modules during kernel upgrades, like renaming modules to module.old?
> 
> No, kernel upgrades don't touch /boot/modules at all.  Right now third
> party drivers have to explicitly set KMODDIR.  This would mean they no
> longer have to do that as building a module "standalone" would now DTRT
> out of the box when installing.
> 

Thanks for clarification!

-- 
olli



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5728F001.50402>