SystemTap + Android | Compiling Script | ERROR

Alexander Lochmann alexander.lochmann@tu-dortmund.de
Wed Nov 2 15:53:00 GMT 2016


Hi Ayush!

On 10/25/2016 06:44 PM, ayush goel wrote:
> I’ve been trying to compile stap scripts so that I can run them on my
> android. I’ve installed system tap on my linux system, android ndk and
> the systemtap android application on my android device. However the
> script compilation process is continuously running into error.
> I’ve tried the following things:
> 
> As per the documentation
> (https://sourceware.org/systemtap/wiki/SystemTapOnAndroidARM) I used
> the build-module executable providing path to my kernel source code
> and the script as arguments however that fails for me giving the
> following error:
> config/omap.conf: line 1: /root/sukritk/kernel/goldfish/: Is a directory
> ./build-module: line 92: [: x86: unary operator expected
> ./build-module: line 92: [: arm: unary operator expected
> unknown kernel architecture ''. Check the corresponding file: config/omap.conf
It seems you have not set the KERNEL_ARCH variable in your config. Can
you pls paste your omap.conf file?
> 
> After searching the net, I found that the stap binary inside
> installed/bin can also be used instead, therefore I’m running the
> following command now
> installed/bin/stap  -p 4 -v   -a arm  -B
> CROSS_COMPILE=/root/sukritk/android-ndk-r12b/toolchains/bin/arm-linux-androideabi-
>  -r /root/sukritk/kernel/goldfish/ -m measure
> scripts/monitor_fopen.stp
> 
> However the above command fails, with the very first error being
> "#error "DebugFS is required and was not found in the kernel.”
> I’m assuming I have to recompile my kernel source with some kind of
> DEBUGFS flag enabled.
> 
> However I’m not really sure how to do that.
> Any kind of help or comprehensive steps to compile stap scripts so
> that I can run them my android device would be sincerely appreciated.
> 
Have a look at my tutorial on how to build your own Android kernel:
https://sourceware.org/systemtap/wiki/SystemTapOnAndroidARM/BuildingKernel

Although this tutorial might be a bit outdated, it is a good starting
point. :-)

Cheers,
Alex
> Thanks and Regards
> -Ayush
> 


-- 
Technische Universität Dortmund
Alexander Lochmann                PGP key: 0xBC3EF6FD
Otto-Hahn-Str. 16                 phone:  +49.231.7556141
D-44227 Dortmund                  fax:    +49.231.7556116
http://ess.cs.tu-dortmund.de/Staff/al

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 850 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/systemtap/attachments/20161102/31a9ea2f/attachment.sig>


More information about the Systemtap mailing list