From owner-freebsd-arch@freebsd.org Tue May 3 18:19:51 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0C0DB2A61F for ; Tue, 3 May 2016 18:19:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C32AB1E56 for ; Tue, 3 May 2016 18:19:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D8FFFB93B; Tue, 3 May 2016 14:19:50 -0400 (EDT) From: John Baldwin To: olli hauer Cc: 'freebsd-arch' Subject: Re: Default KMODDIR Date: Tue, 03 May 2016 11:16:48 -0700 Message-ID: <2852715.sr6RVszBnq@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <5728E634.7010108@gmx.de> References: <1702887.zov9WbhYWY@ralph.baldwin.cx> <5728E634.7010108@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 03 May 2016 14:19:50 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2016 18:19:52 -0000 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. -- John Baldwin