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
5 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
hi. great article!
Hello,
Thank you! I would now go on this blog every day!
Have a nice day
Thanks for post. Nice to see such good ideas.
I don’t get it, what do you mean by the 3rd paragraph?
Ya put a smile in my face.