This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] README: add help for users building their own kernels


Add help for users who build kernels from kernel.org.

 README |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletion(-)

--- systemtap-20060610.orig/README
+++ systemtap-20060610/README
@@ -25,7 +25,8 @@ Installation steps:
 
 Build steps:
 
-- Install the kernel-debuginfo, kernel-[smp-]devel, gcc packages.
+- Install the kernel-debuginfo, kernel-[smp-]devel, gcc packages
+  (or see below if you are building your own kernels from source.)
 - Download the latest elfutils snapshot
   ftp://sources.redhat.com/pub/systemtap/elfutils/elfutils-NNNN.tar.gz
   ftp://sources.redhat.com/pub/systemtap/elfutils/elfutils-portability.patch
@@ -48,3 +49,29 @@ Tips :
   /boot/vmlinux-`uname -r`
   /usr/lib/debug/lib/modules/`uname -r`/vmlinux
   /lib/modules/`uname -r`/vmlinux
+
+- If you are using generic kernel.org kernels built from source,
+  you do not need kernel-debuginfo or kernel-[smp-]devel.
+  Instead, you can do this:
+
+  - Build the kernel using your normal procedures. You need to enable
+    CONFIG_DEBUG_INFO and CONFIG_RELAY.
+  - Boot into the kernel you plan to use.
+  - Make sure the file 'vmlinux' from your build can be found by
+    systemtap (see above.)  You can just symlink it to one of the above
+    locations.
+  - symlink your source directory to these two places:
+    - /usr/src/kernels/`uname -r`
+    - /lib/modules/`uname -r`/source
+  - symlink your build directory to here:
+    - /lib/modules/`uname -r`/build
+  - For example, if your kernel source is in /home/me/linux/2.6.17-rc6
+    and you build your kernel in the source directory, you would do
+    this (be sure you are running the right kernel or `uname -r`
+    will be wrong:)
+       ln -s /home/me/linux/2.6.17-rc6/vmlinux /boot/vmlinux-`uname -r`
+       mkdir /usr/src/kernels  (if needed)
+       ln -s /home/me/linux/2.6.17-rc6 /usr/src/kernels/`uname -r`
+       mkdir /lib/modules/`uname -r`  (if needed)
+       ln -s /home/me/linux/2.6.17-rc6 /lib/modules/`uname -r`/build
+       ln -s /home/me/linux/2.6.17-rc6 /lib/modules/`uname -r`/source
-- 
Chuck


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]