This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: "Kernel Release isn't found"
- From: Serhei Makarov <me at serhei dot io>
- To: systemtap at sourceware dot org
- Date: Wed, 20 Jun 2018 13:40:18 -0400
- Subject: Re: "Kernel Release isn't found"
- References: <1529511384375.13616@comcast.com>
> I used the makefile to generate a `.config` file (with `make
> olddefconfig`) and copied that to `config-4.9.70-x86_64` in case it's
> looking for that, but it didn't help. Other than that, the build tree is
> pristine; exactly as archived on kernel.org.
>
> What am I missing? Is systemtap not meant to operate on raw kernel trees
> (e.g. only on some modified centOS/RHEL kernel source tree)?
It should work just fine on an upstream kernel, and you should not need to rename the `.config` file. However, you do need to compile your kernel (i.e. you need a *build* tree, not just a source tree) to generate the index files (such as Module.symvers) and debug information that SystemTap uses.
e.g. if I do
$ make olddefconfig
$ stap -r /path/to/my/kernel -p4 -e 'probe syscall.read { println("Hello.") exit() }'
I get the same error as you.
but if I do
$ make # compiles entire kernel
$ stap -r /path/to/my/kernel -p4 -e 'probe syscall.read { println("Hello.") exit() }'
Then SystemTap produces a kernel module.
All the best,
Serhei