In my kenel boot up logs:
------------------------------------------------
INIT: version 2.86 bootingPlease wait: booting...Starting udevudev: starting version 141Remounting root file system...Caching udev devnodesPopulating dev cachemv: cannot rename '/tmp/devices': No such file or directoryALSA: Restoring mixer settings...NOT configuring network interfaces: / is an NFS mounthwclock: can't open '/dev/misc/rtc': No such file or directoryFri Mar 25 00:10:00 UTC 2011hwclock: can't open '/dev/misc/rtc': No such file or directoryINIT: Entering runlevel: 5Starting system message bus: dbus.Starting telnet daemon.Starting syslogd/klogd: doneStarting thttpd.FATAL: Module cmemk not found.FATAL: Module irqk not found.FATAL: Module edmak not found.FATAL: Module dm365mmap not found.BusyBox v1.13.2 (2011-03-24 18:58:44 CDT) multi-call binary
Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Create a special file (block, character, or pipe)
Options: -m Create the special file using the specified mode (default a=rw)TYPEs include: b: Make a block device c or u: Make a character device p: Make a named pipe (MAJOR and MINOR are ignored)
I can see those modules located in "/lib/modules/2.6.32.17-davinci1-g77319a0-dirty/kernel/drivers/dsp/"
-----------------------------------------------------
root@dm368-evm:~# ls -l /lib/modules/2.6.32.17-davinci1-g77319a0-dirty/kernel/drivers/dsp/-rwxr-xr-x 1 root root 26334 Apr 26 2012 cmemk.ko-rwxr-xr-x 1 root root 6560 Apr 26 2012 dm365mmap.ko-rwxr-xr-x 1 root root 9657 Apr 26 2012 edmak.ko-rwxr-xr-x 1 root root 9483 Apr 26 2012 irqk.ko
------------------------------------------------------
If i check details of "/lib/modules/2.6.32.17-davinci1-g77319a0-dirty", they are like below
root@dm368-evm:~# ls -l /lib/modules/2.6.32.17-davinci1-g77319a0-dirtylrwxrwxrwx 1 root root 78 Apr 23 2012 build -> /home/davinci/ti-dvsdk_dm368-evm_4_02_00_06/psp/linux-2.6.32.17-psp03.01.01.39drwxr-xr-x 6 root root 4096 Apr 23 2012 kernel-rw-r--r-- 1 root root 45 Apr 26 2012 modules.alias-rw-r--r-- 1 root root 3359 Apr 23 2012 modules.alias.bin-rw-r--r-- 1 root root 69 Apr 26 2012 modules.ccwmap-rw-r--r-- 1 root root 0 Apr 26 2012 modules.dep-rw-r--r-- 1 root root 4341 Apr 23 2012 modules.dep.bin-rw-r--r-- 1 root root 73 Apr 26 2012 modules.ieee1394map-rw-r--r-- 1 root root 141 Apr 26 2012 modules.inputmap-rw-r--r-- 1 root root 81 Apr 26 2012 modules.isapnpmap-rw-r--r-- 1 root root 74 Apr 26 2012 modules.ofmap-rw-r--r-- 1 root root 1702 Apr 23 2012 modules.order-rw-r--r-- 1 root root 99 Apr 26 2012 modules.pcimap-rw-r--r-- 1 root root 43 Apr 26 2012 modules.seriomap-rw-r--r-- 1 root root 49 Apr 26 2012 modules.symbols-rw-r--r-- 1 root root 5349 Apr 23 2012 modules.symbols.bin-rw-r--r-- 1 root root 189 Apr 26 2012 modules.usbmaplrwxrwxrwx 1 root root 78 Apr 23 2012 source -> /home/davinci/ti-dvsdk_dm368-evm_4_02_00_06/psp/linux-2.6.32.17-psp03.01.01.39root@dm368-evm:~#
-------------------------------------------------
If i try to find the module location, the result like below:
root@dm368-evm:~# depmod /lib/modules/`uname -r`/modules.depWARNING: Module /lib/modules/2.6.32.17-davinci1-g77319a0-dirty/modules.dep is not an elf objectroot@dm368-evm:~#
content of "/etc/init.d/modutils.sh" is like below:
root@dm368-evm:~# cat /etc/init.d/modutils.sh#!/bin/sh
LOAD_MODULE=modprobe[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
if [ -e /sbin/depmod -a ! -f /lib/modules/`uname -r`/modules.dep ]; then [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..." depmod -Aefi
if [ -f /proc/modules ]; then if [ -f /etc/modules ]; then [ "$VERBOSE" != no ] && echo -n "Loading modules: " while read module args do case "$module" in \#*|"") continue ;; esac [ "$VERBOSE" != no ] && echo -n "$module " eval "$LOAD_MODULE $module $args >/dev/null 2>&1" done < /etc/modules [ "$VERBOSE" != no ] && echo fifi
: exit 0
--------------------------------------------------
Could you help on this ?
BTW: nothing printed after "modprobe -l"
Regards,
James
Not sure if the "depmod filename" is what you intended. Maybe try "depmod -a" to rebuild the modules.dep file.
I search the command for "depmod", it seems kernel Makefile is to run the command:
[linux-devkit]:~/ti-dvsdk_dm368-evm_4_02_00_06/psp/linux-2.6.32.17-psp03.01.01.39> vim Makefile
------------------------------------------
# Run depmod only if we have System.map and depmod is executablequiet_cmd_depmod = DEPMOD $(KERNELRELEASE) cmd_depmod = \ if [ -r System.map -a -x $(DEPMOD) ]; then \ $(DEPMOD) -ae -F System.map \ $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) ) \ $(KERNELRELEASE); \ fi
-----------------------------------------
Is that to say, kernel Makefile does not work well to depmod/install modules ?
You can see the size of module.des is zero.
-----------------------------------------------
davinci@ubuntu:~/targetfs/lib/modules/2.6.32.17-davinci1-g77319a0-dirty$ ls -l modules.dep-rw-r--r-- 1 root root 0 2012-04-26 23:09 modules.dep
Could some one can help on this ?
I don't think a cross-platform depmod exists on the host. Not with TI's toolchain. You have to "depmod -a" on the target.
Hi Wong,
It works as you told.
After i run command "depmod -a" in the target, new modules.dep of "/lib/modules/2.6.32.17-davinci1-g77319a0-dirty/modules.dep" is created, and it works with "modprobe "
But i still could not understand why TI DVSDK build environment could not create target's "/lib/modules/2.6.32.17-davinci1-g77319a0-dirty/modules.dep" ?
In theory, it built out any resource which "depmod -a" requested in its DVSDK build environment for the target.
I am not expert in the module.dep file format. I agree that it should be be platform independent but it appears not. As such, a cross-platform version of depmod is required. Similiar to the need for a cross-compiler. Google about for "cross depmod" and there are some hits that would suggest there is one for a non-TI platform. Somebody did think about it. The lack of a cross-depmod in the toolchain is a real hindrance to building a complete target filesystem on the host. You have to have a working target to finish the filesystem and then save the filesytem for production.