Date: Wed, 19 Nov 2014 04:46:08 +0400 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: d@delphij.net, "weh@microsoft.com >> Wei Hu" <weh@microsoft.com>, kyliel@microsoft.com, huishao@microsoft.com, "Jun Fang (Wicresoft)" <v-jufang@microsoft.com>, "freebsd-arch@FreeBSD.org Arch" <freebsd-arch@freebsd.org>, re <re@freebsd.org> Subject: Re: kernel linker: Overriding a driver shipped with kernel via module? Message-ID: <20141119004608.GQ9763@zxy.spb.ru> In-Reply-To: <20141119003632.GN24601@funkthat.com> References: <546A8191.3090208@delphij.net> <20141118124544.GA95731@zxy.spb.ru> <20141119001510.GM24601@funkthat.com> <20141119002718.GP9763@zxy.spb.ru> <20141119003632.GN24601@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 18, 2014 at 04:36:32PM -0800, John-Mark Gurney wrote: > Slawa Olhovchenkov wrote this message on Wed, Nov 19, 2014 at 04:27 +0400: > > On Tue, Nov 18, 2014 at 04:15:10PM -0800, John-Mark Gurney wrote: > > > > > Slawa Olhovchenkov wrote this message on Tue, Nov 18, 2014 at 16:45 +0400: > > > > On Mon, Nov 17, 2014 at 03:15:29PM -0800, Xin Li wrote: > > > > > > > > > Right now one can declare version for a module by doing something like: > > > > > > > > > > MODULE_VERSION(module_name, module_version); > > > > > > > > > > Sometimes, it may be desirable for a vendor to release a new driver > > > > > that overrides the driver shipped with the kernel itself. However, it > > > > > seems that the MODULE_VERSION facility would just refuse the module > > > > > when preloaded with kernel. > > > > > > > > > > Looking at some other vendor drivers, they are using a slightly > > > > > different module name to overcome this limitation. Is that the only > > > > > way to do it? > > > > > > > > I think now time to move to modulated kernel and load all drivers > > > > currently present in GENERIC as modules (via loader.conf). > > > > > > This becomes slightly more difficult for storage drivers which must > > > be loaded at boot time so the you can mount root from it... But yes, > > > we are interested in methods to make it easier/more automatic for > > > modules to be loaded to support the hardware that is present in a > > > system... > > > > When loader can load kernel -- loader can load driver module, this is > > not Linux (but yes, loader need plugable and stackable framework for > > access FS -- currenly booting from ZFS over gstripe not allowed). > > That isn't the only issue.. another issue is identifing the correct > kernel module(s) to load at boot... iirc, you cannot unload a kernel At first time load all drivers, currenly present in GENERIC kernel. > module loaded at boot time... This is module depended. Some modules can't be unloaded (independently of load time).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141119004608.GQ9763>