Android on Nokia n810 (OMAP2420)

348 views
Skip to first unread message

sim0nx

unread,
Apr 1, 2008, 10:16:01 AM4/1/08
to Android Internals
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, path=@android.zygote},
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, path=@android.zygote},
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, path=@android.zygote},
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

Nishanth Menon

unread,
Apr 1, 2008, 7:38:15 PM4/1/08
to android-...@googlegroups.com
sim0nx said the following on 04/01/2008 09:16 AM:

> 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.
>
There are folks who got OMAP3430, OMAP2430, OMAP5912 working.. I
personally have not tried though, these might interest you possibly (you
probably know of these):
Instructions on downloading the latest kernel:
http://www.muru.com/linux/omap/README_OMAP_GIT - use the git and u get
the latest kernel.
Wiki on OMAP Android: http://elinux.org/Android_on_OMAP
Mailing List for linux omap:
http://vger.kernel.org/vger-lists.html#linux-omap
Discussions on Android port for OMAP:
http://marc.info/?l=linux-omap&w=2&r=1&s=android&q=b

If you do have any docs on these, it is helpful if you could post in the
OMAP ML also. you will find a lot of interested blokes in the list too.

Regards,
Nishanth Menon

stolzi

unread,
Apr 2, 2008, 6:12:38 AM4/2/08
to Android Internals
I'm also working on a back port of android to maemo 2.6.21 kernel.

I was able to make the necessary changes to power.c and alarm.c. I
don't have the sources available here now but it was mainly about
having a look at the first parameter (which is a Linux type) and how
its type has changed from 2.6.21 to 2.6.23. You will have to change
the functions and then there was a bunch of macros eventually defining
some functions. Those need to be adopdet to older types too. I can
come back with a diff later.

Also important is to disable framebuffer manual update. The line
CONFIG_FB_OMAP_MANUAL_UPDATE=y
should become
#CONFIG_FB_OMAP_MANUAL_UPDATE is not set
. Otherwise you will only see a frozen red eye.

Currently I'm having the problem that the runtime process is crashing
because of some weird bus error and I can't see (from the strace
outputs) what's causing it.

Cheers,
Sebastian

sim0nx

unread,
Apr 2, 2008, 8:16:18 AM4/2/08
to Android Internals
> There are folks who got OMAP3430, OMAP2430, OMAP5912 working.. I
> personally have not tried though, these might interest you possibly (you
> probably know of these):
> Instructions on downloading the latest kernel:
> http://www.muru.com/linux/omap/README_OMAP_GIT - use the git and u get
> the latest kernel.
> Wiki on OMAP Android: http://elinux.org/Android_on_OMAP
> Mailing List for linux omap:
> http://vger.kernel.org/vger-lists.html#linux-omap
> Discussions on Android port for OMAP:
> http://marc.info/?l=linux-omap&w=2&r=1&s=android&q=b

Thank you
But indeed I already know those sites.... elinux.org was especially
helpful for getting started with this :-)


> If you do have any docs on these, it is helpful if you could post in the
> OMAP ML also. you will find a lot of interested blokes in the list too.

Should I manage to get any further on this with the n810 I'll gladly
contribute any info back :-)

sim0nx

unread,
Apr 2, 2008, 8:30:04 AM4/2/08
to Android Internals
> I'm also working on a back port of android to maemo 2.6.21 kernel.

Great ! :-)

> I was able to make the necessary changes to power.c and alarm.c. I
> don't have the sources available here now but it was mainly about
> having a look at the first parameter (which is a Linux type) and how
> its type has changed from 2.6.21 to 2.6.23. You will have to change
> the functions and then there was a bunch of macros eventually defining
> some functions. Those need to be adopdet to older types too. I can
> come back with a diff later.

I'll have a look at the code again and try that.
It would be nice if you could send me your diff anyway please :-)


> Also important is to disable framebuffer manual update. The line
> CONFIG_FB_OMAP_MANUAL_UPDATE=y
> should become
> #CONFIG_FB_OMAP_MANUAL_UPDATE is not set
> . Otherwise you will only see a frozen red eye.

Thanks, I've changed that.

Have you done any other changes, e.g. in the framebuffer driver or
regarding rtc ?

stolzi

unread,
Apr 2, 2008, 9:37:27 AM4/2/08
to Android Internals
Actually I first started working with the m5 android kernel and ported
all the drivers mainly following the android on OMAP guide on
elinux.org. But I couldn't solve the fb panning problem mentioned
there, even not with the proposed fix. It seems the lcd driver is not
providing enough memory for a double sized fb buffer.
Because of that I started working on the m3 android kernel which seems
to be able to get along with a simple fb. As said before I can see the
moving red eye.

Other kernel files I had fix or change are only those mentioned in the
android on OMAP guide.

I will prepare the diffs as soon as I can.

Anil Sasidharan

unread,
Apr 2, 2008, 10:36:12 AM4/2/08
to android-...@googlegroups.com
Hi,

What version of the Android SDK is tried on your board. I've got
it working on my OMAP2430 platform with m5-rc14 version whereas the
eralier version (m3-rc20) was giving all sorts of issues.

Warm Regards,
Anil

sim0nx

unread,
Apr 2, 2008, 10:55:13 AM4/2/08
to Android Internals
> Actually I first started working with the m5 android kernel and ported
> all the drivers mainly following the android on OMAP guide on
> elinux.org. But I couldn't solve the fb panning problem mentioned
> there, even not with the proposed fix. It seems the lcd driver is not
> providing enough memory for a double sized fb buffer.
> Because of that I started working on the m3 android kernel which seems
> to be able to get along with a simple fb. As said before I can see the
> moving red eye.

Ah ok
Are you only using the m3 kernel or also the m3 userspace files ?


> I will prepare the diffs as soon as I can.

Thank you ! :-)

sim0nx

unread,
Apr 2, 2008, 11:06:38 AM4/2/08
to Android Internals
Hi,

> What version of the Android SDK is tried on your board. I've got
> it working on my OMAP2430 platform with m5-rc14 version whereas the
> eralier version (m3-rc20) was giving all sorts of issues.

I'm using the m5-rc15 sdk, and a 2.6.21 kernel with the m5-rc14
android patches (couldn't find the m5-rc15 kernel sources online).


regards,
Georges Toth

stolzi

unread,
Apr 2, 2008, 6:18:19 PM4/2/08
to Android Internals
Yes I'm working with m3 ramdisk and data and system images (manually
extracted from emulator).
I have as well the m5 environment ready for testing, but have worked
on m3 the last days because of the fb problems.
Anyway I got the same bus error problem on m5.

BTW I'm working with a multi boot manager and boot Maemo from MMC,
then I open a ssh session to get a terminal even when UI on target is
gone, then I stop Maemo's UI (hildon, x-server, etc) and start android
(which resides on the same mmc).
This is the strace output of the runtime forked process which seems to
be responsible for the closing of the runtime process. Runtime is
looping through the proc folders of all running processes and seems to
be searching for certain process and probably doesn't find it and
closes.
(.... read on for the promised m3 diff ....)

....
23:05:10.421783 open("/proc/1653/stat", O_RDONLY|O_LARGEFILE) = 25
23:05:10.422576 read(25, "1653 (strace) S 1646 1646 1443 34817 1657
4194304 143 0 7 0 0 2 0 0 24 0 1 0 22327 950272 107 4294967295 32768
708220 3196593616 3196588344 253660 0 0 3166215 0 3221610804 0 0 17 0
0 0 0\n", 255) = 187
23:05:10.425201 close(25) = 0
23:05:10.426818 open("/proc/1654/stat", O_RDONLY|O_LARGEFILE) = 25
23:05:10.427612 read(25, "1654 (strace) S 1646 1646 1443 34817 1657
4194304 140 0 5 0 8 26 0 0 15 0 1 0 22330 950272 109 4294967295 32768
708220 3198956960 3198951688 253660 0 0 3166215 0 3221610804 0 0 17 0
0 0 0\n", 255) = 188
23:05:10.430450 close(25) = 0
23:05:10.431854 open("/proc/1655/stat", O_RDONLY|O_LARGEFILE) = 25
23:05:10.432647 read(25, "1655 (strace) S 1646 1646 1443 34817 1657
4194304 141 0 5 0 3 7 0 0 24 0 1 0 22333 950272 110 4294967295 32768
708220 3203679664 3203674392 253660 0 0 3166215 0 3221610804 0 0 17 0
0 0 0\n", 255) = 187
23:05:10.435272 close(25) = 0
23:05:10.437286 --- SIGBUS (Bus error) @ 0 (0) ---
23:05:10.438507 sigaction(SIGUSR1, {SIG_IGN}, {SIG_DFL}, 0x41052220) =
0
23:05:10.440399 gettid() = 1671
23:05:10.442626 socket(PF_FILE, SOCK_STREAM, 0) = 25
23:05:10.444732 connect(25, {sa_family=AF_FILE,
path=@android:debuggerd}, 20) = 0
23:05:10.446014 write(25, "\207\6\0\0", 4) = 4
23:05:10.446563 read(25, 0x107ffa64, 1) = ? ERESTARTSYS (To be
restarted)
23:05:10.476989 +++ killed by SIGKILL +++



Here is my diff for m3. Adopting it to m5 should be a minor issue as I
started with m5 and went then on to m3. The m5 kernel lies on a
another PC which I couldn't reach today. If necessary I can add the
diff later this week.
Please keep in mind that my patches are not cleaned up and may contain
lots of commented code. Most of it is marked with a "ses" or "SES". If
you find any bug feel free to report asap ... it might help me with
the problems I have.

################## START OF DIFF ###############################

diff -r kernel-source-rx-34-2.6.21.0/arch/arm/Kconfig kernel-source-
rx-34-2.6.21.0_android/arch/arm/Kconfig
1007a1008,1009
> source "drivers/android/Kconfig"
>
diff -r kernel-source-rx-34-2.6.21.0/arch/arm/configs/
nokia_2420_defconfig kernel-source-rx-34-2.6.21.0_android/arch/arm/
configs/nokia_2420_defconfig
781c781
< CONFIG_TOUCHSCREEN_TSC2005=y
---
> # CONFIG_TOUCHSCREEN_TSC2005 is not set
1052,1054c1052,1054
< # CONFIG_FB_CFB_FILLRECT is not set
< # CONFIG_FB_CFB_COPYAREA is not set
< # CONFIG_FB_CFB_IMAGEBLIT is not set
---
> CONFIG_FB_CFB_FILLRECT=y
> CONFIG_FB_CFB_COPYAREA=y
> CONFIG_FB_CFB_IMAGEBLIT=y
1058,1059c1058,1059
< # CONFIG_FB_MODE_HELPERS is not set
< # CONFIG_FB_TILEBLITTING is not set
---
> CONFIG_FB_MODE_HELPERS=y
> CONFIG_FB_TILEBLITTING=y
1069c1069
< CONFIG_FB_OMAP_MANUAL_UPDATE=y
---
> #SES CONFIG_FB_OMAP_MANUAL_UPDATE=y
1337c1337,1338
< # CONFIG_RTC_CLASS is not set
---
> #SES CONFIG_RTC_CLASS is not set
> CONFIG_RTC_CLASS=y
1353a1355,1374
> # Android
> #
> # CONFIG_ANDROID_GADGET is not set
> # CONFIG_ANDROID_RAM_CONSOLE is not set
> CONFIG_ANDROID_POWER=y
> CONFIG_ANDROID_LOGGER=y
>
>
> #
> # SES Android
> #
> # CONFIG_ANDROID_GADGET is not set
> # CONFIG_ANDROID_RAM_CONSOLE is not set
> # CONFIG_ANDROID_POWER=y
> # CONFIG_ANDROID_POWER_STAT=y
> # CONFIG_ANDROID_LOGGER=y
> # CONFIG_ANDROID_TIMED_GPIO is not set
> # CONFIG_ANDROID_BINDER_IPC=y
>
> #
1356c1377
< CONFIG_EXT2_FS=m
---
> CONFIG_EXT2_FS=y
1368c1389
< CONFIG_FS_MBCACHE=m
---
> CONFIG_FS_MBCACHE=y
1422a1444,1456
>
> #SES yaffs
> CONFIG_YAFFS_FS=y
> CONFIG_YAFFS_YAFFS1=y
> # CONFIG_YAFFS_DOES_ECC is not set
> CONFIG_YAFFS_YAFFS2=y
> CONFIG_YAFFS_AUTO_YAFFS2=y
> # CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
> CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
> # CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
> # CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
> CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
>
Only in kernel-source-rx-34-2.6.21.0_android/arch/arm/configs:
nokia_2420_defconfig_android~
Only in kernel-source-rx-34-2.6.21.0_android/arch/arm/configs:
nokia_2420_defconfig_fb_problems
Only in kernel-source-rx-34-2.6.21.0_android/arch/arm/configs:
nokia_2420_defconfig_first_running_kernel
Only in kernel-source-rx-34-2.6.21.0_android/arch/arm/configs:
nokia_2420_defconfig_orig
Only in kernel-source-rx-34-2.6.21.0_android/arch/arm/configs:
nokia_2420_defconfig~
diff -r kernel-source-rx-34-2.6.21.0/arch/arm/kernel/process.c kernel-
source-rx-34-2.6.21.0_android/arch/arm/kernel/process.c
385a386,395
> /*
> * Capture the user space registers if the task is not running (in user space)
> */
> int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
> {
> struct pt_regs ptregs = *task_pt_regs(tsk);
> elf_core_copy_regs(regs, &ptregs);
> return 1;
> }
>
diff -r kernel-source-rx-34-2.6.21.0/arch/arm/kernel/signal.c kernel-
source-rx-34-2.6.21.0_android/arch/arm/kernel/signal.c
545a546,553
> // if (regs->ARM_ORIG_r0 == -ERESTARTNOHAND ||
> // regs->ARM_ORIG_r0 == -ERESTARTSYS ||
> // regs->ARM_ORIG_r0 == -ERESTARTNOINTR ||
> // regs->ARM_ORIG_r0 == -ERESTART_RESTARTBLOCK) {
> // /* the syscall cannot be safely restarted, return -EINTR instead */
> // regs->ARM_r0 = -EINTR;
> // return;
> // }
663a672
> // regs->ARM_r0 = -EAGAIN; /* prevent multiple restarts */
Only in kernel-source-rx-34-2.6.21.0_android: build.log
diff -r kernel-source-rx-34-2.6.21.0/drivers/Kconfig kernel-source-
rx-34-2.6.21.0_android/drivers/Kconfig
88a89,90
> source "drivers/android/Kconfig"
>
diff -r kernel-source-rx-34-2.6.21.0/drivers/Makefile kernel-source-
rx-34-2.6.21.0_android/drivers/Makefile
87a88,89
> obj-y += android/
> obj-$(CONFIG_BINDER) += binder/
Only in kernel-source-rx-34-2.6.21.0_android/drivers: android
Only in kernel-source-rx-34-2.6.21.0_android/drivers: binder
diff -r kernel-source-rx-34-2.6.21.0/drivers/char/Kconfig kernel-
source-rx-34-2.6.21.0_android/drivers/char/Kconfig
1078a1079,1084
> config BINDER
> tristate "OpenBinder IPC Driver"
> default n
> help
> from openbinder.org
>
diff -r kernel-source-rx-34-2.6.21.0/drivers/input/evdev.c kernel-
source-rx-34-2.6.21.0_android/drivers/input/evdev.c
23a24,26
> #ifdef CONFIG_ANDROID_POWER
> #include <linux/android_power.h>
> #endif
43a47,49
> #ifdef CONFIG_ANDROID_POWER
> android_suspend_lock_t suspend_lock;
> #endif
47a54,63
> #ifdef CONFIG_ANDROID_POWER
> static void do_gettimeofday_monotonic(struct timeval *tv)
> {
> struct timespec ts;
> ktime_get_ts(&ts);
> tv->tv_sec = ts.tv_sec;
> tv->tv_usec = ts.tv_nsec / 1000;
> }
> #endif
>
55a72,75
> #ifdef CONFIG_ANDROID_POWER
> android_lock_suspend_auto_expire(&list->suspend_lock, 5 * HZ);
> do_gettimeofday_monotonic(&list->buffer[list->head].time);
> #else
56a77
> #endif
65a87,90
> #ifdef CONFIG_ANDROID_POWER
> android_lock_suspend_auto_expire(&list->suspend_lock, 5 * HZ);
> do_gettimeofday_monotonic(&list->buffer[list->head].time);
> #else
66a92
> #endif
122a149,152
> #ifdef CONFIG_ANDROID_POWER
> android_uninit_suspend_lock(&list->suspend_lock);
> #endif
>
123a154
>
137a169,173
> #ifdef CONFIG_ANDROID_POWER
> list->suspend_lock.name = "evdev";
> android_init_suspend_lock(&list->suspend_lock);
> #endif
>
294a331,334
> #ifdef CONFIG_ANDROID_POWER
> if(list->head == list->tail)
> android_unlock_suspend(&list->suspend_lock);
> #endif
Only in kernel-source-rx-34-2.6.21.0_android/drivers/input: evdev.c~
diff -r kernel-source-rx-34-2.6.21.0/drivers/misc/Kconfig kernel-
source-rx-34-2.6.21.0_android/drivers/misc/Kconfig
124a125,130
> config LOW_MEMORY_KILLER
> tristate "Low Memory Killer"
> ---help---
> Register processes to be killed when memory is low.
>
>
diff -r kernel-source-rx-34-2.6.21.0/drivers/misc/Makefile kernel-
source-rx-34-2.6.21.0_android/drivers/misc/Makefile
14a15
> obj-$(CONFIG_LOW_MEMORY_KILLER) += lowmemorykiller/
Only in kernel-source-rx-34-2.6.21.0_android/drivers/misc:
lowmemorykiller
Only in kernel-source-rx-34-2.6.21.0_android/drivers/video: fbmem.c~
Only in kernel-source-rx-34-2.6.21.0_android/drivers/video:
goldfishfb.c
diff -r kernel-source-rx-34-2.6.21.0/drivers/video/omap/omapfb_main.c
kernel-source-rx-34-2.6.21.0_android/drivers/video/omap/omapfb_main.c
35a36,38
> //ses
> #include <linux/sched.h>
>
202a206
> //def_size = def_vxres * def_vyres * 2 * bpp / 8; //ses page flipping hack
267c271,272
< static void omapfb_sync(struct fb_info *info);
---
> //ses static void omapfb_sync(struct fb_info *info);
> static int omapfb_sync(struct fb_info *info);
400c405,406
< static void omapfb_sync(struct fb_info *fbi)
---
> //ses static void omapfb_sync(struct fb_info *fbi)
> static int omapfb_sync(struct fb_info *fbi)
407a414,416
> //else
> // wait_event_timeout(ses_wait, false, HZ / 15);
>
408a418,419
>
> return 0;
446a458
> //fix->ypanstep = 1; //ses page flipping hack
1119a1132
> //omapfb_sync(fbi);
1230a1244,1253
> //ses added for fake vsync
> // case FBIO_WAITFORVSYNC:
> /*if (get_user(pipe, (__u32 __user *)arg))
> return -EFAULT;
>
> retval = intelfbhw_wait_for_vsync(dinfo, pipe);*/
> //omapfb_sync(fbi);
> // wait_event_timeout(fbdev->ses_wait, false, HZ / 15);
>
> // break;
1263a1287
> .fb_sync = omapfb_sync, //ses fake vsync
1501a1526
> //var->yres_virtual = def_vyres * 2; //ses page flipping hack
1796a1822,1823
> init_waitqueue_head(&fbdev->ses_wait); //ses fake vsync
>
1943c1970
<
---
>
Only in kernel-source-rx-34-2.6.21.0_android/drivers/video/omap:
omapfb_main.c~
diff -r kernel-source-rx-34-2.6.21.0/fs/Kconfig kernel-source-
rx-34-2.6.21.0_android/fs/Kconfig
1191a1192,1194
> # Patched by YAFFS
> source "fs/yaffs2/Kconfig"
>
diff -r kernel-source-rx-34-2.6.21.0/fs/Makefile kernel-source-
rx-34-2.6.21.0_android/fs/Makefile
116a117,119
>
> # Patched by YAFFS
> obj-$(CONFIG_YAFFS_FS) += yaffs2/
diff -r kernel-source-rx-34-2.6.21.0/fs/inotify_user.c kernel-source-
rx-34-2.6.21.0_android/fs/inotify_user.c
33a34,36
> #ifdef CONFIG_ANDROID_POWER
> #include <linux/android_power.h>
> #endif
83a87,89
> #ifdef CONFIG_ANDROID_POWER
> android_suspend_lock_t suspend_lock;
> #endif
159a166,168
> #ifdef CONFIG_ANDROID_POWER
> android_uninit_suspend_lock(&dev->suspend_lock);
> #endif
303a313,315
> #ifdef CONFIG_ANDROID_POWER
> android_lock_suspend_auto_expire(&dev->suspend_lock, 5 * HZ);
> #endif
320a333,336
> #ifdef CONFIG_ANDROID_POWER
> if(dev->event_count == 0)
> android_unlock_suspend(&dev->suspend_lock);
> #endif
596a613,616
> #ifdef CONFIG_ANDROID_POWER
> dev->suspend_lock.name = "inotify";
> android_init_suspend_lock(&dev->suspend_lock);
> #endif
Only in kernel-source-rx-34-2.6.21.0_android/fs: yaffs2
diff -r kernel-source-rx-34-2.6.21.0/include/asm-arm/arch-omap/
omapfb.h kernel-source-rx-34-2.6.21.0_android/include/asm-arm/arch-
omap/omapfb.h
29a30,31
> #include <linux/wait.h> //ses
>
31a34,38
> //ses added for vsync support
> #ifndef FBIO_WAITFORVSYNC
> #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
> #endif
>
363a371,372
>
> wait_queue_head_t ses_wait; //ses waitqueue for fake vsync
Only in kernel-source-rx-34-2.6.21.0_android/include/asm-arm/arch-
omap: omapfb.h~
Only in kernel-source-rx-34-2.6.21.0_android/include/linux:
android_alarm.h
Only in kernel-source-rx-34-2.6.21.0_android/include/linux:
android_gadget.h
Only in kernel-source-rx-34-2.6.21.0_android/include/linux:
android_power.h
Only in kernel-source-rx-34-2.6.21.0_android/include/linux:
android_timed_gpio.h
Only in kernel-source-rx-34-2.6.21.0_android/include/linux:
anon_inodes.h
Only in kernel-source-rx-34-2.6.21.0_android/include/linux:
binder_module.h
Only in kernel-source-rx-34-2.6.21.0_android/include/linux:
binder_type_constants.h
diff -r kernel-source-rx-34-2.6.21.0/include/linux/list.h kernel-
source-rx-34-2.6.21.0_android/include/linux/list.h
428a429,439
> * list_first_entry - get the first element from a list
> * @ptr: the list head to take the element from.
> * @type: the type of the struct this is embedded in.
> * @member: the name of the list_struct within the struct.
> *
> * Note, that list is expected to be not empty.
> */
> #define list_first_entry(ptr, type, member) \
> list_entry((ptr)->next, type, member)
>
> /**
Only in kernel-source-rx-34-2.6.21.0_android/include/linux: logger.h
diff -r kernel-source-rx-34-2.6.21.0/kernel/power/process.c kernel-
source-rx-34-2.6.21.0_android/kernel/power/process.c
16a17,19
> #ifdef CONFIG_ANDROID_POWER
> #include <linux/android_power.h>
> #endif
133a137,140
> #ifdef CONFIG_ANDROID_POWER
> if (todo && !android_power_is_driver_suspended())
> break;
> #endif
149a157
> show_state();


######################### END OF DIFF ########################

stolzi

unread,
Apr 2, 2008, 6:52:56 PM4/2/08
to Android Internals
Sorry, my last diff was useless. I prepared a kernel patch which you
can download from here:
http://www.sebastian-stolzenberg.de/android/maemo_to_android_m3.patch.bz2

sim0nx

unread,
Apr 2, 2008, 8:04:08 PM4/2/08
to Android Internals
> Yes I'm working with m3 ramdisk and data and system images (manually
> extracted from emulator).
> I have as well the m5 environment ready for testing, but have worked
> on m3 the last days because of the fb problems.
> Anyway I got the same bus error problem on m5.

I've applied your patch (from the second mail) and booted with the new
kernel, using a m5 environment (don't have the m3 one at hand).
Android starts exactly the same as before and freezes at the same
place, the display stays blank.
I'm wondering if that could be because of me using the m5 env. ?

Also I'm using the m5 binder.c file as there are some errors with the
binder/* files which I'm not able to solve correctly:
drivers/binder/binder.c: In function 'create_pools':
drivers/binder/binder.c:346: error: too few arguments to function
'kmem_cache_create'
drivers/binder/binder.c:348: error: too few arguments to function
'kmem_cache_create'
drivers/binder/binder.c:350: error: too few arguments to function
'kmem_cache_create'
drivers/binder/binder.c:352: error: too few arguments to function
'kmem_cache_create'
drivers/binder/binder.c:354: error: too few arguments to function
'kmem_cache_create'
drivers/binder/binder.c:356: error: too few arguments to function
'kmem_cache_create'

I don't think that is a problem as android reports having successfully
opened binder.


> BTW I'm working with a multi boot manager and boot Maemo from MMC,
> then I open a ssh session to get a terminal even when UI on target is
> gone, then I stop Maemo's UI (hildon, x-server, etc) and start android
> (which resides on the same mmc).

I boot the maemo using the flasher.
I've disabled certain programs so only Xomap and the applet-bar
starts.
Once the wireless connection is up, I ssh into the maemo and kill the
rest (dbus, hald, Xomap,...).
Android is on a ext2 formatted miniSD card.
So I just mount proc + sysfs, followed by chrooting + starting
android.

Should be pretty much the same as you do it :-)

sim0nx

unread,
Apr 2, 2008, 8:04:39 PM4/2/08
to Android Internals
On Apr 3, 12:52 am, stolzi <sebastian.stolzenb...@googlemail.com>
wrote:
> Sorry, my last diff was useless. I prepared a kernel patch which you
> can download from here:http://www.sebastian-stolzenberg.de/android/maemo_to_android_m3.patch...

Thank you !

kojiran

unread,
Apr 2, 2008, 10:27:58 PM4/2/08
to Android Internals
Hi.

> binder/* files which I'm not able to solve correctly:

- transaction_cache = kmem_cache_create("binder_transaction_t",
sizeof(binder_transaction_t)+pad, 0, cache_flags,
transaction_slab_xtor);
- if (!transaction_cache) return -ENOMEM;
- thread_cache = kmem_cache_create("binder_thread_t",
sizeof(binder_thread_t)+pad, 0, cache_flags, thread_slab_xtor);
- if (!thread_cache) return -ENOMEM;
- node_cache = kmem_cache_create("binder_node_t", sizeof(binder_node_t)
+pad, 0, cache_flags, node_slab_xtor);
- if (!node_cache) return -ENOMEM;
- local_mapping_cache = kmem_cache_create("local_mapping_t",
sizeof(local_mapping_t)+pad, 0, cache_flags, local_mapping_slab_xtor);
- if (!local_mapping_cache) return -ENOMEM;
- reverse_mapping_cache = kmem_cache_create("reverse_mapping_t",
sizeof(reverse_mapping_t)+pad, 0, cache_flags,
reverse_mapping_slab_xtor);
- if (!reverse_mapping_cache) return -ENOMEM;
- range_map_cache = kmem_cache_create("range_map_t",
sizeof(range_map_t)+pad, 0, cache_flags, range_map_slab_xtor);
+ transaction_cache = kmem_cache_create("binder_transaction_t",
sizeof(binder_transaction_t)+pad, 0, cache_flags,
transaction_slab_xtor, transaction_slab_xtor);
+ if (!transaction_cache) return -ENOMEM;
+ thread_cache = kmem_cache_create("binder_thread_t",
sizeof(binder_thread_t)+pad, 0, cache_flags, thread_slab_xtor,
thread_slab_xtor);
+ if (!thread_cache) return -ENOMEM;
+ node_cache = kmem_cache_create("binder_node_t", sizeof(binder_node_t)
+pad, 0, cache_flags, node_slab_xtor, node_slab_xtor);
+ if (!node_cache) return -ENOMEM;
+ local_mapping_cache = kmem_cache_create("local_mapping_t",
sizeof(local_mapping_t)+pad, 0, cache_flags, local_mapping_slab_xtor,
local_mapping_slab_xtor);
+ if (!local_mapping_cache) return -ENOMEM;
+ reverse_mapping_cache = kmem_cache_create("reverse_mapping_t",
sizeof(reverse_mapping_t)+pad, 0, cache_flags,
reverse_mapping_slab_xtor, reverse_mapping_slab_xtor);
+ if (!reverse_mapping_cache) return -ENOMEM;
+ range_map_cache = kmem_cache_create("range_map_t",
sizeof(range_map_t)+pad, 0, cache_flags, range_map_slab_xtor,
range_map_slab_xtor);

You may fix compilation errors with this patch.
In the case of me, I applied this patch and Android worked in 2.6.18
kernels.

Digit

unread,
Apr 3, 2008, 3:36:23 AM4/3/08
to android-...@googlegroups.com
for the record, rc15 compared to rc14 only provides small security patches to native image-loading libraries.
apart from that, it's the same kernel / emulator / Eclipse plugin etc... than rc14

which is why we didn't need to release new sources (they're the same) :-)

stolzi

unread,
Apr 3, 2008, 3:57:52 AM4/3/08
to Android Internals
> I've applied your patch (from the second mail) and booted with the new
> kernel, using a m5 environment (don't have the m3 one at hand).
> Android starts exactly the same as before and freezes at the same
> place, the display stays blank.
> I'm wondering if that could be because of me using the m5 env. ?

Yeah, sounds like the fb panning problem. M5 seems to be needing a
panable fb while m3 seems to get along without though it is also
complaining in the logs when the feature is missing. Maybe Digit can
comment on that .... please? Is that true or is there a way m5 runs on
a framebuffer whose virtual size equals the actual screen size? Right
now I don't care about tearing, I just want to see something.

I can't access my webspace right now, but I'm sending you my m5 patch
via mail.

Anil Sasidharan

unread,
Apr 3, 2008, 6:56:48 AM4/3/08
to Nishanth Menon, android-...@googlegroups.com
FYI


On Thu, Apr 3, 2008 at 4:25 PM, Anil Sasidharan <ani...@gmail.com> wrote:
> Hi,
>
> The basic patch I've used to bring up the Android kernel (w.r.t
> 2.6.23 kernel) is attached herewith.
>
> Warm Regards,
> Anil
>
>
>
> On Thu, Apr 3, 2008 at 1:17 PM, Nishanth Menon <menon.n...@gmail.com> wrote:
> > Anil,
> > Could you post your patches to kernel and give a w.r.t base kernel to
> > the list? it will kinda help us all..
> > Regards,
> > Nishanth Menon
> > Anil Sasidharan said the following on 04/02/2008 09:36 AM:

sim0nx

unread,
Apr 3, 2008, 1:51:49 PM4/3/08
to Android Internals
Hi,

>.....
> You may fix compilation errors with this patch.
> In the case of me, I applied this patch and Android worked in 2.6.18
> kernels.

That indeed solved the compilation error, but when booting that kernel
there was no binder device.
I've verified that it got built in though...
Maybe some more stuff needs to be patched... anyway the binder.c from
m5 seems to work just fine, thus I'm using that one.

sim0nx

unread,
Apr 3, 2008, 2:01:00 PM4/3/08
to Android Internals
I setup an m3 environment on the maemo and started android in that one
using your m3 patch (and the binder from m5).
The startup looks differently and I get 2 errors now:

18:45:31.912902 socket(PF_FILE, SOCK_STREAM, 0) = 3
18:45:31.914093 connect(3, {sa_family=AF_FILE,
path=@property_service}, 19) = -1 ECONNREFUSED (Connection refused)

and the following more serious one:

pid 2077] 18:45:34.457946 writev(3, [{"\4", 1}, {"runtime\0", 8},
{"Display startup: 1 devices\n\0", 28}], 3 <unfinished ...>
[pid 2088] 18:45:34.459808 getpriority(PRIO_PROCESS, 0
<unfinished ...>
[pid 2087] 18:45:34.460845 ioctl(6, 0xc0186201 <unfinished ...>
[pid 2077] 18:45:34.461853 <... writev resumed> ) = 37
[pid 2088] 18:45:34.462585 <... getpriority resumed> ) = 30
[pid 2087] 18:45:34.463287 <... ioctl resumed> , 0x100ffda8) = 0
[pid 2102] 18:45:35.155273 syscall_983045(0x102fff80, 0, 0x20, 0,
0x102fff80, 0x14098, 0xa9d25ef9, 0xf0005, 0x100ffd90, 0xafe36e70,
0xa9d25ef9, 0x1, 0, 0x102fff68, 0xafe0b238, 0xafe0949c, 0x60000010,
0x102fff80, 0, 0, 0xc764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
<unfinished ...>
[pid 2077] 18:45:35.160156 getpid( <unfinished ...>
[pid 2088] 18:45:35.161224 ioctl(6, 0xc0186201******** NO FRAMEBUFFER
VSYNC WAIT IOCTL **************
<unfinished ...>
.....
[pid 2077] 18:45:35.715148 writev(3, [{"\3", 1}, {"runtime\0", 8},
{"DisplayDevice::shutDown\n\0", 25}], 3) = 34
[pid 2077] 18:45:35.739685 writev(3, [{"\3", 1}, {"runtime\0", 8},
{"DisplayDevice::detach\n\0", 23}], 3) = 32

That's really strange as I'm using your patch...hmm


> I can't access my webspace right now, but I'm sending you my m5 patch
> via mail.

Thanks, I'll test it now...

sim0nx

unread,
Apr 3, 2008, 2:03:00 PM4/3/08
to Android Internals
> [pid 2088] 18:45:35.161224 ioctl(6, 0xc0186201******** NO FRAMEBUFFER
> VSYNC WAIT IOCTL **************

Ah, according to http://www.android-internals.org/index.php?title=Nokia_770
that is normal.
Still the display stays blank, doesn't even flicker or something, and
as one can see in the logs, the device is closed again.

sim0nx

unread,
Apr 3, 2008, 3:07:12 PM4/3/08
to Android Internals
Ahhhhh silly me... a quick tap on the display wakes it up and I can
finally see the red dot :-)

Sebastian, you mentioned earlier that the runtime process crashes on
your device with a bus_error and that it loops through /proc etc...
Well mine hangs, just as before, the dot keeps moving and nothing
happens.

[pid 2209] 19:55:43.341125 writev(3, [{"\4", 1}, {"ServiceManager\0",
15}, {"ServiceManager: addService(location, 0x151c0)\n\0", 47}], 3) =
63
[pid 2209] 19:55:43.342742 futex(0x134ac, FUTEX_WAKE, 2147483647) = 0
[pid 2209] 19:55:43.343292 getpriority(PRIO_PROCESS, 0) = 25
[pid 2209] 19:55:43.343780 ioctl(6, 0xc0186201, 0x100ffda8) = 0
[pid 2209] 19:55:43.365051 ioctl(6, 0xc0186201, 0x100ffef8) = 0
[pid 2209] 19:55:43.365814 writev(3, [{"\4", 1}, {"ServiceManager\0",
15}, {"ServiceManager: addService(statistics, 0x15248)\n\0", 49}], 3)
= 65
[pid 2209] 19:55:43.367523 futex(0x134ac, FUTEX_WAKE, 2147483647) = 0
...
[pid 2209] 19:55:45.322906 getpriority(PRIO_PROCESS, 0) = 20
[pid 2209] 19:55:45.326080 ioctl(6, 0xc0186201, 0x100ffda8) = 0
[pid 2209] 19:55:45.340728 ioctl(6, 0xc0186201, 0x100ffef8) = 0
[pid 2209] 19:55:45.928436 getpriority(PRIO_PROCESS, 0) = 20
[pid 2209] 19:55:45.944915 ioctl(6, 0xc0186201, 0x100ffda8) = 0
[pid 2209] 19:55:45.972900 ioctl(6, 0xc0186201 <unfinished ...>
[pid 2210] 19:55:53.744506 <... ioctl resumed> , 0x101ffef8) = 0
[pid 2210] 19:55:53.763549 getpriority(PRIO_PROCESS, 0) = 25
[pid 2210] 19:55:53.782073 ioctl(6, 0xc0186201, 0x101ffda8) = 0
[pid 2210] 19:55:53.892211 ioctl(6, 0xc0186201

The following android processes are running at that time:
2187 root 688 SW /system/bin/sh -x /a.sh
2188 root 56540 SW zygote -Xzygote /system/bin
--zygote
2190 2000 1164 SW /system/bin/dbus-daemon --system
2191 root 924 SW strace -f -ff -tt -s 200 runtime
2192 root 19516 SW runtime
2193 root 688 SW /system/bin/sh
2207 root 110908 SW system_server
2262 10004 70108 SW com.google.android.home
2264 1001 70312 SW com.google.android.phone
2268 10002 69956 SW com.google.process.content

I'm not sure how to proceed from here as there is no error output and
AFAICS no way to see why it is freezing or waiting for.
Any clue ?

stolzi

unread,
Apr 4, 2008, 1:57:21 AM4/4/08
to Android Internals
How is your work on the m5 kernel going on?

I fear that I'm at a dead end with the m3 kernel. Without knowing what
runtime is trying to do I can't solve the problem. I'm going back to
m5 and will try to fix the fb problems.

mizmit1222

unread,
Apr 4, 2008, 11:13:26 PM4/4/08
to Android Internals
Hi,

> 18:45:31.912902 socket(PF_FILE, SOCK_STREAM, 0) = 3
> 18:45:31.914093 connect(3, {sa_family=AF_FILE,
> path=@property_service}, 19) = -1 ECONNREFUSED (Connection refused)

Sounds like mmap issue. What is the root filesystem? If jffs2, the
binder
won't work correctly. Workaround is loopback mounting. This article
might be helpful.

Android Zaurus: How to create android.img
http://androidzaurus.seesaa.net/article/80730942.html

If not the case, check the binder permission. It should be 666 because
each applet on Android has own user ID.

sim0nx

unread,
Apr 5, 2008, 6:35:49 AM4/5/08
to Android Internals
> How is your work on the m5 kernel going on?

I'm not really getting anywhere as I'm not sure how to solve the fb
issue.
I'm wondering though even if the fb wouldn't be an issue if it would
work, because it doesn't with m3 and that apparently isn't much
different from m5.
Hmm

> I fear that I'm at a dead end with the m3 kernel. Without knowing what
> runtime is trying to do I can't solve the problem. I'm going back to
> m5 and will try to fix the fb problems.

Is there no way of turning on some debugging output so we could see
what the problem is ?
Maybe an Android developer could comment on this .... :-)

Please keep me updated on your progress Sebastian.

sim0nx

unread,
Apr 5, 2008, 6:57:28 AM4/5/08
to Android Internals
Hi,

> > 18:45:31.912902 socket(PF_FILE, SOCK_STREAM, 0) = 3
> > 18:45:31.914093 connect(3, {sa_family=AF_FILE,
> > path=@property_service}, 19) = -1 ECONNREFUSED (Connection refused)
>
> Sounds like mmap issue. What is the root filesystem? If jffs2, the
> binder
> won't work correctly. Workaround is loopback mounting.

I'm using an ext2 filesystem, mounted from a miniSD card.
So this shouldn't be an issue.


> If not the case, check the binder permission. It should be 666 because
> each applet on Android has own user ID.

I double checked this, but had already set it to 666.

Any more ideas what I could check ? :-)

sim0nx

unread,
Apr 5, 2008, 7:35:05 AM4/5/08
to Android Internals
I can't believe it !!!
Android runs on the maemo n810 !!!

After reading this:
http://groups.google.lu/group/android-internals/browse_thread/thread/93570c41bce07f16?hl=en
for the 100th time, and following the instructions on the mentioned
link:
http://nemustech.blogspot.com/2007/12/android-porting-to-real-target-hw.html
it works.

Here are the specifics I've implemented:
* patch /etc/init.rc
---- begin : init.rc
....
## qemu-init {
## exec /etc/qemu-init.sh
## }
network-property {
exec /etc/set_network.sh
}


/bin/chmod -R a+rw /data /tmp
/bin/chmod a+rw .
/bin/chmod -R a+rw data

# rm /dev/log (if you have)
# mkdir /dev/log;touch /dev/log/{main,events,radio}
* you can see usefull infos from strace log and /dev/log/main

and instead of:
chroot . /a.sh
I execute the android init process:
chroot . /init

Not sure yet what exactly of those steps solved the problem (maybe the
qemu one), but it does work.
After a quick try I see that the touchscreen doesn't work (the
keyboard does though), but that shouldn't be too hard to fix.

BTW, this is using an m5 kernel, and binder.c

stolzi

unread,
Apr 10, 2008, 2:18:36 AM4/10/08
to Android Internals
Great, congrats!!! I will try it on N800 as soon as I find some time
for it.

Regarding the touch screen problems:
The existing touchscreen driver propably needs to be replaced by one
that can work on fb level. See this site for details:
http://qtablet.laginen.net/doku.php. Its about porting Qt to Maemo,
but the problems are similar.

Cheers,
Sebastian

On 5 Apr., 13:35, sim0nx <Georges.T...@gmail.com> wrote:
> I can't believe it !!!
> Android runs on the maemo n810 !!!
>
> After reading this:http://groups.google.lu/group/android-internals/browse_thread/thread/...
> for the 100th time, and following the instructions on the mentioned
> link:http://nemustech.blogspot.com/2007/12/android-porting-to-real-target-...

Georges Toth

unread,
Apr 10, 2008, 6:48:25 PM4/10/08
to android-...@googlegroups.com
Hi,

> Great, congrats!!! I will try it on N800 as soon as I find some time
> for it.
>

Thanks :-)

> Regarding the touch screen problems:
> The existing touchscreen driver propably needs to be replaced by one
> that can work on fb level. See this site for details:
> http://qtablet.laginen.net/doku.php. Its about porting Qt to Maemo,
> but the problems are similar.
>

Thanks for the link...I'll check that out soon !


--
regards,

Georges Toth

mizmit1222

unread,
Apr 10, 2008, 10:35:19 PM4/10/08
to Android Internals
Hi,

Big congraturations! Great job!

I learned that OMAP 2420 has 3D hardware accelelator. Can you find
/dev/hw3d in your system? If there, how fast is your Kube running?

Kube applet is in [Demo App] - [Graphics] - [OpenGL|ES].

On my Zaurus C3000, which doesn't have any accelaletor, Kube
turns a bit slower than emulator on PC.

If /dev/hw3d is working, I guess Kube turns a lot faster than
emulator.
I should buy an N810 myself to play with Android...

By the way, regarding touchscreen issue, this discussion might be
interesting.

Android Zaurus: Touchscreen Driver - a small improvement
http://androidzaurus.seesaa.net/article/90045743.html#comment

>> Maybe you don't have /sys/class/input/input1/. Android looks for drivers in /sys.
>>
>> I guess you'd better to platform_driver_register() in your dev_init() and let the
>> probe function do the current mxc_ts_init() job. Your keyboard driver or
>> corgi_ts.c would be helpful.

Regards,

Georges Toth

unread,
Apr 11, 2008, 12:15:16 PM4/11/08