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: systemTap 1.0 CROSS COMPILE


Hi Frank,

On Tue, Oct 27, 2009 at 1:26 AM, Frank Ch. Eigler <fche@redhat.com> wrote:
> naresh kamboju <naresh.kernel@gmail.com> writes:
>
>> [...]  I have to build and install stap and staprun binaries on the
>> Host Machine by using cross compilation.  I'll use stap to build .ko
>> files and copy on the target arm architecture board and insert and
>> execute the module with staprun. [...]
>
> 1) the machine where systemtap itself is compiled
> 2) the machine where systemtap is *run*, to translate scripts to .ko's
> 3) the machine where the modules are run via staprun
>
Yes,
I have same idea.
Here systemtap build will build the stap binary which can be used to
compile .stp file and it will create .ko files which can be insert
able for a given architecture on the host machine.


HOST:
$export PATH=/usr/local/arm
$export CC=/usr/loca/arm-gcc
Stap –vv –p4 –r 2.6.29-arm-XXX –m helloworld helloworld.stp
Pass1:
Pass2:
Pass3:
Pass4:
helloworld.ko is created.

Transfer the helloworld.ko to arm target Machine and run/insert using staprun

TARGET:
#scp naresh@host-machine:/home/naresh/systemtap/helloworld.ko .
#staprun helloworld.ko
hello world
#

> The recent cross-architecture enhancements were for the 2->3 crossing,
> so wherevever systemtap was run, it could create output .ko's for a
> different architecture.
Ok got it.
>
> We have not tried to do 1->2 (for stap) or 1->3 (for staprun) itself,
> so that we have been expecting systemtap itself (or at least staprun)
> to be built natively (on your ARM machine).
Can we do any modification to configure or Makefile to make build it from 1->3.

>
> OTOH it should be possible to cross-compile systemtap (or at least
> staprun).
>
>> 7. ./configure --host=i686-pc-linux-gnueabi --prefix=/usr/local/arm/
>> --with-elfutils=elfutils...
>
> Try instead
>
> .../configure --target=arm... --prefix=... --with-elfutils=... --disable-translator
>

I have tried in different ways to cross compile using installed
/usr/local/arm tool chain.
However, the stap and staprun are created in X86 format again.
As per my investigation the configuration file is not recognizing for
cross compilation.
When we do configure as
“./configure --target=arm --prefix=/usr/local/arm/
--with-elfutils=elfutils --disable-translator”

I think we are missing something at configuration part.
Are we sure about configure file is designed to accept cross compilation?

If any body has done cross compilation on host machine to prepare
stap, staprun binaries and libraries required.
Please share the steps.

It would be a great help.

Best regards
Naresh Kamboju


On Tue, Oct 27, 2009 at 1:26 AM, Frank Ch. Eigler <fche@redhat.com> wrote:
> naresh kamboju <naresh.kernel@gmail.com> writes:
>
>> [...] ?I have to build and install stap and staprun binaries on the
>> Host Machine by using cross compilation. ?I'll use stap to build .ko
>> files and copy on the target arm architecture board and insert and
>> execute the module with staprun. [...]
>
> OK. ?Recall that systemtap is itself a translator/compiler, so in fact
> we have several possible "crossings":
>
> 1) the machine where systemtap itself is compiled
> 2) the machine where systemtap is *run*, to translate scripts to .ko's
> 3) the machine where the modules are run via staprun
>
> The recent cross-architecture enhancements were for the 2->3 crossing,
> so wherevever systemtap was run, it could create output .ko's for a
> different architecture.
>
> We have not tried to do 1->2 (for stap) or 1->3 (for staprun) itself,
> so that we have been expecting systemtap itself (or at least staprun)
> to be built natively (on your ARM machine).
>
> OTOH it should be possible to cross-compile systemtap (or at least
> staprun).
>
>> 7. ./configure --host=i686-pc-linux-gnueabi --prefix=/usr/local/arm/
>> --with-elfutils=elfutils...
>
> Try instead
>
> .../configure --target=arm... --prefix=... --with-elfutils=... --disable-translator
>
>
> - FChE
>


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