Re: NKE does kextload successfully, but does not load at startup time
Re: NKE does kextload successfully, but does not load at startup time
- Subject: Re: NKE does kextload successfully, but does not load at startup time
- From: Josh Graessley <email@hidden>
- Date: Mon, 14 Nov 2005 17:22:39 -0800
On Nov 14, 2005, at 4:52 PM, Michael Dautermann wrote:
I have two NKE's... one for 10.3 and one for 10.4, and both of
them load with no complaints when doing a "sudo kextload -t" on
their respective systems.
After copying them into "/System/Library/Extensions", the driver
doesn't get picked up and loaded at boot time.
/var/log/system.log shows no complaints at all (it'd be useful if
it did... should that be a feature request for Radar?)
The system does not automatically load network kernel extensions.
If there is a driver that matches hardware according to IOKits
matching rules, IOKit will load it automatically. Since this is a
network kernel extension and not an IOKit driver, it must be
loaded manually. If you need to load at startup, you can use a
startup script. If you need to be loaded only while some
application is running, the application can use kextload to load
the kext.
groovy. thanks for the response, Josh.
It doesn't make intuitive sense to me why only certain kexts in /
System/Library/Extensions would get loaded and others not, but I
don't make the rules. :-)
/System/Library/Extensions is not a home for all extensions to be
loaded. This directory is filled with all extensions and the system
will search here for a kernel extension when it needs to find one. As
I understand it, there are effectively two criteria that triggers the
loading of kexts from this folder.
In one case, a kext is loaded because another kext declared a
dependency. Your kext specifies a bundle identifier in it's
Info.plist file. A kext may specify other kexts that must be loaded
first by adding to the OSBundleLibraries dictionary in the
Info.plist. When the kext is loaded, all kexts with the bundle
identifiers specified will be loaded ahead of time. If any of the
kext your kext depends on are not already loaded, the /S/L/Extensions
directory will be searched for a kext with that bundle identifier. As
an example, the ethernet driver declares a dependency onthe
IONetworkingFamily kext by specifying the bundle identifier for the
IONetworkingFamily kext.
In the second case, hardware appears and IOKit needs to find the
driver. It looks for matching drivers according to IOKits matching
stuff. That's documented somewhere else and I'm vague on the details,
so I'll try not to spread disinformation by speculating.
Since there are no kexts that load on startup and specifically
declare a dependency on your kext, your kext is not loaded. In
addition, your kext does not match according to any of IOKits rules,
so IOKit doesn't trigger the loading of your kext.
Using "kextload" in a startup shell script would mean it's okay to
load the NKE from anywhere (outside of the extensions folder) on
disk I want, right?
Yes. You will need to make sure that the permissions are correct.
-josh
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden