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: Dean Reece <email@hidden>
- Date: Mon, 14 Nov 2005 20:49:37 -0800
On Nov 14, 2005, at 5:22 PM, Josh Graessley wrote:
/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.
Excellent summary. One refinement, though: The OSBundleLibraries
property is intended to list kexts that you need to link against (as
in a static library). It isn't intended to provide load order
control, though it does enforce load order as a necessary side effect.
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.
Correct. Though, System Profiler generally won't find kexts that are
outside of /S/L/E (if that is important to you).
Cheers,
- Dean
_______________________________________________
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