public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
@ 2010-01-07 12:32 md.zafar.ziya
  0 siblings, 0 replies; 7+ messages in thread
From: md.zafar.ziya @ 2010-01-07 12:32 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 84 bytes --]

Hi,

Any one compiled LTP for android?????????????


thank you

regards

zafar ziya

[-- Attachment #1.2: Type: text/html, Size: 128 bytes --]

[-- Attachment #2: Type: text/plain, Size: 390 bytes --]

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
@ 2010-02-17  8:21 Rishikesh
       [not found] ` <70aae6bd1002170035j6b8ad2a3la26a90d13b7b800e@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Rishikesh @ 2010-02-17  8:21 UTC (permalink / raw)
  To: LTP; +Cc: md.zafar.ziya

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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
  2010-02-17 12:07   ` [LTP] [SPAM] " Rishikesh K Rajak
@ 2010-02-18  3:28     ` md zafar ziya
  2010-02-18  4:08       ` Rishikesh K Rajak
  0 siblings, 1 reply; 7+ messages in thread
From: md zafar ziya @ 2010-02-18  3:28 UTC (permalink / raw)
  To: Rishikesh K Rajak; +Cc: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 2681 bytes --]

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


On Wed, Feb 17, 2010 at 5:37 PM, Rishikesh K Rajak <
rishikesh@rishikesh.in.ibm.com> wrote:

> On Wed, Feb 17, 2010 at 02:05:38PM +0530, md zafar ziya wrote:
> > 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 zafar.ziya@samsung.com or
> > md.zafar.ziya@gmail.com
> 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
> >
> > Thank you again.
> >
> > regards
> >
> > Zafar ziya
> >
> > On Wed, Feb 17, 2010 at 1:51 PM, Rishikesh <risrajak@linux.vnet.ibm.com
> >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
> > >
> > >
>

[-- Attachment #1.2: Type: text/html, Size: 3757 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

------------------------------------------------------------------------------
Download Intel&#174; 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

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
  2010-02-18  3:28     ` [LTP] " md zafar ziya
@ 2010-02-18  4:08       ` Rishikesh K Rajak
  2010-02-18 17:50         ` Maxin John
  0 siblings, 1 reply; 7+ messages in thread
From: Rishikesh K Rajak @ 2010-02-18  4:08 UTC (permalink / raw)
  To: md zafar ziya; +Cc: Rishikesh, ltp-list

On Thu, Feb 18, 2010 at 08:58:48AM +0530, md zafar ziya wrote:
> 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.

Thanks for your time and metioning the steps , i am sure it will help
others too.
> 
> 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
> 
> Thank you
> 
> Regards
> 
> md zafar ziya
> 
> 
> On Wed, Feb 17, 2010 at 5:37 PM, Rishikesh K Rajak <
> rishikesh@rishikesh.in.ibm.com> wrote:
> 
> > On Wed, Feb 17, 2010 at 02:05:38PM +0530, md zafar ziya wrote:
> > > 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 zafar.ziya@samsung.com or
> > > md.zafar.ziya@gmail.com
> > 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
> > >
> > > Thank you again.
> > >
> > > regards
> > >
> > > Zafar ziya
> > >
> > > On Wed, Feb 17, 2010 at 1:51 PM, Rishikesh <risrajak@linux.vnet.ibm.com
> > >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&reg; 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
  2010-02-18  4:08       ` Rishikesh K Rajak
@ 2010-02-18 17:50         ` Maxin John
  2010-02-18 22:05           ` Garrett Cooper
  0 siblings, 1 reply; 7+ messages in thread
From: Maxin John @ 2010-02-18 17:50 UTC (permalink / raw)
  To: Rishikesh K Rajak; +Cc: Rishikesh, ltp-list, md zafar ziya

Hi 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

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&#174; 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
  2010-02-18 17:50         ` Maxin John
@ 2010-02-18 22:05           ` Garrett Cooper
  2010-02-19 14:27             ` Maxin John
  0 siblings, 1 reply; 7+ messages in thread
From: Garrett Cooper @ 2010-02-18 22:05 UTC (permalink / raw)
  To: Maxin John; +Cc: Rishikesh, ltp-list, md zafar ziya

On Thu, Feb 18, 2010 at 9:50 AM, Maxin John <maxin.john@gmail.com> wrote:
> Hi 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.

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.

>>> 4.Header files are placed to different location in bionic ,So update the
>>> source as per requirement.

See comment below.

>>> 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?

>>> 7.Push only scripts and binary of the executables(because of memory
>>> constraints) inside target.

Instead of what...?

>>> 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 (><).

> 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.

> 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.

> 4. Some syscalls should be modified using
> "syscall(__N_syscallname,parameters...)" which is present in
> <sys/syscall.h>

Example?

> 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.

> 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&#174; 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM
  2010-02-18 22:05           ` Garrett Cooper
@ 2010-02-19 14:27             ` Maxin John
  0 siblings, 0 replies; 7+ messages in thread
From: Maxin John @ 2010-02-19 14:27 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: Rishikesh, ltp-list, md zafar ziya

Hi Garret,

> 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

>> 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).

> 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..).

Here, we are helpless. Can't do anything unless Google decides so, I guess.

> 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.

>
> 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__)

>> 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

>> 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.

> Thanks for the feedback!
Thanks for the comments, Garrett.

Best Regards,
Maxin B. John
www.maxinbjohn.info

------------------------------------------------------------------------------
Download Intel&#174; 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-02-19 14:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 12:32 [LTP] CAN LTP BE CROSS COMPILED FOR ANDROID PLATFORM md.zafar.ziya
  -- strict thread matches above, loose matches on Subject: below --
2010-02-17  8:21 Rishikesh
     [not found] ` <70aae6bd1002170035j6b8ad2a3la26a90d13b7b800e@mail.gmail.com>
2010-02-17 12:07   ` [LTP] [SPAM] " Rishikesh K Rajak
2010-02-18  3:28     ` [LTP] " md zafar ziya
2010-02-18  4:08       ` Rishikesh K Rajak
2010-02-18 17:50         ` Maxin John
2010-02-18 22:05           ` Garrett Cooper
2010-02-19 14:27             ` Maxin John

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox