CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
Hi All,
Please help Zafar, if anyone has compiled LTP on andriod .
Ref Mail:
http://marc.info/?l=ltp-list&m=126286998319361&w=2
Signature · 15 lines
Thanks& Regards Rishi Kesh K Rajak IBM LTC, Bangalore LTP Maintainer Please join IRC: #ltp @ freenode.net ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 9 lines · md zafar ziya
Hello Rishikesh,
Thanks for support.
LTP cross compilation is being done(Specific test cases for Testing linux kernel features only).
If any one want assistance, Contact on [email protected] or [email protected]
Hi Zafar,
Good to know that it worked for you. It will helpful if you could explain the steps here so that everyone over can take the advantage. Also let us know if you have have faced some hurdles while solving this issue.
And also any plans for new contribution to ltp with new testcases ?
Thanks
-Rishi
Quoted 24 lines
Thank you again.
regards
Zafar ziya
Quoted 15 lines · Rishikesh
Hi All,
Please help Zafar, if anyone has compiled LTP on andriod .
Ref Mail:
http://marc.info/?l=ltp-list&m=126286998319361&w=2--
Thanks& Regards
Rishi Kesh K Rajak
IBM LTC, Bangalore
LTP Maintainer
Please join IRC: #ltp @ freenode.net
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hello Rishikesh,
1.All LTP application has to compiled against Android bionic library. 2.Use Android Target Cross compiler for building Testcases executables(That use compiler builtin API also).
3.Android libraray dont have -lrt and -lpthread library,Real time library(rt) and Thread library(pthread) are not defined inside Bionic,so just remove these entries from Makefile because these library function are being moved to bionic C library and for thread API include proper header file only.
4.Header files are placed to different location in bionic ,So update the source as per requirement.
5.to run LTP on android based target,use busybox(Cross compiled for android:Path-http://benno.id.au/blog/2007/11/14/android-busybox).Push to target and use.
6.Modify script as per requirement because android based target has different interpretation.
7.Push only scripts and binary of the executables(because of memory constraints) inside target.
8.Run runltp
The above steps anyone can follow to cross compile LTP to ANDROID and run on target.
My Job was not to add new test cases(To check kernel stability only),so i didnt think about that so far.
But i would like to contribute new test case to LTP in the future.LTP is very good project,If any one would add test cases that can show benchmark of different interrupt latency ,that will be big advantage for LTP future and it can make LTP popular among developers.
Thank you
Regards
md zafar ziya
Quoted 17 lines · Rishikesh K Rajak
Quoted 9 lines · md zafar ziya
Hello Rishikesh,
Thanks for support.
LTP cross compilation is being done(Specific test cases for Testing linux kernel features only).
If any one want assistance, Contact on [email protected] or [email protected]
Hi Zafar,
Good to know that it worked for you. It will helpful if you could explain the steps here so that everyone over can take the advantage. Also let
us know if you have have faced some hurdles while solving this issue.
Quoted 30 lines
And also any plans for new contribution to ltp with new testcases ?
Thanks
-RishiQuoted 25 lines
Thank you again.
regards
Zafar ziya
Quoted 15 lines · On Wed, Feb 17, 2010 at 1:51 PM, Rishikesh <[email protected] wrote:
Hi All,
Please help Zafar, if anyone has compiled LTP on andriod .
Ref Mail:
http://marc.info/?l=ltp-list&m=126286998319361&w=2--
Thanks& Regards
Rishi Kesh K Rajak
IBM LTC, Bangalore
LTP Maintainer
Please join IRC: #ltp @ freenode.net
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 22 lines · md zafar ziya
Hello Rishikesh,
1.All LTP application has to compiled against Android bionic library. 2.Use Android Target Cross compiler for building Testcases executables(That use compiler builtin API also).
3.Android libraray dont have -lrt and -lpthread library,Real time library(rt) and Thread library(pthread) are not defined inside Bionic,so just remove these entries fromMakefilebecause these library function are being moved to bionic C library and for thread API include proper header file only.
4.Header files are placed to different location in bionic ,So update the source as per requirement.
5.to run LTP on android based target,use busybox(Cross compiled for android:Path-http://benno.id.au/blog/2007/11/14/android-busybox).Push to target and use.
6.Modify script as per requirement because android based target has different interpretation.
7.Push only scripts and binary of the executables(because of memory constraints) inside target.
8.Run runltp
Quoted 2 lines
The above steps anyone can follow to cross compile LTP to ANDROID and run on target.
Thanks for your time and metioning the steps , i am sure it will help others too.
Quoted 8 lines
My Job was not to add new test cases(To check kernel stability only),so i didnt think about that so far.
But i would like to contribute new test case to LTP in the future.LTP is very good project,If any one would add test cases that can show benchmark of different interrupt latency ,that will be big advantage for LTP future and it can make LTP popular among developers.
Very well said, and we are looking forward for your contributions.
Thanks
Rishi
Quoted 58 lines
Thank you
Regards
md zafar ziya
Quoted 47 lines · Rishikesh K Rajak
Quoted 9 lines · md zafar ziya
Hello Rishikesh,
Thanks for support.
LTP cross compilation is being done(Specific test cases for Testing linux kernel features only).
If any one want assistance, Contact on [email protected] or [email protected]
Hi Zafar,
Good to know that it worked for you. It will helpful if you could explain the steps here so that everyone over can take the advantage. Also let
us know if you have have faced some hurdles while solving this issue.And also any plans for new contribution to ltp with new testcases ?
Thanks
-RishiQuoted 25 lines
Thank you again.
regards
Zafar ziya
Quoted 15 lines · On Wed, Feb 17, 2010 at 1:51 PM, Rishikesh <[email protected] wrote:
Hi All,
Please help Zafar, if anyone has compiled LTP on andriod .
Ref Mail:
http://marc.info/?l=ltp-list&m=126286998319361&w=2--
Thanks& Regards
Rishi Kesh K Rajak
IBM LTC, Bangalore
LTP Maintainer
Please join IRC: #ltp @ freenode.net
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Rishikesh,
Quoted 10 lines
Quoted 10 lines
1.All LTP application has to compiled against Android bionic library. 2.Use Android Target Cross compiler for building Testcases executables(That use compiler builtin API also).
3.Android libraray dont have -lrt and -lpthread library,Real time library(rt) and Thread library(pthread) are not defined inside Bionic,so just remove these entries fromMakefilebecause these library function are being moved to bionic C library and for thread API include proper header file only.
4.Header files are placed to different location in bionic ,So update the source as per requirement.
Quoted 8 lines
Quoted 8 lines
5.to run LTP on android based target,use busybox(Cross compiled for android:Path-http://benno.id.au/blog/2007/11/14/android-busybox).Push to target and use.
6.Modify script as per requirement because android based target has different interpretation.
7.Push only scripts and binary of the executables(because of memory constraints) inside target.
8.Run runltp
Adding some more comments:
1. I have observed that the 'ash' shell present in the busybox will
not be supporting all the functionalities required for running LTP on Android. To resolve this, we need to cross compile the bash-4.1 for Android. This change is working fine for me.
2 . Remount the '/' in read write mode in Android. Create /bin and /tmp directories (most of the LTP test cases depends on the existence of these directories ie: #!/bin/sh ). Push the cross compiled bash to /bin directory and create the symbolic link 'sh' from 'bash'. We can also place the above mentioned busybox in the /bin directory and create the required links.
3. Bionic header files are placed in different directories eg: in LTP <wait.h> should be modified as <sys/wait.h> , <sys/fcntl.h> should be modified as <fcntl.h> ... etc :)
4. Some syscalls should be modified using "syscall(__N_syscallname,parameters...)" which is present in <sys/syscall.h>
5. Better to have cross compiled 'perl' binary since we need to run some perl scripts also.
Finally push all the above mentioned binaries along with cross compiled LTP binaries to Android for the 'real test'.
Best Regards,
Maxin B. John
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 10 lines · Maxin John
Hi Rishikesh,
Quoted 8 lines
Quoted 8 lines
1.All LTP application has to compiled against Android bionic library. 2.Use Android Target Cross compiler for building Testcases executables(That use compiler builtin API also).
3.Android libraray dont have -lrt and -lpthread library,Real time library(rt) and Thread library(pthread) are not defined inside Bionic,so just remove these entries fromMakefilebecause these library function are being moved to bionic C library and for thread API include proper header file only.
Ok. I'll identify the problem items here and eliminate them [hopefully] by next month's snapshot by adding more autoconf tests.
More importantly, can the SDK build be driven by anything other than eclipse (UCK..)? I'd rather not install that mess and have to drive builds if at all possible.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
4.Header files are placed to different location in bionic ,So update the source as per requirement.
See comment below.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
5.to run LTP on android based target,use busybox(Cross compiled for android:Path-http://benno.id.au/blog/2007/11/14/android-busybox).Push to target and use.
6.Modify script as per requirement because android based target has different interpretation.
/bin/sh comment?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
7.Push only scripts and binary of the executables(because of memory constraints) inside target.
Instead of what...?
Quoted 8 lines
Quoted 1 line
Quoted 1 line
8.Run runltp
Adding some more comments:
1. I have observed that the 'ash' shell present in the busybox will not be supporting all the functionalities required for running LTP on Android. To resolve this, we need to cross compile the bash-4.1 for Android. This change is working fine for me.
Yes, we're trying to nuke all bashisms whenever possible. Please send a full list of problem scripts so that they can be fixed instead of having to cross-compile bash (><).
Quoted 6 lines
2 . Remount the '/' in read write mode in Android. Create /bin and /tmp directories (most of the LTP test cases depends on the existence of these directories ie: #!/bin/sh ). Push the cross compiled bash to /bin directory and create the symbolic link 'sh' from 'bash'. We can also place the above mentioned busybox in the /bin directory and create the required links.
1. #!/bin/sh not existing is a nasty portability issue that really should be fixed with android unless google plans to roll all of their rc scripts and stuff as a lot of people assume that /bin/sh exists (and it's a fairly valid assumption to trust as it's standard across multiple Unices, not just Linux..).
2. /tmp shouldn't be a big problem if tests do the right thing (for the most part) and apart from modifying /etc/ files, put all generated files in tmpfs mounted /tmp // /var . Some tests may fail though unless the host platform has 2GB `free space' allocated for the tmpfs filesystem.
Quoted 3 lines
3. Bionic header files are placed in different directories eg: in LTP <
wait.h> should be modified as <sys/wait.h> , <sys/fcntl.h> should be modified as <fcntl.h> ... etc :)
If Bionic isn't being standard according to standard Linux libcall // syscall manpages, Bionic needs to be fixed -- not LTP, as LTP (or any Linux project) shouldn't support non-standard distro packaging quirks.
Quoted 3 lines
4. Some syscalls should be modified using "
syscall(__N_syscallname,parameters...)" which is present in <sys/syscall.h>
Example?
Quoted 2 lines
5. Better to have cross compiled 'perl' binary since we need to run some perl scripts also.
We [Mike F and I] are advocating that we get rid of the perl dependency where it's not required because it's just another `annoying' tool that needs to be maintained in-house and the majority of the time perl can be replaced by awk // sed. I honestly don't know of any mainstream tools though that require perl other than the top-level and post-processing scripts.
Quoted 2 lines
Finally push all the above mentioned binaries along with cross compiled LTP binaries to Android for the 'real test'.
Thanks for the feedback!
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi Garret,
Quoted 3 lines
More importantly, can the SDK build be driven by anything other than eclipse (UCK..)? I'd rather not install that mess and have to drive builds if at all possible.
Hmm.. Please correct me if I am wrong. For Android Application development (Java Apps) and dealing with the emulator/hardware, we need SDK. To compile SDK, we don't need Eclipse IDE.If you don't want to mess up with SDK source, precompiled SDK is available at:
http://developer.android.com/sdk/index.html
However, for cross compiling LTP to Android, we need Android NDK (Native Development Kit/Tools) which is basically the arm cross toolchain tailored for Android. It's latest version is available at :
http://developer.android.com/sdk/ndk/1.6_r1/index.html
Quoted 6 lines
Quoted 2 lines
Android. To resolve this, we need to cross compile the bash-4.1 for Android. This change is working fine for me.
Yes, we're trying to nuke all bashisms whenever possible. Please send a full list of problem scripts so that they can be fixed instead of having to cross-compile bash (><).
I am afraid that it's not 100% possible. I have observed that the ash shell present in busybox
will not be able to handle arrays properly
(http://osdir.com/ml/busybox/2004-07/msg00152.html).
Quoted 5 lines
1. #!/bin/sh not existing is a nasty portability issue that really should be fixed with android unless google plans to roll all of their rc scripts and stuff as a lot of people assume that
/bin/shexists (and it's a fairly valid assumption to trust as it's standard across multiple Unices, not just Linux..).
Here, we are helpless. Can't do anything unless Google decides so, I guess.
Quoted 5 lines
2. /tmp shouldn't be a big problem if tests do the right thing (for the most part) and apart from modifying
/etc/files, put all generated files in tmpfs mounted /tmp // /var . Some tests may fail though unless the host platform has 2GB `free space' allocated for the tmpfs filesystem.
I really don't think 1GB/2GB free space will be available in commonly available embedded devices. We should modify the memory requirements based on the capabilities of the actual device in hand.
Quoted 4 lines
If Bionic isn't being standard according to standard Linux libcall // syscall manpages, Bionic needs to be fixed -- not LTP, as LTP (or any Linux project) shouldn't support non-standard distro packaging quirks.
I do agree with this. However, just to make things work, can we follow the same way as UCLIBC support in LTP. like:
#if defined(__linux__) && !defined(__UCLIBC__)
Quoted 5 lines
Quoted 3 lines
4. Some syscalls should be modified using "
syscall(__NR_syscallname,parameters...)" which is present in <sys/syscall.h>Example?
fdatasync(fd) -> syscall(__NR_fdatasync,fd) truncate64( name->path, length) -> syscall(__NR_truncate64, name->path, length) .. etc
Quoted 9 lines
Quoted 2 lines
5. Better to have cross compiled 'perl' binary since we need to run some perl scripts also.
We [Mike F and I] are advocating that we get rid of the perl dependency where it's not required because it's just another `annoying' tool that needs to be maintained in-house and the majority of the time perl can be replaced by awk // sed. I honestly don't know of any mainstream tools though that require perl other than the top-level and post-processing scripts.
This is a nice idea specially useful for the embedded devices where there are limitations on the available memory.
Quoted 1 line
Thanks for the feedback!
Thanks for the comments, Garrett.
Best Regards,
Maxin B. John
www.maxinbjohn.info
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list