tech-kern archive

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

Re: Kernel modules

Hiya Andrew, hi folks,

On Thu, Jan 17, 2008 at 11:07:16AM +0000, Andrew Doran wrote:
> - Device drivers are difficult because autoconf isn't really a good fit
>   for loadables. As of right now the "built into the kernel" and "loadable"
>   cases would probably have to be different for everything but pseudo
>   devices. So what do we do here?

AFAIR Linux/FreeBSD's modules are kernel compilation dependent; i.e. if you 
recompile the kernel you recompile the modules. If the config file could 
identify things like

        auixp* at pci? dev ? function ?

hardwires the module into the kernel like default

        auixp* at pci? dev ? function ? module

explicitly creates a module containing the files needed for that config 
line but leaves it to a bootloader/userland program to issue the modload.

        auixp* at pci? dev ? function ? module bootprobe

then the config attach function could create a module containing the files 
needed for that config line and create an autoconf veneer that loads the 
module, tries its attach and if fails unloads the module; if it matches the 
module stays and gets refcounted.

        umodem* at uhub? port ? configuration ? module insertprobe

could be used for say USB insert stuff; code is generated on USB device 
detection that could probe the module like above....

Well these are just things i just thought of; 

With regards,

Attachment: pgpV8X1ZwkBFu.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index