From: Arkady <arkady.miasnikov@gmail.com>
To: Daniel Doron <danielmeirdoron@gmail.com>
Cc: systemtap@sourceware.org
Subject: Re: Generating Kernel module for Other Computers
Date: Sun, 02 Jul 2017 17:10:00 -0000 [thread overview]
Message-ID: <CANA-60qD=V8x77sEs16ruvPszcf5M3n7-iLHFcp984bjpkugrg@mail.gmail.com> (raw)
In-Reply-To: <CAFwN=+wqOCx0FL6+CdH3BZkiFaie_dVF161YFkNuck8O+kxY+A@mail.gmail.com>
You shall consider one of the following
* A dedicated virtual machine with the correct kernel version
(vagrant?) where you install the debug packages and STAP using
yum/apt-get
* A Docker container - this is what I am using - where you install
debug packages manually. You will have to fix some symbolic links.
On Sun, Jul 2, 2017 at 6:29 PM, Daniel Doron <danielmeirdoron@gmail.com> wrote:
> 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.
next prev parent reply other threads:[~2017-07-02 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-02 15:29 Daniel Doron
2017-07-02 17:10 ` Arkady [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANA-60qD=V8x77sEs16ruvPszcf5M3n7-iLHFcp984bjpkugrg@mail.gmail.com' \
--to=arkady.miasnikov@gmail.com \
--cc=danielmeirdoron@gmail.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).