Skip to content


[Day 2] Compiling Kernel Source Code for VTune

Continued,

Step 1 Build Kernel Development Environment

uname -r

2.6.24-23-generic

uname -m

i686

apt-get install build-essential
apt-get install linux-headers-`uname -r`

vi Makefile # set EXTRAVERSION to a value corresponding to `uname -r`
make mrproper
cp /boot/config-`uname -r` .config
make oldconfig
make prepare
make scripts

In “make prepare “, I met a problem which says  “no rule for target arch/x86/kernel/asm-offsets.c”. The problem

is possibly due to the path. “asm-offsets.c” is located in /usr/src/linux but not /usr/src/linux-`uname -r` .

after using module-assistant, this problem is solved.

Step 2 Building Driver

Add group “vtune”

# build the driver:
cd /path/to/vdk/sources/
./build-driver

# load the driver into the kernel:
cd /path/to/vdk/sources/
./insmod-vtune

Step 3 Kernel for Debug

For Redhat and SuSe, RPMs are downloadable.

For other distributions, we have to build it manually.

sudo vi Makefile # add “-g” to CFLAGS

Posted in Multi-threaded L7-Filter. Tagged with , .

5 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. hi. great article!

  2. Hello,
    Thank you! I would now go on this blog every day!
    Have a nice day

  3. Thanks for post. Nice to see such good ideas.

  4. I don’t get it, what do you mean by the 3rd paragraph?

  5. Ya put a smile in my face.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.