Re: DKMS not Issuing Modprobe After Driver Compile at Boot Time

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

 



On 02/13/2017 04:38 PM, Rick Stevens wrote:
> On 02/13/2017 03:39 PM, Rick Stevens wrote:
>> On 02/13/2017 12:22 PM, Stephen Morris wrote:
>>> On 13/02/2017 19:21, Stephen Morris wrote:
>>> I've removed the driver from DKMS in Ubuntu and re-added it, then run a
>>> DKMS AUTOINSTALL to rebuild and re-install the driver back into the
>>> running kernel and under Ubuntu the modprobe command to active the
>>> driver is not issued either, but also under Ubuntu is seems that when
>>> the rmmod command is issued to remove the driver from the running kernel
>>> which removes wifi access, the dns resolver service seems to also be
>>> shutdown, because after the driver is rebuilt by DKMS and the modprobe
>>> issued a sudo apt-get update fails to be able to resolve the repository
>>> names.
>>> I've tried the same thing under Fedora to see if Fedora has the same
>>> functionality, which fortunately Fedora doesn't, after the DKMS process
>>> is done and the modprobe issued a sudo dnf update successfully refreshes
>>> the repository lists and installs any available updates after prompting
>>> whether or not to do so.
>>
>> I've been watching this thread a bit and I'm not a DKMS user, but
>> from what I can gather, DKMS should do an automatic modprobe when
>> a kernel is upgraded or whatever based on certain criteria. Section 2
>> of the webpage at:
>>
>> 	https://wiki.centos.org/HowTos/BuildingKernelModules
>>
>> describes the process (the example is a patched CIFS filesystem). In a
>> nutshell:
>>
>> 	1. The module's source directory must be in
>>
>> 		/usr/src/<module>-<version>
>>
>> 	2. There is a "dkms.conf" file in that directory that contains
>> 	some specific info.
>>
>> 	3. It has been added to the DKMS tree via "dkms add"
>>
>> 	4. It has been built under DKMS control via "dkms build"
>>
>> 	5. It has been installed under DKMS control via "dkms install"
>>
>> Note that I've never tried a DKMS add-on module, but that seems to be
>> the way it's done. I think that dkms.conf file is pretty critical,
>> along with the "dkms add", "dkms build" and "dkms install". I don't
>> believe "dkms autoinstall" would modprobe modules that weren't added,
>> built and install using dkms as they weren't fully inserted under dkms'
>> care. That's just a guess.
> 
> I just built a module (evdi) under DKMS for a Mimo USB-based display. I
> don't have the hardware handy (it's here somewhere), but I copied the
> driver source to /usr/src/evdi-1.2.65 and created a dkms.conf file in
> there that contains:
> 
> 	PACKAGE_NAME="evdi"
> 	PACKAGE_VERSION=1.0.0
> 	AUTOINSTALL=yes
> 
> 	MAKE[0]="make all INCLUDEDIR=/lib/modules/$kernelver/build/include
> KVERSION=$kernelver DKMS_BUILD=1"
> 	DEST_MODULE_LOCATION[0]="/kernel/drivers/gpu/drm/evdi"
> 	BUILT_MODULE_NAME[0]="evdi"
> 	CLEAN="make clean DKMS_BUILD=1"
> 
> Then I did (as root):
> 
> 	dkms add -m evdi -v 1.2.65
> 
> That added it to dkms' build stack as witnessed by dkms creating a
> /var/lib/dkms/evdi/1.2.65 directory with a subdirectory named after the
> current kernel version and a symlink, "source", pointing at
> /usr/src/evdi-1.2.65. The next command:
> 
> 	dkms build -m evdi -v 1.2.65
> 
> actually built the driver, creating an "x86_64" subdirectory below the
> kernel version directory with "log" and "module" subdirs below that.
> The log subdirectory contains the build log of the module and the
> module subdir contains the actual module (evdi.ko). I then ran:
> 
> 	dkms install -m evdi -v 1.2.65
> 
> and saw dkms install the module into /lib/modules/`uname -r`/extra/ and
> do a full depmod:
> 
> 	# dkms install -m evdi -v 1.2.65
> 
> 	evdi:
> 	Running module version sanity check.
> 	 - Original module
> 	   - No original module exists within this kernel
> 	 - Installation
> 	   - Installing to /lib/modules/4.9.7-201.fc25.x86_64/extra/
> 	Adding any weak-modules
> 
> 	depmod.......
> 
> 	DKMS: install completed.
> 
> Doing a "modinfo evdi" returns the data I'd expect.
> 
> I won't know if it auto-modprobes until I get the new kernel update
> and find the Mimo display and plug it in. Just thought you'd like to
> see what I've done.

UPDATE: Just got the new kernel and dkms did build the module for the
kernel without me telling it to.

I located the display device, plugged it in and it "just worked." I
did NOT see the module in the output of "lsmod" but the device did
work. I don't know why it doesn't show up in lsmod, but it may be that
this is an X/Wayland module only, even though it's a ".ko" file.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-     The trouble with troubleshooting is that trouble sometimes     -
-                             shoots back.                           -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux