Sort modules according to modules.order

Patch from SuSE by Tejun Heo <>

Kbuild now generates and installs modules.order along with modules.
This patch updates depmod such that it sorts module list according to
the file before generating output files.  Modules which aren't on
modules.order are put after modules which are ordered by

This makes modprobe to prioritize modules according to kernel
Makefile's just as built-in modules are link-ordered by them.

Signed-off-by: Scott James Remnant <>
1 file changed