On your target, do you have "/lib/modules/2.6.36/kernel/arch/arm/oprofile/oprofile.ko"? If so but modprobe can't find it then it sounds like some mismatch with modules.dep. I'm not sure how to help there except to maybe rebuild your kernel from scratch.

If you don't have that .ko file then you need to build it.

So in addition to CONFIG_HAVE_OPROFILE=y that you already have, you also need CONFIG_OPROFILE=m

Then in the top-level of the kernel tree and with:

# KARGS="ARCH=arm CROSS_COMPILE=<your tool chain>"
# KINSTDIR="<your build-time path to your staged root target file system>"

do something like:

# make $KARGS modules || abort "In-tree module build failed."
# make $KARGS INSTALL_MOD_PATH=$KINSTDIR modules_install || abort "In-tree module install failed."

That should provide the needed oprofile.ko in the place where modprobe (used by opcontrol) expects it.

(One note: we do build our own kernel zImage and we do it before the make steps above. That may be required. I'm not sure. If module building fails you might need to build your zImage first.)

Good luck!

On Feb 23, 2012, at 8:43 AM, <> wrote:

We are having a target device that runs WR Linux with kernel 2.6.36 on ARMv7 based processor.
We have cross-compiled OProfile with following options,
./configure --host=arm-linux CC=<our tool chain>gcc CXX=... ...etc...
When running ./configure we observed the statement something like "Checking kernel support for OProfile ... yes"
The product of this build are:           opannotate
oparchive                   opcontrol         opgprof          ophelp                       opjitconv
opreport                    oprofiled
On target board:
# cat /proc/modules
CDBlkDrv 40434 5 - Live 0x7f035000
sd8xxx 37798 1 - Live 0x7f025000
mlan 65945 1 sd8xxx, Live 0x7f00e000 (P)
mrvlsdio 4334 1 sd8xxx, Live 0x7f000000
When we run "opcontrol --init" on the target board, we get the following error:
# opcontrol --init
modprobe: module oprofile not found in modules.dep
modprobe: module oprofile not found in modules.dep
Kernel doesn't support oprofile
How do we make this "opcontrol" run successfully on the target board? The kernel is already built with CONFIG_HAVE_OPROFILE=y option. This we confirmed by seeing the option in the file /proc/config.gz on the target board. Do we still need to build oprofile.ko
If yes, how do we do.
If not, then how do we get away with this problem.
Any help in this regard is appreciated.
Thanks and Regards,
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
oprofile-list mailing list