public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* "Kernel Release isn't found"
@ 2018-06-20 16:16 Fieck, Brennan
  2018-06-20 17:40 ` Serhei Makarov
  0 siblings, 1 reply; 2+ messages in thread
From: Fieck, Brennan @ 2018-06-20 16:16 UTC (permalink / raw)
  To: systemtap

Hey, it's me again.


I'm having trouble using `stap -r /path/to/my/build/tree`. When I run that command (pointing it to a 4.9.70 kernel that I downloaded from kernel.org under `~/src/kernel/linux-4.9.70`) stap is printing:

"ERROR: kernel release isn't found in "/home/bwilli415/src/kernel/src/linux-4.9.70"


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)?


Thanks

Brennan Fieck

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: "Kernel Release isn't found"
  2018-06-20 16:16 "Kernel Release isn't found" Fieck, Brennan
@ 2018-06-20 17:40 ` Serhei Makarov
  0 siblings, 0 replies; 2+ messages in thread
From: Serhei Makarov @ 2018-06-20 17:40 UTC (permalink / raw)
  To: systemtap

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-20 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20 16:16 "Kernel Release isn't found" Fieck, Brennan
2018-06-20 17:40 ` Serhei Makarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).