This guide will show how to get ARM® DS-5™ Streamline™ support working on a production Samsung Galaxy SIII device, with minimal modifications.
The resulting files generated will be a gatord, gator.ko and a boot.img file.
This guide is written with Android™ version 4.3 (JellyBean MR2) in mind.
It is required that the SIII (GT-I9300) device have root access.
This is required in order to install gator and to insert the kernel module.
You will also be flashing a custom kernel.
ARM DS-5 software is required to be installed. This is required in order to do any capturing of data and also contains the source code for gator.
The community edition of DS-5 can be obtained for free from the ds5 website.
This guide has been tested with DS-5 version 5.20 on Windows and Linux.
In addition, you will need the Android SDK (for adb) and Android NDK (for building gator daemon).
You will also need to install the abootimg linux utility to modify the boot image.
Finally you will need to install the heimdall-flash linux utility in order to flash the boot image. Alternatively, you can use the Windows only version, called ODIN.
This has been tested with the original 4.4.3 toolchain, as well as the more recent 4.6 toolchain. Some extra work is required for 4.6 however.
The toolchain to be used for building the kernel can be obtained from the following public git repository:
git clone https://android.googlesource.com/platform/prebuilt/ export PATH=$PATH:$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/ export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
In order to set up your build environment to use this toolchain and to target cross compilation, do the following:
export CROSS_COMPILE=arm-eabi- export ARCH=arm export SUBARCH=arm
The kernel source code can be obtained from the following website:
http://opensource.samsung.com/
In order to determine which package to download, connect your SIII and run the following command:
adb shell getprop ro.build.version.incremental
This will return the build to search for. This document has used I9300XXUGMK6 and thus the package downloaded was GT-I9300_JB_Opensource_Update13.zip.
Building
To build the kernel, do the following:
make m0_00_defconfig
Unfortunately, at time of writing, the Kernel will not build straight out of the box. You first need to make 2 modifications.
The first is to edit the Makefile to allow the CROSS_COMPILE environment variable:
Change Line 196
CROSS_COMPILE = /opt...
To be:
CROSS_COMPILE ?= /opt...
The '?' allows us to override the Makefile's path with our own which we previously set.
The second is to edit the drivers/gpu/mali400/r3p2/ump/Kbuild to ignore the SVN_REV command:
Change Line 31
SVN_REV := $(shell ...
SVN_REV := '0000'
The command to figure out the SVN revision is broken, and it is not even an svn repo, so we set it to 0000 as a fall back.
PLEASE NOTE:
If you are using arm-eabi-4.6 toolchain (You do not need to do the following if you are using the arm-eabi-4.4.3 toolchain) then you also need to turn off the more aggressive warning as errors, as well as fix a few missing asm extension declarations:
In Makefile, change Line 367:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Wno-maybe-uninitialized -Wno-address \
This disables the warning as error for maybe-uninitialized and address problems.
In drivers/misc/tzic.c, change Lines 44, 64 and 75:
__asm__ volatile ("smc 0\n"...
__asm__ volatile (".arch_extension sec\nsmc 0\n"
This enables the smc instruction to be used.
In order to build the gator driver however, you will need to make modifications to the kernel.
make menuconfig
Enable the following:
General setup -->
[*] Profiling support
Kernel Performance Events And Counters --> [*] Kernel performance events and counters
Device Drivers -->
Graphics Support -->
Mali-300/400/450 support -->
[*] Enable Mali profiling
You can now build the kernel with make.
In order to get this modified kernel onto the device, you need to generate a boot.img file for use with either heimdall or ODIN.
You can obtain the original stock boot.img file directly off the device with the following commands:
adb shell su cat /dev/block/platform/dw_mmc/by-name/BOOT > /sdcard/boot.img exit exit adb pull /sdcard/boot.img
Now we can update the kernel:
abootimg -u boot.img -k kernel/arch/arm/boot/zImage
Finally, we can flash this new image onto the device:
adb reboot download sudo heimdall flash --BOOT boot.img
Or the equivalent ODIN method.
When you upload this custom kernel to the device, you may find you can no longer connect to the wifi.
Unfortunately there is no known way to fix this as of yet.
You can obtain the driver and daemon source files from your DS-5 installation directory:
<DS-5 Installation Directory>/arm/gator/
Build the driver by doing the following, from within the gator-driver directory:
GATOR_WITH_MALI_SUPPORT=MALI_4xx CONFIG_GATOR_MALI_PATH="<path_to>/kernel/drivers/gpu/mali400/r3p2/mali/" make -C <path_to>/kernel M=`pwd` modules
You should now have gator.ko.
First, you will need to modify the structure of the gator-daemon directory in order to build for Android.
Create a folder called jni inside gator-daemon and move all files and folder to this location:
mkdir jni mv * jni/
Then build the daemon by doing the following from within the gator-daemon directory:
ndk-build
You should now have gatord.
Unfortunately you cannot simply push these two gator files directly into the system directory on the device due to permission issues with a secure adb device.
The way around this is to do the following. First, remount the system partition as read/write access:
adb shell su -c mount -o remount /system
Next, push the files to the sdcard:
adb push gator.ko /sdcard/ adb push gatord /sdcard/
Then copy these files from the sdcard to the system directory:
adb shell su -c cp /sdcard/gator* /system/bin/
Finally, give full permissions to the daemon:
adb shell su -c chmod 777 /system/bin/gatord
You are now ready to use the device with Streamline support.
The normal procedure for using gator is as follows – and is required to be done each time the device restarts:
Setup forwarding through usb instead of network:
adb forward tcp:8080 tcp:8080
Launch the daemon from within an adb shell:
adb shell su -c gatord &
Launch DS-5, and enter localhost in the connection box.
Select the counters you are interested in capturing, and you are now ready to begin capturing.
PLEASE NOTE!
Due to the old version of the driver in this device, from the version of Android stated in this document, you should only pick 2 counters for the Fragment Processor (a.k.a Pixel Processor).
Streamline will let you choose up to 8 counters for this device, but the values you get will be incorrect. Please only choose 2 counters, not 8.
Later OTA updates for the phone may resolve this issue, so if you are running a later version as stated in this document, please make sure to check the values of your counters before believing them.
The symptom is that the first 2 values are duplicated across the other (up to 8) counters you selected, so you would see 2 values duplicated up to 4 times, within a 1% variance.
Hello mcgeagh,
Your guide is overall very explanatory. Have you come across a solution for the wifi issue? Thank you.
Kostas
Hi rogersu,
The reason is because the Mali userspace library needs to be built to support filmstrip. On devices such as ODROID, this is enabled by default, however it seems that Samsung removed this feature for the SIII.
So in summary, when using the default binary userspace library that comes with the Samsung Galaxy SIII device, it is not possible to have filmstrip working. If this is a required feature, you would either have to switch to a different device, or contact Samsung for a driver that has this enabled.
If you have any further questions, please let us know.
Kind Regards,
Michael McGeagh
Hi Michael,
I tried this way on your post, and I cannot see the filmstrip on Streamline.
However, I had been tried filmstrip on Streamline with ODROID-A, it worked correctly even I just slide my screen and without running any application on Android.
Do you have any idea?
Software Development Tools related
Similar guides:
Samsung Galaxy Note 3 & Samsung Galaxy Note 10.1 2014 edition - Using DS-5 Streamline with Mali on Samsung Galaxy Note 3 & 10.1
Google Nexus 10 - Using DS-5 Streamline with Mali on Google Nexus 10