Differences between current version and revision by previous author of KernelDevelopment.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 19 | Last edited on Wednesday, June 13, 2007 9:18:45 am | by IanMcDonald | |
Older page: | version 12 | Last edited on Wednesday, October 19, 2005 7:30:21 pm | by AristotlePagaltzis | Revert |
@@ -2,31 +2,56 @@
* [Ostra]
* [Sparse]
* [Git]; see See KernelDevelopmentWithGit
+* [OProfile]
!! Resources
* KernelDevelopmentDebugging
* [Linux kernel source cross reference | http://lxr.linux.no/]
* [Hacking the Linux 2.6 kernel, Part 1: Getting ready | http://www-128.ibm.com/developerworks/linux/edu/l-dw-linux-kernelhack1-i.html]
* [Hacking the Linux 2.6 kernel, Part 2: Making your first hack | http://www-128.ibm.com/developerworks/linux/edu/l-dw-linux-kernelhack2-i.html]
+* [Linux Kernel in a Nutshell | http://www.kroah.com/lkn/]
!! Some notes
-Using
[DistCC] for KernelDevelopment can be problematic
.
+You can use
[DistCC] or [ccache | http://ccache.samba.org/] (or both) to speed up compilation
.
-A script to copy a new [Kernel
] to remote machines:''''
+The main trick is to only make ONE target on the command line. i.e. don't try and do this <tt>make -j6 CC=distcc all modules_install</tt> or else the build will get screwed up and the whole thing will get remade each time.
+
+Instead do this:
+<verbatim>
+make -j6 CC=distcc all
+make modules_install INSTALL_MOD_PATH=~/tmp
+</verbatim>
+
+To update the .config file with questions for new options do a <tt>make oldconfig</tt>
+
+To output build files to another directory (so you don't mix source and object code) do <tt>make O=outputdir all</tt>
+
+To make files in just one source code directory do <tt>make dir</tt>. To make the modules in a directory and link them do <tt>make M=dir</tt>. Remember to put a trailing slash after the directory name.
+
+NB The above two may require you to have built your config etc first.
+
+To enable extra error checks when compiling do <tt>make EXTRA_CFLAGS=-W</tt>.
+
+
A script to copy a new [LinuxKernel
] to remote machines:''''
<verbatim>
- #!/bin/bash
- SRC=$HOME
/linuxsrc/dccpwork
- VER=2.6.14-rc4
- rm $HOME
/tmp/lib/modules/$VER/build
- rm $HOME
/tmp/lib/modules/$VER/source
- scp
$SRC/System.map root@$1:/boot/System.map-$VER
- scp
$SRC/arch/i386/boot/bzImage root@$1:/boot/vmlinuz-$VER
- scp
-r
$HOME
/tmp/lib root@$1:/
+ #! /bin/bash
+ # syntax m machine_num directory version
+ H=/home/ian
+ SRC=$H
/linuxsrc/$2
+ VER=$3
+ rm $H
/tmp/lib/modules/$VER/build
+ rm $H
/tmp/lib/modules/$VER/source
+ rsync
$SRC/System.map root@jandi
$1:/boot/System.map-$VER
+ rsync
$SRC/arch/i386/boot/bzImage root@jandi
$1:/boot/vmlinuz-$VER
+ rsync $SRC/vmlinux root@jandi$1:/boot/vmlinux
-$VER
+ rsync -av $H
/tmp/lib/modules/$VER
root@jandi
$1:/lib/modules
</verbatim>
+
+It has also been suggested to use kgdb with qemu and/or kgdboe to help with debugging.
----
CategoryKernel