Linux kernel vs loadable device driver s
by xnet from LinuxQuestions.org on (#52YQR)
Hi
I'm starting a study of Linux internals and I have a couple of queries about device drivers:
1. My understanding is that the Linux kernel is compiled with a bunch of static device drivers and that during the boot process, other device drivers can also be loaded using modprobe. My question is what determines whether a driver for any particular piece of hardware (e.g. Acme-Soundcard-123) is included in the kernel vs just being made available as a module for dynamic loading. Wouldn't the kernel be able to be a lot smaller if only the drivers needed for bootup and other generic drivers (e.g. SCSI, keyboard, USB, video) were compiled in and everything else was enumerated during bootup and installed as loadable drivers ?
2. I'm puzzled how the OS is passed the information about what hardware exists in the system. if there is (say) a motherboard-based sound chip how is the kernel able to identify it as a device that it has a driver for and either use the static driver it already has or load up a loadable module.
I'd be very grateful for any pointers on this.


I'm starting a study of Linux internals and I have a couple of queries about device drivers:
1. My understanding is that the Linux kernel is compiled with a bunch of static device drivers and that during the boot process, other device drivers can also be loaded using modprobe. My question is what determines whether a driver for any particular piece of hardware (e.g. Acme-Soundcard-123) is included in the kernel vs just being made available as a module for dynamic loading. Wouldn't the kernel be able to be a lot smaller if only the drivers needed for bootup and other generic drivers (e.g. SCSI, keyboard, USB, video) were compiled in and everything else was enumerated during bootup and installed as loadable drivers ?
2. I'm puzzled how the OS is passed the information about what hardware exists in the system. if there is (say) a motherboard-based sound chip how is the kernel able to identify it as a device that it has a driver for and either use the static driver it already has or load up a loadable module.
I'd be very grateful for any pointers on this.