This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Generating Kernel module for Other Computers


Another approach here would be to use the existing systemtap
client/server mechanism. You'd set up a server for each distro you
wanted to support (note that each compile server system doesn't have
to be a real system, it could be a virtual machine). In the
background, the systemtap servers use avahi to broadcast what kernel
versions they support. When the '--use-sever' option is used with the
systemtap client, the client looks for a match to the system it is
compiling for and ships the script off to the appropriate systemtap
compile server and then the module gets transparently shipped back to
the client. From the client's point of view, nothing changes except
for adding in the '--use-server' option.

(Note that we're doing some work on a more web-based system, but it is
still quite early in development.)

On Sun, Jul 2, 2017 at 12:20 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
> P.S. toolchain is only one problem. There are many others. For
> example, where to get the correct package from, how to install the
> packages, how to fix the links in the way that STAP will find the
> packages.
> Every build requires ~50s. It is possible to build in parallel. If you
> need more than one kernel module the system shall scale reasonably
> both performance wise and storage wise.
>
> 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.



-- 
David Smith
Principal Software Engineer
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]