This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What is /lib/modules in target file system

DM6467 evm derived system, file system (nfs) from Ubuntu.  I changed EXTRAVERSION of kernel so now it has a name like "2.6.32-XYZ-20120221-122026" rather than the original "2.6.32-rc2-davinci1".  When I boot now, I get this message on the console while the kernel is running:

WARNING: Couldn't open directory /lib/modules/2.6.32-XYZ-20120221-122026: No such file or directory
FATAL: Could not open /lib/modules/2.6.32-XYX-20120221-122026/modules.dep.temp for writing: No such file or directory
modprobe: FATAL: Could not load /lib/modules/2.6.32-XYZ-20120221-122026/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.32-XYZ-20120221-122026/modules.dep: No such file or directory

When I look in /lib/modules, I find a folder named "2.6.32-rc2-davinci1" with a bunch of stuff under it.
IN SPITE OF THE WARNING AND FATAL, the target seems to run OK.  Also, I can copy folder "2.6.32-rc2-davinci1" to my name ("2.6.32-XYZ-20120221-122026") 
and the WARNING/FATAL goes away.
Do I need this folder?  I don't seem to need it.  What's it for?  ??
Thanks!
  • Helmut,

    I assume that you are building the kernel with a command such as:

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- uImage

    This is fine for building just the kernel.  If there are any loadables modules needed by the system they also have to be built and installed with the following commands.  The install command will create and populate the /lib/module directory for you.

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- modules

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- INSTALL_MOD_PATH=<path to root of file system> modules_install

    The existing directories that you see under /lib/modules are from an old build.  The sub-directories with the correct name should be built with the commands above.