Reordering of driver initialization

Jump to: navigation, search


Some products need to have some type of storage available as soon as possible after kernel initialization. Think of SD card type removable media that could contain possible upgrades or other versions of a software product. In order to mount these media right away, they should be probed and recognized by the time your favorite startup script (or 'init') is started. Sometimes bus/media probing can take a long time, especially if you have slow buses, or when one bus can support several types of media. In the latter case, an SD card attached to a bus (host) that can support SD 2.0, SD 1.0 and MMC protocols, they have to be probed from super to lesser interface specification (SD cards understand basic MMC protocol as well). Worst case, the media is probed and detected after your favorite startup scrupt (or 'init') has finished its work already!

How to implement or use

By simply identifying which driver(s) is (are) associated with the medium, move them upward in the driver makefile(s) to put them more in front of the to-be-initialized kernel modules list.

Expected Improvement

Media are probed and disks are added before kernel initialization finishes, no 'hotplugging' interface necessary. Startup scripts (or 'init') can decide what to do before it is 'too late'.









Case Studies