public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Generating Kernel module for Other Computers
@ 2017-07-02 15:29 Daniel Doron
  2017-07-02 17:10 ` Arkady
  2017-07-02 17:21 ` Arkady
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Doron @ 2017-07-02 15:29 UTC (permalink / raw)
  To: systemtap

Hi,

I am trying to automate the creation of the driver from one host for
multiple computers.
The purpose is:
1. compile the driver with the latest STAP version
2. automate it for multiple kernels at once
3. distribute the driver to each machine

My approach was to use stap "-r" flag. So for example I would use my
Arch Linux to download and extract all relevant source for Centos 6
and compile my module for it.

Centos 6.9:
---------------
get the following packages:
kernel-2.6.32-696.el6.x86_64.rpm
kernel-debuginfo-2.6.32-696.3.2.el6.x86_64.rpm
kernel-debuginfo-common-x86_64-2.6.32-696.3.2.el6.x86_64.rpm
kernel-devel-2.6.32-696.el6.x86_64.rpm

extract them to some location.

then:
---
export SYSTEMTAP_DEBUGINFO_PATH=/home/danield/Downloads/centos-2.6.32/usr/lib/debug/lib/modules

soft link vmlinux for STAP
ln -s ~/Downloads/centos-2.6.32/usr/lib/debug/lib/modules/2.6.32-696.3.2.el6.x86_64/vmlinux
~/Downloads/centos-2.6.32/usr/src/kernels/2.6.32-696.el6.x86_64/vmlinux

sudo stap -vv -r
/home/danield/Downloads/centos-2.6.32/usr/src/kernels/2.6.32-696.el6.x86_64
-e 'probe vfs.read {exit()}' -m simple


the error I get:
include/linux/compiler-gcc.h:94:1: fatal error: linux/compiler-gcc7.h:
No such file or directory
 #include gcc_header(__GNUC__)

made me realize this is not good because STAP relies on the gcc
version I use to get the header in the kernel. Of course I am using
gcc 7 which doesn't exist for Centos 6.9 kernel' (latest version is
4.4.7)

I could:
1. download the relevant gcc version and maybe pass CC=/usr/bin/gcc4
stap -r ....
2. other suggestion?


Thanks.
Daniel.

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

end of thread, other threads:[~2017-07-05 13:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-02 15:29 Generating Kernel module for Other Computers Daniel Doron
2017-07-02 17:10 ` Arkady
2017-07-02 17:21 ` Arkady
2017-07-03 16:17   ` David Smith
2017-07-03 17:18     ` Arkady
2017-07-03 18:49       ` David Smith
2017-07-04  2:53         ` Arkady
2017-07-05 13:20           ` David Smith

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