Hi,

I'm trying to get Android running on a n810 (OMAP2420).
Currently there is only a 2.6.21 kernel available for this platform,
and as the kernel patch to support it is rather large (>5MB, keyboard,
touchscreen, oneflash, etc) it seems easier to backport the android
2.6.23 patch.

I've managed to patch the kernel, but I'm having some issues with
power.c and alarm.c, not compiling/working.

Here's the output for power.c:

  CC      drivers/android/power.o
drivers/android/power.c:937: warning: initialization from incompatible
pointer type
drivers/android/power.c:937: warning: initialization from incompatible
pointer type
drivers/android/power.c:938: warning: initialization from incompatible
pointer type
drivers/android/power.c:938: warning: initialization from incompatible
pointer type
drivers/android/power.c:939: warning: initialization from incompatible
pointer type
drivers/android/power.c:939: warning: initialization from incompatible
pointer type
drivers/android/power.c:940: warning: initialization from incompatible
pointer type
drivers/android/power.c:940: warning: initialization from incompatible
pointer type
drivers/android/power.c:941: warning: initialization from incompatible
pointer type
drivers/android/power.c:941: warning: initialization from incompatible
pointer type
drivers/android/power.c:942: warning: initialization from incompatible
pointer type
drivers/android/power.c:943: warning: initialization from incompatible
pointer type
drivers/android/power.c:944: warning: initialization from incompatible
pointer type
drivers/android/power.c:944: warning: initialization from incompatible
pointer type
drivers/android/power.c:945: warning: initialization from incompatible
pointer type
drivers/android/power.c:946: warning: initialization from incompatible
pointer type
drivers/android/power.c:946: warning: initialization from incompatible
pointer type
drivers/android/power.c:947: warning: initialization from incompatible
pointer type
drivers/android/power.c:947: warning: initialization from incompatible
pointer type
drivers/android/power.c:948: warning: initialization from incompatible
pointer type
drivers/android/power.c: In function 'set_set_battery_level_low':
drivers/android/power.c:978: error: 'struct subsystem' has no member
named 'kobj'
drivers/android/power.c: In function
'android_power_set_battery_level':
drivers/android/power.c:1008: error: 'struct subsystem' has no member
named 'kobj'
drivers/android/power.c:1015: error: 'struct subsystem' has no member
named 'kobj'
drivers/android/power.c: In function
'android_power_set_charging_state':
drivers/android/power.c:1032: error: 'struct subsystem' has no member
named 'kobj'
drivers/android/power.c: In function 'android_power_init':
drivers/android/power.c:1111: error: 'struct subsystem' has no member
named 'kobj'
make[2]: *** [drivers/android/power.o] Error 1
make[1]: *** [drivers/android] Error 2
make: *** [drivers] Error 2


I'm a bit lost here, does anybody have a suggestion how to fix this ?

I tried a silly hack, to just set "ret = 0" and comment the line with
the error.
(this line e.g.   ret =
sysfs_create_group(&android_power_subsys.kobj,&attr_group); )

I'm able to compile and successfully run the kernel like this but I
think it's part of the problem not getting android to run.

Next problem is with alarm.c.
It complains on line 443 that there is no such member "dev" in the
struct alarm_rtc_dec. Checking the code, there really is none, but
there is rtc_dev.
I replaced dev with rtc_dev which compiles fine, but with the
following warnings:

  CC      drivers/android/alarm.o
drivers/android/alarm.c: In function 'alarm_ioctl':
drivers/android/alarm.c:200: warning: passing argument 1 of
'rtc_set_time' from incompatible pointer type
drivers/android/alarm.c: In function 'alarm_suspend':
drivers/android/alarm.c:324: warning: passing argument 1 of
'rtc_read_time' from incompatible pointer type
drivers/android/alarm.c:340: warning: passing argument 1 of
'rtc_set_alarm' from incompatible pointer type
drivers/android/alarm.c:341: warning: passing argument 1 of
'rtc_read_time' from incompatible pointer type
drivers/android/alarm.c:352: warning: passing argument 1 of
'rtc_set_alarm' from incompatible pointer type
drivers/android/alarm.c: In function 'alarm_resume':
drivers/android/alarm.c:376: warning: passing argument 1 of
'rtc_set_alarm' from incompatible pointer type
drivers/android/alarm.c: In function 'rtc_alarm_add_device':
drivers/android/alarm.c:404: warning: initialization from incompatible
pointer type
drivers/android/alarm.c:421: warning: passing argument 1 of
'rtc_irq_register' from incompatible pointer type
drivers/android/alarm.c: In function 'rtc_alarm_remove_device':
drivers/android/alarm.c:443: warning: comparison of distinct pointer
types lacks a cast
drivers/android/alarm.c:444: warning: passing argument 1 of
'rtc_irq_unregister' from incompatible pointer type


While running Android I get errors like:
writev(3, [{"\5", 1}, {"runtime\0", 8}, {"Unable to read rtc,
Connection refused\n\0", 40}], 3) = 49
writev(3, [{"\5", 1}, {"runtime\0", 8}, {"Invalid time detected, 0 set
to 1167652800\n\0", 44}], 3) = 53

I'm not sure if this is related to the warnings with alarm.c or not
having selected an RTC driver... RTC is disabled in the n810 kernel, I
had to turn it on in order to get the Android power driver to compile.
The rtc driver required for the n810 is cbus/retu-rtc.

Here are some more errors I get when running Android:

05:24:30.543243 writev(3, [{"\4", 1}, {"runtime\0", 8}, {"Binder
driver opened.  Multiprocess enabled.\n\0", 46}], 3) = 55
05:24:30.545471 socket(PF_FILE, SOCK_STREAM, 0) = 7
05:24:30.546661 connect(7, {sa_family=AF_FILE, [EMAIL PROTECTED],
17) = -1 ECONNREFUSED (Connection refused)
05:24:30.548065 close(7)                = 0
05:24:30.549468 nanosleep({0, 500000000}, {0, 500000000}) = 0
05:24:31.069976 socket(PF_FILE, SOCK_STREAM, 0) = 7
05:24:31.089874 connect(7, {sa_family=AF_FILE, [EMAIL PROTECTED],
17) = -1 ECONNREFUSED (Connection refused)
05:24:31.122680 close(7)                = 0
05:24:31.154693 nanosleep({0, 500000000}, {0, 500000000}) = 0
05:24:31.688690 socket(PF_FILE, SOCK_STREAM, 0) = 7
05:24:31.719451 connect(7, {sa_family=AF_FILE, [EMAIL PROTECTED],
17) = -1 ECONNREFUSED (Connection refused)
05:24:31.753356 close(7)                = 0

[pid  1997] 05:24:50.644226 clock_gettime(CLOCK_MONOTONIC, {1121,
879119873}) = 0
[pid  1997] 05:24:50.649658 writev(3, [{"\4", 1}, {"ServiceManager\0",
15}, {"ServiceManager: unable to find service activity\n\0", 49}], 3)
= 65
[pid  1997] 05:24:50.657257 writev(3, [{"\4", 1}, {"runtime\0", 8},
{"Still waiting for activity manager...\0", 38}], 3) = 47
[pid  1997] 05:24:50.664642 writev(3, [{"\4", 1}, {"ServiceManager\0",
15}, {"ServiceManager: waiting for service activity\n\0", 46}], 3) =
62
[pid  1997] 05:24:50.671203 clock_gettime(CLOCK_MONOTONIC, {1121,
904937744}) = 0
[pid  1997] 05:24:50.677612 clock_gettime(CLOCK_MONOTONIC, {1121,
911346435}) = 0
[pid  1997] 05:24:50.683349 clock_gettime(CLOCK_MONOTONIC, {1121,
917114257}) = 0
[pid  1997] 05:24:50.688476 futex(0x12574, FUTEX_WAIT, -2, {4,
987000000}) = -1 ETIMEDOUT (Connection timed out)

[pid  1997] 05:25:18.586242 futex(0x12574, FUTEX_WAIT, -2, {4,
998000000}fatal error opening "/sys/android_power/
acquire_partial_wake_lock"


After some:
[pid  2006] 05:25:40.860534 ioctl(6, 0xc0186201 <unfinished ...>
[pid  2007] 05:25:40.860931 <... getpid resumed> ) = 1997
[pid  2007] 05:25:40.874633 getuid32()  = 0
[pid  2007] 05:25:40.875488 ioctl(6, 0xc0186201, 0x408ffc20) = 0
[pid  2007] 05:25:40.878051 ioctl(6, 0xc0186201, 0x408ffc20) = 0
[pid  2007] 05:25:40.878662 ioctl(6, 0xc0186201, 0x408ffda8) = 0
[pid  2007] 05:25:40.894439 ioctl(6, 0xc0186201

There is no more output.


If somebody could please give me some tips on how to solve this that
would great :-).

Thanks


regards,
Georges Toth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Internals" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/android-internals?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to