This repository has been archived by the owner. It is now read-only.

[rx51] N900 should be mostly usable as primary phone #438

Closed
pavelmachek opened this Issue Aug 21, 2017 · 20 comments

Comments

Projects
None yet
6 participants
@pavelmachek
Member

pavelmachek commented Aug 21, 2017

I have nokia N900 (aka rx51) mostly working as a primary phone (with poor quality audio during calls), with Debian userspace. Kernel drivers are in mainline. Camera stuff is currently being merged through linux-next. Bluetooth is not working. Everything else is.

Userland support code is in https://gitlab.com/tui/tui .

That includes: ofone (for ofono interfacing, calls, sms, ...).
batmond for shutting system down when battery is low.
keyd for actions on keyboard events.
lockd to turn off touchscreen in your pocket.
mond to monitor other deamons, set up backlight brightness and keyboard backlight brightness
tefone for testing N900 specific features
gps3.c for interfacing gps to userland
keyboard map for X
wifid is what I do to implement tethering. Still needs more work.

For handling audio during call, you'll want

https://gitlab.com/libcmtspeechdata/libcmtspeechdata/commits/master

. Audio quality is poor (dropouts, 4kHz). This is most painful issue just now.

For taking still pictures, you'll need linux-next and patched libv4l2 from

https://gitlab.com/tui/

and camera.py script from fcam-dev repository, and jpeg conversion from fcam-dev.https://gitlab.com/pavelm/fcam-dev. Auto gain and auto focus works. (Auto focus is quite slow). Auto focus and flash works with patches that are not in mainline. I do have code for vignetting correction.

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Aug 21, 2017

Member

Welcome to the postmarketOS community, @pavelmachek!

Thank you for posting that list, this is some really useful information, glad to hear that almost everything is working \o/

In case you're interested, we're having live discussions in the irc/matrix channel.

Member

ollieparanoid commented Aug 21, 2017

Welcome to the postmarketOS community, @pavelmachek!

Thank you for posting that list, this is some really useful information, glad to hear that almost everything is working \o/

In case you're interested, we're having live discussions in the irc/matrix channel.

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Aug 21, 2017

Member

browsing your repo...

You really have some knowledge about what you are doing, I'm happy that you have reached out and I bet we can do a lot of collaboration (disclaimer: I personally do not run postmarketOS on a N900, but there are quite a few people here who do, some even considered buying a N900 just for playing with postmarketOS)!

Member

ollieparanoid commented Aug 21, 2017

browsing your repo...

You really have some knowledge about what you are doing, I'm happy that you have reached out and I bet we can do a lot of collaboration (disclaimer: I personally do not run postmarketOS on a N900, but there are quite a few people here who do, some even considered buying a N900 just for playing with postmarketOS)!

@pavelmachek

This comment has been minimized.

Show comment
Hide comment
@pavelmachek

pavelmachek Aug 21, 2017

Member
Member

pavelmachek commented Aug 21, 2017

@craftyguy

This comment has been minimized.

Show comment
Hide comment
@craftyguy

craftyguy Aug 21, 2017

Member

Cool! This info will really be helpful!

One note though, I don't think we should go back to using a custom patched (or non-mainline) kernel. I understand some features won't work without linux-next (camera) but it's best to wait until those are in the mainline kernel so we don't diverge more from the pmos goal of converging on a single kernel someday.

I'll definitely take a look at your repo later and see what we could leverage!

Member

craftyguy commented Aug 21, 2017

Cool! This info will really be helpful!

One note though, I don't think we should go back to using a custom patched (or non-mainline) kernel. I understand some features won't work without linux-next (camera) but it's best to wait until those are in the mainline kernel so we don't diverge more from the pmos goal of converging on a single kernel someday.

I'll definitely take a look at your repo later and see what we could leverage!

@pavelmachek

This comment has been minimized.

Show comment
Hide comment
@pavelmachek

pavelmachek Aug 22, 2017

Member
Member

pavelmachek commented Aug 22, 2017

@MartijnBraam

This comment has been minimized.

Show comment
Hide comment
@MartijnBraam

MartijnBraam Aug 22, 2017

Member

Camera also isn't the highest priority for things that should work (not for me at least). Getting ofono running for mobile data and voice calls is more important.

Also how is the support or possibility for support for the camera hardware overlay?

Member

MartijnBraam commented Aug 22, 2017

Camera also isn't the highest priority for things that should work (not for me at least). Getting ofono running for mobile data and voice calls is more important.

Also how is the support or possibility for support for the camera hardware overlay?

@pavelmachek

This comment has been minimized.

Show comment
Hide comment
@pavelmachek

pavelmachek Aug 22, 2017

Member
Member

pavelmachek commented Aug 22, 2017

@pavelmachek

This comment has been minimized.

Show comment
Hide comment
Member

pavelmachek commented Aug 24, 2017

@craftyguy

This comment has been minimized.

Show comment
Hide comment
@craftyguy

craftyguy Aug 24, 2017

Member

I was trying to get ofono running last night but couldn't come up with a straight-forward way to test it. dbus-send was erroring out when running as 'user'. It looks like you are maintaining some user space frontend to ofono in your repo?

Member

craftyguy commented Aug 24, 2017

I was trying to get ofono running last night but couldn't come up with a straight-forward way to test it. dbus-send was erroring out when running as 'user'. It looks like you are maintaining some user space frontend to ofono in your repo?

@pavelmachek

This comment has been minimized.

Show comment
Hide comment
@pavelmachek

pavelmachek Aug 24, 2017

Member
Member

pavelmachek commented Aug 24, 2017

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Sep 3, 2017

Member

There are Nokia N9, N950 which have 1GB RAM (good) but are locked down using some kind of security solution and are problematic (very bad for development; I was not able to get mine to work).

Jasper commented that in IRC:

I checked the git issue from Pavel Macheck about the N900. He's talking about the N9(50) there and it having some security system. I can say that it's bypassable. You can use a second stage bootloader to load other zImage files.

Member

ollieparanoid commented Sep 3, 2017

There are Nokia N9, N950 which have 1GB RAM (good) but are locked down using some kind of security solution and are problematic (very bad for development; I was not able to get mine to work).

Jasper commented that in IRC:

I checked the git issue from Pavel Macheck about the N900. He's talking about the N9(50) there and it having some security system. I can say that it's bypassable. You can use a second stage bootloader to load other zImage files.

@jja2000

This comment has been minimized.

Show comment
Hide comment
@jja2000

jja2000 Sep 3, 2017

Hi, Jasper here.
Getting the kernel to run is not the main problem for the N9 currently since you can use Ubiboot to load zImage files and point it to a partition or image file for the Distro you want to use (In this case pmOS of course).

The actual main problem for the N9 is the kernel itself. MeeGo uses 2.6 (I think it's 2.6.32) and currently has barebones support in Mainline. I've spoken with a kernel driver dev for the N9 before. He has Patches to get most of the important stuff working, but until Hardware Acceleration on PowerVR chips gets an open implementation, he's not going to try and Upstream his code.

jja2000 commented Sep 3, 2017

Hi, Jasper here.
Getting the kernel to run is not the main problem for the N9 currently since you can use Ubiboot to load zImage files and point it to a partition or image file for the Distro you want to use (In this case pmOS of course).

The actual main problem for the N9 is the kernel itself. MeeGo uses 2.6 (I think it's 2.6.32) and currently has barebones support in Mainline. I've spoken with a kernel driver dev for the N9 before. He has Patches to get most of the important stuff working, but until Hardware Acceleration on PowerVR chips gets an open implementation, he's not going to try and Upstream his code.

@craftyguy

This comment has been minimized.

Show comment
Hide comment
@craftyguy

craftyguy Sep 3, 2017

Member
Member

craftyguy commented Sep 3, 2017

@jja2000

This comment has been minimized.

Show comment
Hide comment
@jja2000

jja2000 Sep 3, 2017

The first I wholeheartedly agree with, PowerVR is probably never going to do it, but the thing is that the N900 also has a PowerVR chip which has working Hardware Acceleration. Someone just has to spend time developing a driver which Sebastian Reichel should be doing already.
That the N9 should work fine without hw acc is something I doubt. I don't think you should depend on the Single Core Cortex-A8 chip being powerful enough for running a full desktop environment.

jja2000 commented Sep 3, 2017

The first I wholeheartedly agree with, PowerVR is probably never going to do it, but the thing is that the N900 also has a PowerVR chip which has working Hardware Acceleration. Someone just has to spend time developing a driver which Sebastian Reichel should be doing already.
That the N9 should work fine without hw acc is something I doubt. I don't think you should depend on the Single Core Cortex-A8 chip being powerful enough for running a full desktop environment.

@craftyguy

This comment has been minimized.

Show comment
Hide comment
@craftyguy

craftyguy Sep 3, 2017

Member
Member

craftyguy commented Sep 3, 2017

@pavelmachek

This comment has been minimized.

Show comment
Hide comment
@pavelmachek

pavelmachek Sep 3, 2017

Member

Actually, mainline support should be pretty good for N9 / N950. Even video should work (not sure if in 4.13 or in -next). Full desktop environment is doable without hw acceleration; but yes, hardware acceleration would be nice.

Anyway, N9 / N950 just do not boot for me, on any recent kernel, and I don't know why. I can bypass security and boot some old kernel, but... I'm unfamiliar with bootloader behaviour here and non-removable battery does not help. I hope to meet Sebastian / Sakari in person, and maybe we can get those machines to boot. Progress should be faster then.

Who is the mystery "kernel driver dev"? We should have video in now (or soon) and yes, more help would be nice with the drivers (but Sebastian already did a lot of work.)

Member

pavelmachek commented Sep 3, 2017

Actually, mainline support should be pretty good for N9 / N950. Even video should work (not sure if in 4.13 or in -next). Full desktop environment is doable without hw acceleration; but yes, hardware acceleration would be nice.

Anyway, N9 / N950 just do not boot for me, on any recent kernel, and I don't know why. I can bypass security and boot some old kernel, but... I'm unfamiliar with bootloader behaviour here and non-removable battery does not help. I hope to meet Sebastian / Sakari in person, and maybe we can get those machines to boot. Progress should be faster then.

Who is the mystery "kernel driver dev"? We should have video in now (or soon) and yes, more help would be nice with the drivers (but Sebastian already did a lot of work.)

@jja2000

This comment has been minimized.

Show comment
Hide comment
@jja2000

jja2000 Sep 3, 2017

I checked on Sebastian's git repo on kernel.org, just the screen for the n950 works. Filippz (the "mystery developer", sorry for not mentioning his name before) had some patches for Linux to make it work along with some other components. I compiled an older zImage (4.8.14 to be exact) if you want to try it let me know.

Anyways Pavel, did you try using the openmode kernel together with Ubiboot linked in my first comment? It should work just fine as long as you placed the zImage in the proper folder.

jja2000 commented Sep 3, 2017

I checked on Sebastian's git repo on kernel.org, just the screen for the n950 works. Filippz (the "mystery developer", sorry for not mentioning his name before) had some patches for Linux to make it work along with some other components. I compiled an older zImage (4.8.14 to be exact) if you want to try it let me know.

Anyways Pavel, did you try using the openmode kernel together with Ubiboot linked in my first comment? It should work just fine as long as you placed the zImage in the proper folder.

@eMPee584

This comment has been minimized.

Show comment
Hide comment
@eMPee584

eMPee584 Sep 9, 2017

There also has been steady progress on bringing up mainline support for the xt894 Motorola Droid 4, see Sebastian's latest post https://www.elektranox.org/2017/08/0022-droid4 ... looking forward to start hacking on PmOS!

eMPee584 commented Sep 9, 2017

There also has been steady progress on bringing up mainline support for the xt894 Motorola Droid 4, see Sebastian's latest post https://www.elektranox.org/2017/08/0022-droid4 ... looking forward to start hacking on PmOS!

@craftyguy

This comment has been minimized.

Show comment
Hide comment
@craftyguy

craftyguy Oct 11, 2017

Member

Closing this issue, since I'm not sure what the actual "resolution" of this would be (a 100% working phone?)...

I think we're all aware of @pavelmachek's other projects, and he has been working steadily to move relevant pieces into pmOS 😄

Member

craftyguy commented Oct 11, 2017

Closing this issue, since I'm not sure what the actual "resolution" of this would be (a 100% working phone?)...

I think we're all aware of @pavelmachek's other projects, and he has been working steadily to move relevant pieces into pmOS 😄

@craftyguy craftyguy closed this Oct 11, 2017

eMPee584 referenced this issue in NotKit/android_device_motorola_addison Oct 16, 2017

Add greybus modules to device.mk (for possible Moto Mods support)
Change-Id: I1eb21750ea0f87b214f8ac16efc55dcd04dc16b8
@pavelmachek

This comment has been minimized.

Show comment
Hide comment
@pavelmachek

pavelmachek Oct 18, 2017

Member
Member

pavelmachek commented Oct 18, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.