maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   [Android] Eclair NITDroid (WIP) (https://talk.maemo.org/showthread.php?t=35112)

bdogg64 2010-03-07 00:17

Re: [Android] Eclair NITDroid (WIP)
 
I keep leaving out stuff, forgive me. You have to enable R&D mode before flashing.

Code:

flasher-3.5 --enable-rd-mode --set-rd-flags=no-omap-wd,no-ext-wd -R
I apologize as I don't have an N900 with me, but thats off-topic

mockillo 2010-03-07 11:23

Re: [Android] Eclair NITDroid (WIP)
 
I tried compiling my own kernel for the N900 this morning, following http://natisbad.org/N900/n900-custom-kernel.html and patching it with the android patches posted earlier in this thread.

However, my modules are frickin huuuge!

For comparison:

My nfs.ko: 3622kb
Titan's nfs.ko: 300kb

Anyone have any idea how I can reduce the size of these gigantic modules? Right now I can't even fit them all on / on my N900.

dj_steve 2010-03-07 11:29

Re: [Android] Eclair NITDroid (WIP)
 
newer kern = new modules = bigger - you have enabled the compile for small ystems option in general settings havent you ? and modules should not be an issue as they are put in /lib/modules not as part of kernel
and you could always symlink the modules folder to your emmc in theory

mockillo 2010-03-07 11:36

Re: [Android] Eclair NITDroid (WIP)
 
The problem is that I can't even fit them on the filesystem.

And me and Titan's kernel is the same version from the same sources, still a huge size difference.

And I used Nokia's default config-file with the exception of the additions from the android patches and adding a localversion.

However, I just noticed that CONFIG_DEBUG_KERNEL was set to y, disabling that and attempting to recompile.

I would tho honestly expect a good working config to be shipped with the kernel sources, but oh-well.

dj_steve 2010-03-07 11:37

Re: [Android] Eclair NITDroid (WIP)
 
yep debug symbols would be a good cause of el huge files

mockillo 2010-03-07 12:12

Re: [Android] Eclair NITDroid (WIP)
 
All modules are just over 3 MB now. :)

dj_steve 2010-03-07 12:13

Re: [Android] Eclair NITDroid (WIP)
 
sounds better, im trying to slim down my kernel too just over 2.2mb and i need it to be closer to 1.9

mockillo 2010-03-07 13:14

Re: [Android] Eclair NITDroid (WIP)
 
But that's just the kernel? Not the modules too, I hope?

dj_steve 2010-03-07 13:31

Re: [Android] Eclair NITDroid (WIP)
 
yep just kernel, modules i aint worried about as i got 2gb mem card they be goin on once i get kernel bootin

mockillo 2010-03-07 15:32

Re: [Android] Eclair NITDroid (WIP)
 
Tell me, all the modules you put in /lib/modules/`uname -r` will be automatically loaded right? As long as you do the proper depmod routine etc. aswell.

mockillo 2010-03-07 21:10

Re: [Android] Eclair NITDroid (WIP)
 
Has anyone ever seen this before?

Kernel sources from SDK, patched with android patches from bdogg64, disabled kernel debugging, enabled fbcon (unable to read anything from just before this happens as the screen backlight turns off after a few seconds) and added a local version.

Modules are all in the right place, as far as I know.

Touchscreen is WAY off, bottom right corner of the screen hits 7, the rest of the screen hits nothing as far as I can tell.

Keyboard isnt working either.

First theory is that the modules are not being loaded, but I'm not sure why not since they should be in the correct place.
I've also run depmod <kernel name> to generate all the correct modules.* files.

The console output I do however get to see does not give me any errors of missing modules/drivers when it starts to load, but it did this before I ran depmod <kernel name>, which is why I think the modules are in the correct place.

Any idea?

Oh, and please let me know if I should move this to a new thread, I just thought of posting it here since it has the android patches and might be related.

Has anyone started Maemo with a kernel with the android patches?

http://lh5.ggpht.com/_w8rjbGSzmxs/S5...2021.30.16.jpg

todor_tsankov 2010-03-07 21:13

Re: [Android] Eclair NITDroid (WIP)
 
This screenshot seems like an Maemo initial screen just without the theme applied to it (I think this happens when you mess up the current theme)

mockillo 2010-03-07 21:23

Re: [Android] Eclair NITDroid (WIP)
 
I havent touched anything besides the kernel and module.
If I flash Titan's zImage from Compiling custom kernels for P1.1 (with fiasco-gen) everything is back to normal.

mockillo 2010-03-07 21:25

Re: [Android] Eclair NITDroid (WIP)
 
Besides, if it's just the theme, shouldn't the touchscreen/keyboard be working?

bdogg64 2010-03-07 23:13

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by mockillo (Post 559135)
Besides, if it's just the theme, shouldn't the touchscreen/keyboard be working?

It should. The kernel I used to boot android is previous to the current PR 1.1.1 kernel, so I can't say how much difference there is in the 2 kernels. Were there any errors when you patched the kernel?

bdogg64 2010-03-08 00:10

Re: [Android] Eclair NITDroid (WIP)
 
1 Attachment(s)
I uploaded a new patched kernel based on the latest maemo sdk kernel source with the android patches. I'm assuming this is the same kernel on the PR 1.1.1 firmware

http://nitdroid.loadsofspace.net/zImage-20100307

md5: 2d9983ee38f675a12162b1dcb02f304e

I also attached an updated patch file. Here are the instructions of what I did. This assumes you have the up-to-date maemo 5 sdk installed, and are already logged in (e.g. /scratchbox/login)

Code:

mkdir android-kernel
cd android-kernel
fakeroot apt-get source kernel-source
tar zxf kernel_2.6.28.orig.tar.gz
cd kernel-2.6.28
patch -p1 <../kernel_2.6.28-20094803.3+0m5.diff
patch -p1 <../n900_kernel.patch
make ARCH=arm rx51_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 zImage modules

That should give you a zImage in the arch/arm/boot directory and the miscellaneous modules.

FYI: In order for the touchscreen to work, you need to backup the original tsc2005.ko module in the /lib/modules/current directory before replacing with the modules from the android kernel. After replacing the modules, place the original tsc2005.ko module back into the /lib/modules/current directory. The patched android touchscreen module conflicts with the maemo touchscreen module.

http://www.natisbad.org/N900/n900-custom-kernel.html has an updated tutorial on replacing the modules on the N900 also.

dj_steve 2010-03-08 10:36

Re: [Android] Eclair NITDroid (WIP)
 
@bdogg64

just found some code here you might find of interest it has to do with pageflipping in the omap fb driver

Code:

Index: linux-omap-2_6_23/drivers/video/omap/omapfb_main.c
===================================================================
--- linux-omap-2_6_23.orig/drivers/video/omap/omapfb_main.c
+++ linux-omap-2_6_23/drivers/video/omap/omapfb_main.c
@@ -168,7 +168,7 @@ static int ctrl_init(struct omapfb_devic
                /* 12 bpp is packed in 16 bits */
                if (bpp == 12)
                      bpp = 16;
-              def_size = def_vxres * def_vyres * bpp / 8;
+              def_size = def_vxres * def_vyres * 2 * bpp / 8;
                fbdev->mem_desc.region_cnt = 1;
                fbdev->mem_desc.region[0].size = PAGE_ALIGN(def_size);
        }
@@ -415,6 +415,7 @@ static void set_fb_fix(struct fb_info *f
        }
        fix->accel              = FB_ACCEL_OMAP1610;
        fix->line_length        = var->xres_virtual * bpp / 8;
+      fix->ypanstep          = 1;
 }

 static int set_color_mode(struct omapfb_plane_struct *plane,
@@ -1471,7 +1472,7 @@ static int fbinfo_init(struct omapfb_dev
        var->xres = def_vxres;
        var->yres = def_vyres;
        var->xres_virtual = def_vxres;
-      var->yres_virtual = def_vyres;
+      var->yres_virtual = def_vyres * 2;
        var->rotate      = def_rotate;
        var->bits_per_pixel = fbdev->panel->bpp;

its a patch i found at @ http://elinux.org/Android_on_OMAP#Pa...g_frame_buffer

mockillo 2010-03-08 12:35

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by bdogg64 (Post 559285)
I also attached an updated patch file. Here are the instructions of what I did. This assumes you have the up-to-date maemo 5 sdk installed, and are already logged in (e.g. /scratchbox/login)

Code:

mkdir android-kernel
cd android-kernel
fakeroot apt-get source kernel-source
tar zxf kernel_2.6.28.orig.tar.gz
cd kernel-2.6.28
patch -p1 <../kernel_2.6.28-20094803.3+0m5.diff
patch -p1 <../n900_kernel.patch
make ARCH=arm rx51_android_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 zImage modules

That should give you a zImage in the arch/arm/boot directory and the miscellaneous.

Thanks, I'll try this later tonight :)

mockillo 2010-03-08 20:27

Re: [Android] Eclair NITDroid (WIP)
 
Did that exactly! Except that I crosscompiled with arm-linux-gnueabi- instead of arm-none-linux-gnueabi-. Moved the modules in place, ran depmod and tried to boot maemo. Got the same unthemed pincode screen with a terribly uncalibrated touchscreen.

Sigh!

mockillo 2010-03-08 20:39

Re: [Android] Eclair NITDroid (WIP)
 
Funny thing, if I boot while in R&D mode, I get the theme but still no usable touchscreen. If I boot in production mode, I get no theme and no usable touchscreen.

bdogg64 2010-03-08 22:25

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by mockillo (Post 560423)
Did that exactly! Except that I crosscompiled with arm-linux-gnueabi- instead of arm-none-linux-gnueabi-. Moved the modules in place, ran depmod and tried to boot maemo. Got the same unthemed pincode screen with a terribly uncalibrated touchscreen.

Sigh!

Of course I keep forgetting stuff ... For the touchscreen to work after you patch the kernel and modules, you need to keep the original tsc2005.ko module and place it back in the directory with the new modules. The patched touchscreen driver for android throws it off when you boot back into maemo.

I'm not sure whats going on with the keyboard, as mine wasn't affected after patching.

Hope this helps

bdogg64 2010-03-08 22:33

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by dj_steve (Post 559655)
@bdogg64

just found some code here you might find of interest it has to do with pageflipping in the omap fb driver

Code:

Index: linux-omap-2_6_23/drivers/video/omap/omapfb_main.c
===================================================================
--- linux-omap-2_6_23.orig/drivers/video/omap/omapfb_main.c
+++ linux-omap-2_6_23/drivers/video/omap/omapfb_main.c
@@ -168,7 +168,7 @@ static int ctrl_init(struct omapfb_devic
                /* 12 bpp is packed in 16 bits */
                if (bpp == 12)
                      bpp = 16;
-              def_size = def_vxres * def_vyres * bpp / 8;
+              def_size = def_vxres * def_vyres * 2 * bpp / 8;
                fbdev->mem_desc.region_cnt = 1;
                fbdev->mem_desc.region[0].size = PAGE_ALIGN(def_size);
        }
@@ -415,6 +415,7 @@ static void set_fb_fix(struct fb_info *f
        }
        fix->accel              = FB_ACCEL_OMAP1610;
        fix->line_length        = var->xres_virtual * bpp / 8;
+      fix->ypanstep          = 1;
 }

 static int set_color_mode(struct omapfb_plane_struct *plane,
@@ -1471,7 +1472,7 @@ static int fbinfo_init(struct omapfb_dev
        var->xres = def_vxres;
        var->yres = def_vyres;
        var->xres_virtual = def_vxres;
-      var->yres_virtual = def_vyres;
+      var->yres_virtual = def_vyres * 2;
        var->rotate      = def_rotate;
        var->bits_per_pixel = fbdev->panel->bpp;

its a patch i found at @ http://elinux.org/Android_on_OMAP#Pa...g_frame_buffer

I tried that before, but its for the old omapfb driver that the n8x0 uses. The N900 uses the new omap2 dss driver which doesn't have a similar patch yet, and I don't know enough about how it works to implement it on the new drivers/video/omap2/omapfb/omapfb- main.c driver.

dj_steve 2010-03-09 20:08

Re: [Android] Eclair NITDroid (WIP)
 
right excuse the lack of updates last few days, busy with work :( bdogg can you send me the omap drivers for n900 and ill see if i can look at them for you

twoboxen 2010-03-10 03:59

Re: [Android] Eclair NITDroid (WIP)
 
I played with a friend's droid (not a euphemism) tonight. Man, that thing looks awesome. I'm not in love with the hardware, but the OS looks like a blast. Dual booting meego + android 2.x on the n900? All win.

This project is very exciting. I still couldn't get bootmenu to load the android kernel, but I'm trying again soon. Keep up the good work fellas! Much appreciated.

dj_steve 2010-03-10 10:59

Re: [Android] Eclair NITDroid (WIP)
 
update time: been examining the contents of the original nitdroid patch for the android userspace and noticed one thing in one of the files thats a bit wrong in my opin :

file these are in is vendor/nokia/nit/BoardConfig.mk
Code:

TARGET_HARDWARE_3D      := false

HAVE_HTC_AUDIO_DRIVER  := false
HAVE_WEXT_WIFI_DRIVER  := true

BOARD_USES_GENERIC_AUDIO := true
BOARD_USES_ALSA_AUDIO  := false
BOARD_HAVE_BLUETOOTH    := true

both the bold lines seem to be slightly wrong for the NIT tablets,

i know for a fact the sound subsystem on the n8x0 runs via alsa so ive enabled that, also we all know the n900 and n800 both have internel 3d graphics hardware so thats enabled to.

am compiling a android 2.1r2 system now, wont get to test until i get home from work ~8pm tonight though

mrdally204 2010-03-10 12:44

Re: [Android] Eclair NITDroid (WIP)
 
thanks for the updates guys. Steve i am interested to see what works after your changes.

bdogg64 2010-03-10 22:28

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by dj_steve (Post 562336)
update time: been examining the contents of the original nitdroid patch for the android userspace and noticed one thing in one of the files thats a bit wrong in my opin :

file these are in is vendor/nokia/nit/BoardConfig.mk
Code:

TARGET_HARDWARE_3D      := false

HAVE_HTC_AUDIO_DRIVER  := false
HAVE_WEXT_WIFI_DRIVER  := true

BOARD_USES_GENERIC_AUDIO := true
BOARD_USES_ALSA_AUDIO  := false
BOARD_HAVE_BLUETOOTH    := true

both the bold lines seem to be slightly wrong for the NIT tablets,

i know for a fact the sound subsystem on the n8x0 runs via alsa so ive enabled that, also we all know the n900 and n800 both have internel 3d graphics hardware so thats enabled to.

am compiling a android 2.1r2 system now, wont get to test until i get home from work ~8pm tonight though

I wish it were that simple as turning on the flags. You still have to write interfaces and drivers that interact with the hardware. Here is a rough overview of the build process.

http://pdk.android.com/online-pdk/guide/index.html

andoreasu 2010-03-11 09:58

Re: [Android] Eclair NITDroid (WIP)
 
I don't know if this will help with the android kernel, but this guy seems to do a good job with the linux kernel on n8x0

http://franciscoalecrim.com/blog/category/n810/

see the first post to see how he got 2.6.33 working partially
see the second post to see how he got 2.6.29-omap working with full(?) hardware support on n810

I am new to maemo.org, and apologize if I posted something you already new all the time :)

Cpasjuste 2010-03-12 14:51

Re: [Android] Eclair NITDroid (WIP)
 
I'm sorry i did read a few pages but i can't read all the 27 pages ... so i have a question : are you guys trying to boot the nokia kernel patched with android patchs, but with the maemo rootfs ? If so, wouldn't it be easier to boot the patched android kernel with an android rootfs hosted on an microSD partition ?
Else i did successfully boot android on the pandora gaming console, and latest kernel use dss2 too. What i did is select the old omap-fb driver instead the dss one in the kernel configuration ( you have to disable the dss2 driver in kernel config before beeing able to see the omap-fb driver ) then patched it with the previous omapfb patchs posted here.

Well, i'm interessed in having android on the n900, could someone sumarize the current progress to see if i can help ?

Callensunny 2010-03-12 17:56

Re: [Android] Eclair NITDroid (WIP)
 
I can't believe the WinMobile community is already ahead of us!! Mainly because WinMobile sucks so bad. See the link: http://pocketnow.com/tweaks-hacks/an...-pro2-it-rocks

dj_steve 2010-03-13 10:06

Re: [Android] Eclair NITDroid (WIP)
 
probably because 90% of winmobile phones are made by htc so porting android to htc isnt particually hard as they released the first android phone :) (which i have). havent made much progress myself yet still arguing with alsa and making it compile

dj_steve 2010-03-13 10:08

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by Cpasjuste (Post 565127)
I'm sorry i did read a few pages but i can't read all the 27 pages ... so i have a question : are you guys trying to boot the nokia kernel patched with android patchs, but with the maemo rootfs ? If so, wouldn't it be easier to boot the patched android kernel with an android rootfs hosted on an microSD partition ?
Else i did successfully boot android on the pandora gaming console, and latest kernel use dss2 too. What i did is select the old omap-fb driver instead the dss one in the kernel configuration ( you have to disable the dss2 driver in kernel config before beeing able to see the omap-fb driver ) then patched it with the previous omapfb patchs posted here.

Well, i'm interessed in having android on the n900, could someone sumarize the current progress to see if i can help ?


currently we have a working port but it is very slow and as far as i know bluetooth/sound/calls dont work, but i dont have a n900 so i am not sure - you best off checking the www.nitdroid.com site for info

mrdally204 2010-03-13 10:11

Re: [Android] Eclair NITDroid (WIP)
 
Hey dj, good to hear from you again. Don't mind Callensunny, I think he is jealous they can run it and not us yet. I feel his pain as well :) Keep at it, ALSA is bound to give in eventually. I'm surprised we have not received any word from the people in #nitdroid. I can see if they were disinterested, but I was hoping for them to say they were and not ignore us:)

Edit, you mentioned its running slow on the N900, how does it run on the older hardware?

Cpasjuste 2010-03-13 10:12

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by dj_steve (Post 565899)
currently we have a working port but it is very slow and as far as i know bluetooth/sound/calls dont work, but i dont have a n900 so i am not sure - you best off checking the www.nitdroid.com site for info

Thanks, i just followed your sig link on your previous post :)
I'll help soon.

dj_steve 2010-03-13 10:13

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by mrdally204 (Post 565901)
Hey dj, good to hear from you again. Don't mind Callensunny, I think he is jealous they can run it and not us yet. I feel his pain as well :) Keep at it, ALSA is bound to give in eventually. I'm surprised we have not received any word from the people in #nitdroid. I can see if they were disinterested, but I was hoping for them to say they were and not ignore us:)

was taling to bri3d and luke-jr other day like, alsa seems to be a general pain to compile apprently but we need its code or sound will never work (due to the ASoC drivers required for sound on the nxx0 series.


UPDATE No 1: ok compile is now proceeding properly with all alsa libs included, once this builds i will be trying the new rootfs and seeing what happens, hopefully it should work and may even have sound to boot :)

Callensunny 2010-03-14 06:02

Re: [Android] Eclair NITDroid (WIP)
 
Quote:

Originally Posted by dj_steve (Post 565896)
probably because 90% of winmobile phones are made by htc so porting android to htc isnt particually hard as they released the first android phone :) (which i have). havent made much progress myself yet still arguing with alsa and making it compile

That's a really good point.

Quote:

Originally Posted by dj_steve (Post 565905)
was taling to bri3d and luke-jr other day like, alsa seems to be a general pain to compile apprently but we need its code or sound will never work (due to the ASoC drivers required for sound on the nxx0 series.


UPDATE No 1: ok compile is now proceeding properly with all alsa libs included, once this builds i will be trying the new rootfs and seeing what happens, hopefully it should work and may even have sound to boot :)

WOW, that sounds like a really big step to me. Glad we are making progress.

Cpasjuste 2010-03-14 14:26

Re: [Android] Eclair NITDroid (WIP)
 
On the nitroid page, you guys talk about a static build of busybox. Where should i find it ?

dj_steve 2010-03-14 14:26

Re: [Android] Eclair NITDroid (WIP)
 
google does usually help. their a few dotted about

Cpasjuste 2010-03-14 14:29

Re: [Android] Eclair NITDroid (WIP)
 
I do ask for a good reason ...

dj_steve 2010-03-14 14:30

Re: [Android] Eclair NITDroid (WIP)
 
i dont have a n900 so i cant help in that respect, (n8x0 and n900 are diff cpus etc)) bdogg64 most likely has a build in the rootfs he uploaded a few pages back though :)


UPDATE: ok have had to go backwards somewhat, downloading a fresh version of the android 2.1_r2 source as i was getting piles of random java compile errors with the eclair branch, so ill be patchign and merging alsa back in again once this downloads (this is where i need a decent internet connection lol)


All times are GMT. The time now is 12:06.

vBulletin® Version 3.8.8