Re: [PATCH 1/2] Porting to Android system

2012-05-30 Thread Amit Kucheria
Just some nits below:

On Wed, May 30, 2012 at 2:47 PM, kejun.zhou  wrote:
> From: kejun.zhou 
>
> Signed-off-by: kejun.zhou 
> ---
>  cpuidle/cpuidle_killer.c |   10 ++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c
> index 67a675e..c8910f4 100644
> --- a/cpuidle/cpuidle_killer.c
> +++ b/cpuidle/cpuidle_killer.c
> @@ -2,7 +2,17 @@
>  #include 
>  #include 
>  #include 
> +#ifndef ANDROID
>  #include 
> +#else
> +// As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface
> +// However, the kernel does...

Please use C-style comments everywhere /* */

> +#include  // for struct timex
> +#include  // for __NR_adjtimex
> +static int adjtimex(struct timex *buf) {
> +       return syscall(__NR_adjtimex, buf);
> +}
> +#endif
>  #include 
>  #include 
>  #include 
> --
> 1.7.0.4

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] Update to C-style comments

2012-05-30 Thread kejun.zhou
Signed-off-by: kejun.zhou 
---
 cpuidle/cpuidle_killer.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c
index c8910f4..0e4d666 100644
--- a/cpuidle/cpuidle_killer.c
+++ b/cpuidle/cpuidle_killer.c
@@ -5,8 +5,10 @@
 #ifndef ANDROID
 #include 
 #else
-// As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface
-// However, the kernel does...
+/* 
+* As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface
+* However, the kernel does...
+*/
 #include  // for struct timex
 #include  // for __NR_adjtimex
 static int adjtimex(struct timex *buf) {
-- 
1.7.0.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] Update to C-style comments

2012-05-30 Thread Daniel Lezcano
On 05/30/2012 09:15 AM, kejun.zhou wrote:
> Signed-off-by: kejun.zhou 
> ---
>  cpuidle/cpuidle_killer.c |6 --
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c
> index c8910f4..0e4d666 100644
> --- a/cpuidle/cpuidle_killer.c
> +++ b/cpuidle/cpuidle_killer.c
> @@ -5,8 +5,10 @@
>  #ifndef ANDROID
>  #include 
>  #else
> -// As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface
> -// However, the kernel does...
> +/* 
> +* As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface
> +* However, the kernel does...
> +*/
>  #include  // for struct timex
>  #include  // for __NR_adjtimex
>  static int adjtimex(struct timex *buf) {

Hmm ... Usually, you should resend your patchset updated with the fixes,
not one on top of your patches.
Also, you did not fix the C-style comments 'everywhere' :)

-- 
  Linaro.org │ Open source software for ARM SoCs

Follow Linaro:   Facebook |
 Twitter |
 Blog


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 2/2] Add Android.mk files

2012-05-30 Thread Amit Kucheria
On Wed, May 30, 2012 at 2:47 PM, kejun.zhou  wrote:
> Signed-off-by: kejun.zhou 
> ---
>  Android.mk            |    1 +
>  cpufreq/Android.mk    |   76 
>  cpuhotplug/Android.mk |   84 
> +
>  cpuidle/Android.mk    |   35 
>  include/Android.mk    |   28 
>  sched_mc/Android.mk   |   36 +
>  suspend/Android.mk    |   50 +
>  thermal/Android.mk    |   51 +
>  utils/Android.mk      |   35 
>  9 files changed, 396 insertions(+), 0 deletions(-)
>  create mode 100644 Android.mk
>  create mode 100644 cpufreq/Android.mk
>  create mode 100644 cpuhotplug/Android.mk
>  create mode 100644 cpuidle/Android.mk
>  create mode 100644 include/Android.mk
>  create mode 100644 sched_mc/Android.mk
>  create mode 100644 suspend/Android.mk
>  create mode 100644 thermal/Android.mk
>  create mode 100644 utils/Android.mk
>
> diff --git a/Android.mk b/Android.mk
> new file mode 100644
> index 000..5053e7d
> --- /dev/null
> +++ b/Android.mk
> @@ -0,0 +1 @@
> +include $(call all-subdir-makefiles)
> diff --git a/cpufreq/Android.mk b/cpufreq/Android.mk
> new file mode 100644
> index 000..34da7a7
> --- /dev/null
> +++ b/cpufreq/Android.mk
> @@ -0,0 +1,76 @@
> +include $(call all-subdir-makefiles)
> +LOCAL_PATH:= $(call my-dir)
> +

This is painful to read, one section for each script. Please put it in
a loop. Something like here:
http://stackoverflow.com/questions/7651608/simplifying-an-android-mk-file-which-build-multiple-executables

> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_01.sh
> +LOCAL_SRC_FILES:= cpufreq_01.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_02.sh
> +LOCAL_SRC_FILES:= cpufreq_02.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_03.sh
> +LOCAL_SRC_FILES:= cpufreq_03.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_04.sh
> +LOCAL_SRC_FILES:= cpufreq_04.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_05.sh
> +LOCAL_SRC_FILES:= cpufreq_05.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_06.sh
> +LOCAL_SRC_FILES:= cpufreq_06.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_07.sh
> +LOCAL_SRC_FILES:= cpufreq_07.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_08.sh
> +LOCAL_SRC_FILES:= cpufreq_08.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpufreq_09.sh
> +LOCAL_SRC_FILES:= cpufreq_09.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> +include $(BUILD_PREBUILT)
> +
> diff --git a/cpuhotplug/Android.mk b/cpuhotplug/Android.mk
> new file mode 100644
> index 000..9981cfc
> --- /dev/null
> +++ b/cpuhotplug/Android.mk
> @@ -0,0 +1,84 @@
> +include $(call all-subdir-makefiles)
> +LOCAL_PATH:= $(call my-dir)
> +
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpuhotplug_01.sh
> +LOCAL_SRC_FILES:= cpuhotplug_01.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpuhotplug
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpuhotplug_02.sh
> +LOCAL_SRC_FILES:= cpuhotplug_02.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpuhotplug
> +include $(BUILD_PREBUILT)
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := cpuhotplug_03.sh
> +LOCAL_SRC_FILES:= cpuhotplug_03.sh
> +LOCAL_MODULE_TAGS := optional
> +LOCAL_MODULE_CLASS := ETC
> +LOCAL_MODULE_PATH := $(TARGET_O

Both native and cross compilation failed with Ubuntu Linaro Gcc 4.5.x and 4.6.x for an ARM/OMAP board

2012-05-30 Thread AKS
Hi

I was cross-compiling a Linux kernel 2.6.38 for a Gumstix Overo
which is a tiny ARM (TI OMAP 35xx) based single board computer.
I was using Linaro cross compiler (arm-linux-gnueabi-gcc) did not
give an uImage that gets pass the Loading uImage. My console is
ttyO2 and therefore it was not an issue. So I used Code Sourcey
G++ Lite (64 bits version without ia32 library) and the kernel image
uImage.bin built with the same configuration file (.config) but with
different cross compiler can boot up to the stage that the kernel
tries to mount ext3 partition on microSD card. So I suspect the
package gcc-linux-arm-gnueabi has some bugs. I have a working
2.6.35 kernel (although I do not have the .config file with settings
which I have used to build that) that was built with Linaro Gcc 4.3
or 4.4. I suspect the Linaro Gcc 4.5.x and above are giving me a
problem. I used the Linaro media create tool with root file system
and hardware pack but it also could not help me boot nor give me
the right config file which I can use to cross compile a working
kernel (that is booting kernel) for Overo computer.

So I tried also native compilation using Linaro GCC 4.5 but it is
not working. I wonder has anyone face the same issue like me,
I think I am wrong somewhere (the last time I cross compile the
kernel was pretty much straight forward and I dont remember I
had to patch the kernel I fetched from a git repository. But I will
be glad to hear who has faced similar problems like me. Any tips
will be appreciated. Even better, I will be glad to learn where did
you download (git fetch or git clone or wget or just http download),
your tool chain, your workstation (my original laptop was 32 bits
dual core DELL and now I am using a 64 bits Intel i7 so I am not
sure which set up is biting me). Any tip or link will be appreciated.

Sincerely

Aung

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] ARM: OMAP3/4: consolidate cpuidle Makefile

2012-05-30 Thread Kevin Hilman
Daniel Lezcano  writes:

> On 05/14/2012 06:42 AM, Rajendra Nayak wrote:
>> On Thursday 10 May 2012 03:32 PM, Daniel Lezcano wrote:
>>> The current Makefile compiles the cpuidle34xx.c and cpuidle44xx.c files
>>> even if the cpuidle option is not set in the kernel.
>>>
>>> This patch fixes this by creating a section in the Makefile where these
>>> files are compiled only if the CONFIG_CPU_IDLE option is set.
>>>
>>> This modification breaks an implicit dependency between CPU_IDLE and
>>> PM as
>>> they belong to the same block in the Makefile. This is fixed in the
>>> Kconfig
>>> by selecting explicitely PM is CPU_IDLE is set.
>>>
>>> The linux coding style recommend to use no-op functions in the headers
>>> when the subsystem is disabled instead of adding big section in C files.
>> 
>> Looks good to me.
>> Reviewed-by: Rajendra Nayak 
>
> Hi Kevin,
>
> I think I addressed all the points. Is it possible to consider this
> patch for inclusion ?
>

Yes.  I'll queue up as a cleanup for v3.6 with the reviewed-by from
Rajendra.

Thanks,

Kevin

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] ARM: OMAP3/4: consolidate cpuidle Makefile

2012-05-30 Thread Daniel Lezcano
On 05/30/2012 08:07 PM, Kevin Hilman wrote:
> Daniel Lezcano  writes:
> 
>> On 05/14/2012 06:42 AM, Rajendra Nayak wrote:
>>> On Thursday 10 May 2012 03:32 PM, Daniel Lezcano wrote:
 The current Makefile compiles the cpuidle34xx.c and cpuidle44xx.c files
 even if the cpuidle option is not set in the kernel.

 This patch fixes this by creating a section in the Makefile where these
 files are compiled only if the CONFIG_CPU_IDLE option is set.

 This modification breaks an implicit dependency between CPU_IDLE and
 PM as
 they belong to the same block in the Makefile. This is fixed in the
 Kconfig
 by selecting explicitely PM is CPU_IDLE is set.

 The linux coding style recommend to use no-op functions in the headers
 when the subsystem is disabled instead of adding big section in C files.
>>>
>>> Looks good to me.
>>> Reviewed-by: Rajendra Nayak 
>>
>> Hi Kevin,
>>
>> I think I addressed all the points. Is it possible to consider this
>> patch for inclusion ?
>>
> 
> Yes.  I'll queue up as a cleanup for v3.6 with the reviewed-by from
> Rajendra.

Cool !

Thanks
  -- Daniel

-- 
  Linaro.org │ Open source software for ARM SoCs

Follow Linaro:   Facebook |
 Twitter |
 Blog


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 0/2] OMAP: mailbox initial device tree support

2012-05-30 Thread Omar Ramirez Luna
Hi,

On 24 May 2012 10:44, Cousson, Benoit  wrote:
> On 5/2/2012 7:42 AM, Bedia, Vaibhav wrote:
>>
>> Hi Omar,
>>
>> On Tue, May 01, 2012 at 23:17:38, Omar Ramirez Luna wrote:
>>>
>>> To allow mailbox driver to function with device tree.
>>>
>>> Tested in OMAP4 and OMAP3. OMAP2 untested.
>>
>>
>> I think the mailbox code needs a cleanup similar to what you
>> had proposed earlier [1] before the device tree support is added.
>>
>> We probably need to decide whether the number of mailbox sub-modules
>> should be part of hwmod attribute or come from device tree. IMO the
>> static allocation of the mailboxes is better suited in the device-tree
>> data.
>
>
> Ideally yes, but that assumes we are supporting only DT boot method, which
> is still not the case today.
>
> That being said, the driver might still be able to leverage DT if available
> already.
>
>
> This can be done later as well.
>
> Omar,
> That's up to you.

Thanks for the ack on the 2nd patch.

Yes, I think these changes doesn't depend on the cleanup of the
driver, they could be included prior to them.

Regards,

Omar

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [linux-pm] [PATCH] cpuidle : use percpu cpuidle in the core code

2012-05-30 Thread Rob Lee
Hey Daniel,

Sorry for the late review/response but perhaps this will still be
useful as your cpuidle work is ongoing.

> Most of the caller are in the boot-up code, in device_init or module_init.
> The other ones are doing some specific initialization on the cpuidle_device
> (cpuinit, like acpi) and can't use the cpuidle_register function.
>

What about adding a callback pointer parameter to the cpuidle_register
function that allows platform specific device initialization to occur
before the cpuidle_device_register call is made?  For reference, see
my old cpuidle common init code that does this at
git://git.linaro.org/people/rob_lee/linux.git cpuidle_init.

With this callback, acpi and the other platforms that need to modify
the cpuidle_device data can use this interface also.  The necessary
acpi cpuidle changes can also be found at the above git URL (although
they haven't been reviewed so they are possibly flawed).

Rob

 ___
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] ARM: OMAP3/4: consolidate cpuidle Makefile

2012-05-30 Thread Kevin Hilman
Daniel Lezcano  writes:

> On 05/30/2012 08:07 PM, Kevin Hilman wrote:
>> Daniel Lezcano  writes:
>> 
>>> On 05/14/2012 06:42 AM, Rajendra Nayak wrote:
 On Thursday 10 May 2012 03:32 PM, Daniel Lezcano wrote:
> The current Makefile compiles the cpuidle34xx.c and cpuidle44xx.c files
> even if the cpuidle option is not set in the kernel.
>
> This patch fixes this by creating a section in the Makefile where these
> files are compiled only if the CONFIG_CPU_IDLE option is set.
>
> This modification breaks an implicit dependency between CPU_IDLE and
> PM as
> they belong to the same block in the Makefile. This is fixed in the
> Kconfig
> by selecting explicitely PM is CPU_IDLE is set.
>
> The linux coding style recommend to use no-op functions in the headers
> when the subsystem is disabled instead of adding big section in C files.

 Looks good to me.
 Reviewed-by: Rajendra Nayak 
>>>
>>> Hi Kevin,
>>>
>>> I think I addressed all the points. Is it possible to consider this
>>> patch for inclusion ?
>>>
>> 
>> Yes.  I'll queue up as a cleanup for v3.6 with the reviewed-by from
>> Rajendra.
>
> Cool !
>

Sorry for the lag.  Since this one patch was a bit late for 3.5, I had
it on my "to look at later" pile while tracking down various regressions
introduced in 3.5.

Kevin



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Panda HDMI issue w/ 3.5-rc?

2012-05-30 Thread John Stultz

On 05/25/2012 07:24 AM, Tomi Valkeinen wrote:

On Fri, 2012-05-25 at 19:49 +0530, S, Venkatraman wrote:

On Thu, May 24, 2012 at 10:56 PM, John Stultz  wrote:

Hey Arnd, Rob,
So after Arnd's help sorting a workaround for the mmc driver, I'm now
trying to sort out the following HDMI failure I'm seeing w/ the current
3.5-rc with my Panda Board.

[2.973693] omapdss error: HPD IRQ request failed
[2.978759] omapdss HDMI error: failed to power on device
[2.982391] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at
usb-ehci-omap.09
[2.996459] omapdss error: failed to power on
[3.001037] omapfb omapfb: Failed to enable display 'hdmi'
[3.006805] omapfb omapfb: failed to initialize default display
[3.013183] Console: switching to colour dummy device 80x30
[3.022430] omapfb omapfb: failed to setup omapfb
[3.027374] omapfb: probe of omapfb failed with error -5

Any guesses on this?


( This is just guesswork, as you asked :-) )
Apparently, request_threaded_irq requires that IRQF_ONESHOT be passed as a flag,
when the handler function is NULL.
Many drivers are facing this issue. Russell posted a patch [1] to fix
2 of them (see this patch log). Maybe DSS also requires this change.

[1] http://marc.info/?l=linux-arm-kernel&m=133785047227029&w=2

Yes, I have a fix for this in my pull request. The fbdev maintainer
hasn't responded yet to the request.



Do you have a link to your fix or your git tree so I can do some testing 
while we wait for it to be merged (HDMI still seems to be broken in 
Linus' current git)?


thanks
-john


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 1/2] Change some head files in cpuidle_kill.c for pm-qa in Android system.

2012-05-30 Thread kejun.zhou
Signed-off-by: kejun.zhou 
---
 cpuidle/cpuidle_killer.c |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c
index 67a675e..5e7320f 100644
--- a/cpuidle/cpuidle_killer.c
+++ b/cpuidle/cpuidle_killer.c
@@ -2,7 +2,19 @@
 #include 
 #include 
 #include 
+#ifndef ANDROID
 #include 
+#else
+/* 
+* As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface However, 
the kernel does.
+*/
+#include  /* for struct timex */
+#include  /* for __NR_adjtimex */
+static int adjtimex(struct timex *buf)
+{
+   return syscall(__NR_adjtimex, buf);
+}
+#endif
 #include 
 #include 
 #include 
-- 
1.7.0.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 2/2] Add Android.mk for pm-qa in Android system.

2012-05-30 Thread kejun.zhou
Signed-off-by: kejun.zhou 
---
 Android.mk|1 +
 cpufreq/Android.mk|   17 +
 cpuhotplug/Android.mk |   30 ++
 cpuidle/Android.mk|   25 +
 include/Android.mk|   17 +
 sched_mc/Android.mk   |   17 +
 suspend/Android.mk|   17 +
 thermal/Android.mk|   17 +
 utils/Android.mk  |   17 +
 9 files changed, 158 insertions(+), 0 deletions(-)
 create mode 100644 Android.mk
 create mode 100644 cpufreq/Android.mk
 create mode 100644 cpuhotplug/Android.mk
 create mode 100644 cpuidle/Android.mk
 create mode 100644 include/Android.mk
 create mode 100644 sched_mc/Android.mk
 create mode 100644 suspend/Android.mk
 create mode 100644 thermal/Android.mk
 create mode 100644 utils/Android.mk

diff --git a/Android.mk b/Android.mk
new file mode 100644
index 000..5053e7d
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1 @@
+include $(call all-subdir-makefiles)
diff --git a/cpufreq/Android.mk b/cpufreq/Android.mk
new file mode 100644
index 000..f563d25
--- /dev/null
+++ b/cpufreq/Android.mk
@@ -0,0 +1,17 @@
+include $(call all-subdir-makefiles)
+LOCAL_PATH:= $(call my-dir)
+
+module_name = cpufreq
+
+define $(module_name)_add_executable
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional 
+LOCAL_MODULE_CLASS := tests
+LOCAL_MODULE := $1.sh
+LOCAL_SRC_FILES := $1.sh
+LOCAL_MODULE_PATH := 
$(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/$(module_name)
+include $(BUILD_PREBUILT)
+endef
+
+test_num := 01 02 03 04 05 06 07 08 09
+$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, 
$(module_name)_$(item
diff --git a/cpuhotplug/Android.mk b/cpuhotplug/Android.mk
new file mode 100644
index 000..521f3ee
--- /dev/null
+++ b/cpuhotplug/Android.mk
@@ -0,0 +1,30 @@
+include $(call all-subdir-makefiles)
+LOCAL_PATH:= $(call my-dir)
+
+module_name = cpuhotplug
+
+define $(module_name)_add_executable
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional 
+LOCAL_MODULE_CLASS := tests
+LOCAL_MODULE := $1.sh
+LOCAL_SRC_FILES := $1.sh
+LOCAL_MODULE_PATH := 
$(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/$(module_name)
+include $(BUILD_PREBUILT)
+endef
+
+test_num := 01 02 03 04 05 06 07 08
+$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, 
$(module_name)_$(item
+
+define $(module_name)_etc_add_executable
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional 
+LOCAL_MODULE_CLASS := tests
+LOCAL_MODULE := $1.sh
+LOCAL_SRC_FILES := $1.sh
+LOCAL_MODULE_PATH := 
$(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/$(module_name)
+include $(BUILD_PREBUILT)
+endef
+
+test_names := 1_sanity_check z_sanity_check 
+$(foreach item,$(test_names),$(eval $(call $(module_name)_etc_add_executable, 
$(item
diff --git a/cpuidle/Android.mk b/cpuidle/Android.mk
new file mode 100644
index 000..35124d7
--- /dev/null
+++ b/cpuidle/Android.mk
@@ -0,0 +1,25 @@
+include $(call all-subdir-makefiles)
+LOCAL_PATH:= $(call my-dir)
+
+module_name = cpuidle
+
+define $(module_name)_add_executable
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional 
+LOCAL_MODULE_CLASS := tests
+LOCAL_MODULE := $1.sh
+LOCAL_SRC_FILES := $1.sh
+LOCAL_MODULE_PATH := 
$(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/$(module_name)
+include $(BUILD_PREBUILT)
+endef
+
+test_num := 01 02 03
+$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, 
$(module_name)_$(item
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := cpuidle_killer
+LOCAL_SRC_FILES:= cpuidle_killer.c
+LOCAL_STATIC_LIBRARIES := libcutils libc 
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/$(module_name)
+include $(BUILD_EXECUTABLE)
diff --git a/include/Android.mk b/include/Android.mk
new file mode 100644
index 000..6173bb4
--- /dev/null
+++ b/include/Android.mk
@@ -0,0 +1,17 @@
+include $(call all-subdir-makefiles)
+LOCAL_PATH:= $(call my-dir)
+
+module_name = include
+
+define $(module_name)_etc_add_executable
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional 
+LOCAL_MODULE_CLASS := tests
+LOCAL_MODULE := $1.sh
+LOCAL_SRC_FILES := $1.sh
+LOCAL_MODULE_PATH := 
$(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/$(module_name)
+include $(BUILD_PREBUILT)
+endef
+
+test_names := functions suspend thermal_functions
+$(foreach item,$(test_names),$(eval $(call $(module_name)_etc_add_executable, 
$(item
diff --git a/sched_mc/Android.mk b/sched_mc/Android.mk
new file mode 100644
index 000..44cee14
--- /dev/null
+++ b/sched_mc/Android.mk
@@ -0,0 +1,17 @@
+include $(call all-subdir-makefiles)
+LOCAL_PATH:= $(call my-dir)
+
+module_name = sched
+
+define $(module_name)_add_executable
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional 
+LOCAL_MODULE_CLASS := tests
+LOCAL_MODULE := $1.sh
+LOCAL_SRC_FILES := $1.sh
+

Re: [PATCH 2/2] Add Android.mk files

2012-05-30 Thread Hongbo Zhang
Yes Kejun, good suggestion from Amit.
Please let me know when you finish it, thanks.


On 30 May 2012 15:22, Amit Kucheria  wrote:

> On Wed, May 30, 2012 at 2:47 PM, kejun.zhou  wrote:
> > Signed-off-by: kejun.zhou 
> > ---
> >  Android.mk|1 +
> >  cpufreq/Android.mk|   76
> 
> >  cpuhotplug/Android.mk |   84
> +
> >  cpuidle/Android.mk|   35 
> >  include/Android.mk|   28 
> >  sched_mc/Android.mk   |   36 +
> >  suspend/Android.mk|   50 +
> >  thermal/Android.mk|   51 +
> >  utils/Android.mk  |   35 
> >  9 files changed, 396 insertions(+), 0 deletions(-)
> >  create mode 100644 Android.mk
> >  create mode 100644 cpufreq/Android.mk
> >  create mode 100644 cpuhotplug/Android.mk
> >  create mode 100644 cpuidle/Android.mk
> >  create mode 100644 include/Android.mk
> >  create mode 100644 sched_mc/Android.mk
> >  create mode 100644 suspend/Android.mk
> >  create mode 100644 thermal/Android.mk
> >  create mode 100644 utils/Android.mk
> >
> > diff --git a/Android.mk b/Android.mk
> > new file mode 100644
> > index 000..5053e7d
> > --- /dev/null
> > +++ b/Android.mk
> > @@ -0,0 +1 @@
> > +include $(call all-subdir-makefiles)
> > diff --git a/cpufreq/Android.mk b/cpufreq/Android.mk
> > new file mode 100644
> > index 000..34da7a7
> > --- /dev/null
> > +++ b/cpufreq/Android.mk
> > @@ -0,0 +1,76 @@
> > +include $(call all-subdir-makefiles)
> > +LOCAL_PATH:= $(call my-dir)
> > +
>
> This is painful to read, one section for each script. Please put it in
> a loop. Something like here:
>
> http://stackoverflow.com/questions/7651608/simplifying-an-android-mk-file-which-build-multiple-executables
>
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_01.sh
> > +LOCAL_SRC_FILES:= cpufreq_01.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_02.sh
> > +LOCAL_SRC_FILES:= cpufreq_02.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_03.sh
> > +LOCAL_SRC_FILES:= cpufreq_03.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_04.sh
> > +LOCAL_SRC_FILES:= cpufreq_04.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_05.sh
> > +LOCAL_SRC_FILES:= cpufreq_05.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_06.sh
> > +LOCAL_SRC_FILES:= cpufreq_06.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_07.sh
> > +LOCAL_SRC_FILES:= cpufreq_07.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_08.sh
> > +LOCAL_SRC_FILES:= cpufreq_08.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpufreq_09.sh
> > +LOCAL_SRC_FILES:= cpufreq_09.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpufreq
> > +include $(BUILD_PREBUILT)
> > +
> > diff --git a/cpuhotplug/Android.mk b/cpuhotplug/Android.mk
> > new file mode 100644
> > index 000..9981cfc
> > --- /dev/null
> > +++ b/cpuhotplug/Android.mk
> > @@ -0,0 +1,84 @@
> > +include $(call all-subdir-makefiles)
> > +LOCAL_PATH:= $(call my-dir)
> > +
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpuhotplug_01.sh
> > +LOCAL_SRC_FILES:= cpuhotplug_01.sh
> > +LOCAL_MODULE_TAGS := optional
> > +LOCAL_MODULE_CLASS := ETC
> > +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/cpuhotplug
> > +include $(BUILD_PREBUILT)
> > +
> > +include $(CLEAR_VARS)
> > +LOCAL_MODULE := cpuhotplug_02.sh