This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Getting ARM Streamline to work with Samsung S2

Note: This was originally posted on 26th April 2013 at http://forums.arm.com

Hi,

we have performance issues with Mali400 GPU's and need to track them down.

The ARM Streamline tool seems to be very useful for that.

We are using a Samsung S2 (GT I9100) to check here.

If I do the 'adb forward tcp:8080 tcp:8080' and try to connect with Streamline to localhost then I'll get a message: "Unable to receive data from the gator daemon .... ".
Obviously some gator process is missing (checked processes with ps and it's not listed there).

After doing some research, all I found is intructions on how to compile a kernel with a gator module.

I'm developing on a Windows 7 machine.
Even if I would fight through this, there is a step following that needs to start this gator with root rights.

Since I'm using a customer device I don't have root rights and I don't like to root it (let alone the illegal feel of it..).

So my final question is: is this the way? Or did I miss something?


Thanks in advance!
Bodo
  • Note: This was originally posted on 29th April 2013 at http://forums.arm.com


    Hi,

    we have performance issues with Mali400 GPU's and need to track them down.

    The ARM Streamline tool seems to be very useful for that.

    We are using a Samsung S2 (GT I9100) to check here.

    If I do the 'adb forward tcp:8080 tcp:8080' and try to connect with Streamline to localhost then I'll get a message: "Unable to receive data from the gator daemon .... ".
    Obviously some gator process is missing (checked processes with ps and it's not listed there).

    After doing some research, all I found is intructions on how to compile a kernel with a gator module.

    I'm developing on a Windows 7 machine.
    Even if I would fight through this, there is a step following that needs to start this gator with root rights.

    Since I'm using a customer device I don't have root rights and I don't like to root it (let alone the illegal feel of it..).

    So my final question is: is this the way? Or did I miss something?


    Thanks in advance!
    Bodo



    Hello Bodo,

    For streamline to work, you need two components on your system. The gator daemon and the gator driver.
    The gator driver is a kernel object, and in order to insmod on Android, you must have root permissions.
    As such, there is no current way to get streamline working on a none rooted Android device.

    Hope this clarifies things.


    - McGeagh
  • Note: This was originally posted on 6th May 2013 at http://forums.arm.com


    Hello Bodo,

    For streamline to work, you need two components on your system. The gator daemon and the gator driver.
    The gator driver is a kernel object, and in order to insmod on Android, you must have root permissions.
    As such, there is no current way to get streamline working on a none rooted Android device.

    Hope this clarifies things.


    - McGeagh


    Thanks for the answer. At least we now know, that we are on the right way. Somehow..

    Is there any kind of detailed description on how to build the .ko file and the gator daemon?
    None of us is a Linux expert here and we really have a hard time on reading and following the how-to Readme.

    Alternatively - is a compiled binary for a S2 (i9200) for Android 4.xx available?

    Thanks,
    Bodo
  • Note: This was originally posted on 7th May 2013 at http://forums.arm.com

    [color=#444444][font=arial][size=2]> Is there any kind of detailed description on how to build the .ko file and the gator daemon?[/size][/font][/color]

    Manual any help?
    http://infocenter.arm.com/help/topic/com.arm.doc.dui0482l/index.html
  • Note: This was originally posted on 14th May 2013 at http://forums.arm.com


    > Is there any kind of detailed description on how to build the .ko file and the gator daemon?

    Manual any help?
    http://infocenter.ar...482l/index.html


    Thanks, but we already took a look at this.
    Unfortunately this requires a lot of getting-into-linux which we don't have time for at the moment.

    As we cannot make sure, the Streamline Tool will really provide the bottleneck information we need, it is too risky and expensive to invest this much time to get it to run.
  • Note: This was originally posted on 22nd May 2013 at http://forums.arm.com


    To use Streamline you just need to build something and actually there isn't much 'getting-into-linux' to be done. A spare machine with, say, an Ubuntu install, and a few build commands are all that is required. The Linux build system is excellent.


    Got to a point now, where a gator.ko should have been created, but it isn't there.

    I'm working with an Ubuntu here (Ubuntu 10.04.4 LTS)

    What I did:
    * loaded the GT-I9100_JB_Opensource.zip from http://opensource.samsung.com/ which should be the right kernel for the S2
    * use a prebuilt toolchain with arm-eabi-4.4.3
    * did Step 1 to 7 of this documentation: http://infocenter.ar...2176300479.html
      -> used the arm-eabi-4.4.3 for step 2
      -> in step 5 (menuconfig), I enabled all the options as described in the README_Streamline.txt of the gator-driver, except "Trace process context switches and events" which wasn't available but according to the README this should be fine

    -> fine so far. The make is running through, zImage and uImage are created.

    Now to the gator module:
    * followed the steps in README_Streamline.txt that comes with the gator/daemon source
    * had to modify the make command to have M=$pwd and not M='pwd' because this didn't work
    * the final make was:
    $ make -C /home/fakt/dev/GT-I9000/build/ M=$pwd ARCH=arm CROSS_COMPILE=/home/fakt/dev/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- CONFIG_CODA_FS=n CONFIG_DRM_RADEON=n CONFIG_TOUCHSCREEN_EETI=n modules

    * this caused me nearly a day of work to get through ... all kinds of errors appeared (as you may see in the make call that features some CONFIG_ settings for some of the errors) .. I had to modify code in scsi drivers (wondering if they are needed anyways..), bugs with non defined variables and all such things...

    * finally the make was over with those last lines:
      ...
      MKDIR   firmware/yam
      IHEX firmware/yam/1200.bin
      IHEX firmware/yam/9600.bin
    make: Leaving directory `/home/fakt/dev/GT-I9000/build'

    * a system wide search for gator.ko brought up no results..

    I'm pretty sure, I did something wrong here since I'm totally new to all this Kernel-Compiling.
    Can you help me to bring this to an positive end?

    Thanks in advance,
    Bodo
  • Note: This was originally posted on 23rd May 2013 at http://forums.arm.com

    Ok, got the gator.ko now. Obviously the M parameter of the make is crucial and was pointing to the wrong directory.
    Replaced it with an absolute path (those single quotes won't work for me) and the gator.ko was created :D

    2 Questions now:

    [s]Question 1 - Mali driver support:
    Now I want to follow the next steps: http://infocenter.ar...2294970611.html

    Since we like to analyze graphics performance I assume we need Mali Support.
    As the docs state, a make flag has to be added that includes a directory pointing to the Mali driver source.

    Where do I get this driver source? Did some googling but couldn't find an obvious source.[/s]

    Found a driver on the ARM page (DX910-SW-99002-r3p2-01rel1). Building the gator.ko with Mali support as described worked. :)

    [s]Question 2 - Building the daemon:
    I followed the steps described here: http://infocenter.ar...2178383724.html

    (Unpack the daemon source, navigate there, do 'make').

    The make fails with:
    fakt@KHEPRIUBUNTU:~/dev/gator/daemon-src/gator-daemon$ make
    /home/fakt/dev/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-g++ -c -mthumb-interwork -O3 -Wall -fno-exceptions -pthread -MMD -DETCDIR=\"/etc\" -Ilibsensors -fno-rtti -o Buffer.o Buffer.cpp
    arm-eabi-g++: unrecognized option '-pthread'
    In file included from Buffer.cpp:9:
    Buffer.h:13:20: error: stdint.h: No such file or directory
    Buffer.h:14:23: error: semaphore.h: No such file or directory
    In file included from Buffer.cpp:11:
    ... (just an excerpt, the output is longer)


    Obviously some includes can't be found. I tried around with tweaking the common.mk and adding -I pointing to the missing includes. This helps for a while but then I end with a ld fail because of a missing crt0.o.

    Any help on this is appreciated. I think tweaking the makefile should not be necessary here and something more general is wrong.[/s]

    Ok, got a gatord now. This was a bit tricky to read from the documentation (at least for me). Rename the source dir to jni. Setting the right NDK Project Path. Executing ndk build in the right dir.


    Now let's hope everything works on the device...


    Thanks in advance again!
    Best,
    Bodo
  • Note: This was originally posted on 27th May 2013 at http://forums.arm.com

    We have a problem getting the Samsung Kernel to work.

    * Tried it with and without the necessary settings for the gator.ko.
    * Tried different toolchains
    -> But everytime I flash the kernel on the device (per Odin), the device shows the initial screen (device name + number and those yellow warning sign), goes black, shows this screen again .. and this is looping ..

    I assume, the kernel tries to boot, but something goes wrong.

    Tried another Custom Kernel for the I9100 (siyah_s2..) and this runs perfectly.

    Loaded the source of some Choon Kernel for the I9100, the build script runs smoothy, but flashed on the device, the Kernel has the same problems as the original Samsung code.

    Do you have any advice on this?
  • Note: This was originally posted on 6th June 2013 at http://forums.arm.com


    Sounds promising - I've not done this with an S2, but these links look helpful. In particular the bit about initramfs

    http://forum.xda-dev...d.php?t=1587482
    http://forum.xda-dev...d.php?t=1748297

    Does this give you any pointers for moving forward?

    Cheers
    R


    Thanks. Tried a lot of different tutorials, kernels etc. None of them with success. Tried different toolchains, initramfs etc. All without success.
    After spending over a week on getting the Kernel to run (even without any Streamline relevant Kernel switches) we are focussing on other possibilities to find our problem.