Linux – Automatically load kernel module at boot. (Angstrom)

embedded-linuxkernel-module

i know how to load your module automatically in ubuntu. you put your module in /etc/modules

But, i compile a kernel and filesystem for an embedded system which i am working on it. but there is no "modules" file in /etc directory. (i am using angstrom by the way)

Is there anyway to load my module at boot?

thanks in advance,

Best Answer

Do you, perhaps, have a file /etc/rc.modules, or a directory with that name?
If not, you might try and find a file /etc/rc.local, and just add modprobe yourmodule at the end.

/etc/rc.local file contains custom user commands that are executed on boot.

Previous solution works for most distros but not for you. You have some minimal rescue-like linux distro. This is why I suggest just appending modprobe yourmodule to the end of the /etc/inittab.

NOTE: THIS METHOD SHOULD BE AVOIDED IF YOU HAVE A NORMAL LINUX DISTRIBUTION LIKE UBUNTU, MINT, FEDORA, ARCH...
IF YOU USE A NORMAL DISTRIBUTION, PLEASE USE YOUR DISTRIBUTION'S WAY OF ADDING CUSTOM MODULES.