I'm looking at a rather old Linux (v2.4) that has custom device drivers built into the kernel. Now I wonder since when that was done. I suppose it most be an old technique, was this the way device drivers were added to Linux already in version 1?
Kernel modules have been available since version 1.1.85 in January 1995 (see the introduction of
README.modules in the 1.1.85 patch). At first, few drivers were actually available as modules, but within a few years everything that made sense as a module was available as a module.
When developing a new driver for the kernel, it’s easier to work on it as a module than a built-in driver: instead of rebooting when you make changes to the driver, you can unload the old module and load the new one in its place. In most cases though drivers are made available in both forms (built-in and in a module) before release, assuming they’re part of the main kernel source code. Drivers which are provided outside the main kernel source code can really only be made available as modules, unless the kernel itself is forked (which does happen).
Before common use of initrd on hard disks, you compiled all drivers needed at boot time into the kernel. Initrd is quite old now, but use of it on hard disks is reasonably new.