Pmbootstrap: [rx51] N900 should be mostly usable as primary phone

Created on 21 Aug 2017  路  20Comments  路  Source: postmarketOS/pmbootstrap

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.

device

Most helpful comment

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!

All 20 comments

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.

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)!

Thanks :-)

And yes, N900 is very good choice, because it has good mainline
support, keyboard, and resistive touchscreen. (Also... it should not
be expensive).

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).

Then there's Motorola Droid 4. Still similar hardware to N900/N950 (omap
based), and has LTE. Still pretty good mainline support.

Anyway, all the hardware in the world, and all the kernels are
useless, if there's no suitable userland. We do have hardware and
kernels, so let's solve the userland problem.

As for IRC, I'll be glad to talk, but not today -- need to sleep.

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!

No, for distribution, we should not go to patched kernels.

But camera is not usable currently, and even with all the kernel
patches, there's still a lot of work to be done. (Kernel: debug 5 MPix
support, debug raw image capture. Maybe add timestamps to captured
frames. Userland: subdevices support for v4l2, 10-bit support for
v4l2, better AF algorithm, better application for taking
photos. And there's more).

If you want to help with camera development, you can start now with
patched kernel... or wait few months (or more) for me (or someone) to
push the patches upstream.

So it really depends on what you want to do. There's nothing ready to
package today -- and I agree that packaging should wait for patches to
hit mainline. But if you want to do development, help will be welcome.

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?

Camera: agreed about priorities. Yes, hardware can do direct DMA to
framebuffer ("hardware overlay") but definitely more work needs to be
done there.

ofono should be piece of cake. It has support for modem in N900, and
it just works. Debian has working configuration.

Voice calls are a bit trickier, you need libcmtspeechdata, see
above. I still get dropouts there. Help would be welcome.

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?

Yes, I am -- tui/ofone/ofone (and friends). You may want to make sure
your SIM card does not have a PIN... I did not implement unlock yet.

But... for testing... Download ofono sources, and look at
contrib/test. It contains lot of python scripts that are useful for
testing; they are easier to understand than GUI app.

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.

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.

but until Hardware Acceleration on PowerVR chips gets an open implementation

That's a very silly reason to hide behind, since the current PowerVR IP holders have resisted all calls to do this. The device is still usable without hw acceleration..

On September 3, 2017 6:46:46 AM PDT, jja2000 notifications@github.com wrote:

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.

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/postmarketOS/pmbootstrap/issues/438#issuecomment-326806024

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.

This is getting a bit off topic for this ticket, but by releasing drivers for other components on the device, he will be helping out any other phones which also share those components. Arguably the biggest problem we have on this project is with components not having mainline kernel support. If you have a functional driver for any component, upstream it and help others out. don't wait for your one specific device to be 100% complete :)

On September 3, 2017 8:16:51 AM PDT, jja2000 notifications@github.com wrote:

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.

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/postmarketOS/pmbootstrap/issues/438#issuecomment-326811015

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.)

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.

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!

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 :smile:

Well, it is obvious what the "resolution" would be: N900 with pmOS
works for everyone as well, as it works for me with Debian :-).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

schvabodka-man picture schvabodka-man  路  6Comments

ollieparanoid picture ollieparanoid  路  3Comments

cmdr2 picture cmdr2  路  7Comments

ollieparanoid picture ollieparanoid  路  5Comments

ollieparanoid picture ollieparanoid  路  5Comments