rebuild Debian kernel to support systemtap
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 17 Feb 2010 14:13:55 +0000 (14:13 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 17 Feb 2010 14:13:55 +0000 (14:13 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@159 191e9f34-6774-4a6d-acfc-7664dacd4a2a

recepies/systemtap/0.kernel-source [new file with mode: 0644]
recepies/systemtap/1.kernel-build [new file with mode: 0644]

diff --git a/recepies/systemtap/0.kernel-source b/recepies/systemtap/0.kernel-source
new file mode 100644 (file)
index 0000000..c7fac84
--- /dev/null
@@ -0,0 +1 @@
+apt-get install linux-source-`uname -r | cut -d\- -f1` kernel-package fakeroot
diff --git a/recepies/systemtap/1.kernel-build b/recepies/systemtap/1.kernel-build
new file mode 100644 (file)
index 0000000..bc3f128
--- /dev/null
@@ -0,0 +1,10 @@
+r=`uname -r | cut -d\- -f1`
+cd /usr/src
+test -d linux-source-$r || tar xjf linux-source-$r.tar.bz2
+cd linux-source-$r
+cat /boot/config-`uname -r` | sed \
+       -e  's/^# CONFIG_DEBUG_INFO.*/CONFIG_DEBUG_INFO=y/' \
+       -e  's/^# CONFIG_KPROBES.*/CONFIG_KPROBES=y/' \
+       > .config
+make oldconfig
+fakeroot make-kpkg --initrd --append-to-version=-systemtap kernel_image kernel_headers kernel_debug