- 论坛徽章:
- 0
|
Building and performance testing 2.6-rc the latest release candidate kernel on Ubuntu Feisty
It started when
Henry
passed me a
good guide.
about testing and performance
I did the following:
ian@lawrence:~/Dev/Indt/Kernel/$ sudo apt-get install bootchart ketchup
Bootchart
is a tool for performance analysis and
visualization of the GNU/Linux boot process.
Ketchup
is a little command-line tool to manage
your Linux kernel sources.
If you're one of the weirdos, who is still
compiling his kernel manually for whatever
reason (like I do), I can only recommend it.
Ketchup nicely eases up the entire process of
checking for updates and applying them to
your system.
Configure and Compileian@lawrence:~/Dev/Indt/Kernel/$ mkdir tree; cd treeian@lawrence:~/Dev/Indt/Kernel/tree$ ketchup 2.6-rc
This downloads the latest "release candidate"
kernel.
You can check if you really have the latest
stable tree by:
$ ketchup -m
2.6.22.3
It's a good idea to use the configuration of
your current working kernel as a basis for
your new kernel. Therefore we copy the
existing configuration to the top of the tree:
ian@lawrence:~/Dev/Indt/Kernel/tree$ sudo cp /boot/config-`uname -r` ./.config
Then we run
ian@lawrence:~/Dev/Indt/Kernel/tree$ make menuconfig
For all possible options on this menu look at:
http://www.tlug.org.za/old/guides/lkcg/lkcg_config.html
When building the kernel to test it, you should
seriously consider setting the options located in
the ”Kernel hacking” menu. At least, you should
set:
Kernel debugging
Compile the kernel with debug info
The other options should also be set, if
possible, because they help debug specific
function- alities of the kernel, but some of
them hurt performance, so you may want to
leave them unset:
Debug shared IRQ handlers
Detect Soft Lockups
Debug slab memory allocations
Slab memory leak debugging
RT Mutex debugging, deadlock detection
Built-in scriptable tester for rt-mutexes
Lock debugging: prove locking correctness
Lock dependency engine debugging
Locking API boot-time self-tests
Highmem debugging
Debug VM
Build The KernelTo build the kernel, execute these two commands:
ian@lawrence:~/Dev/Indt/Kernel/tree$ sudo make-kpkg clean
and as root:
root@lawrence:/home/ian/Dev/Indt/Kernel/tree# fakeroot make-kpkg --initrd --append-to-version=-ian kernel_image
After --append-to-version= you can write any
string that helps you identify the kernel, but it
must begin with a minus (-) and must not
contain whitespace.
Now be patient, the kernel compilation can
take some hours, depending on your kernel
configuration and your processor speed.
InstallAfter the successful kernel build, you can install
by
root@lawrence:/home/ian/Dev/Indt/Kernel# dpkg -i linux-image-2.6.22.3-ian_2.6.22.3-ian-10.00.Custom_i386.deb
reboot
This automagically puts an entry in your /boot/grub/menu.lst
and the bootchart app we installed at the start
makes a nice visualization of the boot performance
in /var/log/bootchart when we reboot
![]()
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/97597/showart_1946743.html |
|