maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Porting Sailfish to N9 (https://talk.maemo.org/showthread.php?t=90761)

juiceme 2014-01-09 20:34

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by valexi (Post 1405227)
Could someone write to the wiki instructions how to add patches?

Then we could apply patch that coderus made for Lipstick

You need to install the SDK and get the sources. There are already a lot of wiki's on how to do that :D

coderus 2014-01-09 20:42

Re: Porting Sailfish to N9 (or other)
 
@valexi my patch for jolla developers, not for users ;)

valexi 2014-01-09 22:05

Re: Porting Sailfish to N9 (or other)
 
Ok, so download SDK version and apply patch to lipstick-jolla-home-qt5.

Then compile and move patched file to N9?

coderus 2014-01-09 22:36

Re: Porting Sailfish to N9 (or other)
 
no you cant get lipstick sources

Garp 2014-01-09 22:41

Re: Porting Sailfish to N9 (or other)
 
Everyone I talk to in phone on Sailfish complains about the sound it's weak etc. Is that a general problem or a specific one for my N9?

coderus 2014-01-09 22:44

Re: Porting Sailfish to N9 (or other)
 
general for n9 port

valexi 2014-01-10 00:09

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by coderus (Post 1405269)
no you cant get lipstick sources

Damn. Then we just have to hope that Jolla will apply your patch.
Everyone just vote for it! :)

EDIT:
Could you make a diff between those two files, then we could apply patch to the original Lipstick file?
http://www.gnu.org/software/diffutil...20with%20patch

As it is your written code that differs from orginal file, so there is nothing illegal there?

Garp 2014-01-10 09:25

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by coderus (Post 1405272)
general for n9 port

Can that be improved in future?

anapospastos 2014-01-10 10:32

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by Hurrian (Post 1405016)
It's a bug in the kernel config - Wayland and Lipstick start really quickly - they actually start before the kernel modules for accelerometer, resulting in Lipstick using the screen dimensions as the swipe edges regardless of orientation

The fix is to inline the accelerometer kernel modules - there's a commit pending that fixes this in the kernel config.

Can you point me the location of this pending commit?

Samuwww 2014-01-10 21:26

Re: Porting Sailfish to N9 (or other)
 
Hello all,

I found these instructions (http://www.youtube.com/watch?v=8Ugb4vosobg) today and thought that it is time to try Sailfish OS on my second N9.

I did all the parts and had no problems whatsoever, untill i had done them all.

Once I finished all steps and tried to boot to sailfish (and if i still try) this is what happens:
1. power on
2. scary varranty void message
3. ubiboot screen
4. press Sailfish logo
5. screen goes black and STAYS black

But the phone is still on, or atleast I think it is because when I press the lock/power button the charge light doesn't go on. If I press the power button for a longer time the phone powers off, and the charge light flashes if I press the power button.

I can still boot normally to Harmattan by pressing the meego logo.

Any idea what could be the source to the problem? Or should i just try again from the start?

Shadwblade2652 2014-01-10 23:58

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by Samuwww (Post 1405508)
Hello all,

I found these instructions (http://www.youtube.com/watch?v=8Ugb4vosobg) today and thought that it is time to try Sailfish OS on my second N9.

I did all the parts and had no problems whatsoever, untill i had done them all.

Once I finished all steps and tried to boot to sailfish (and if i still try) this is what happens:
1. power on
2. scary varranty void message
3. ubiboot screen
4. press Sailfish logo
5. screen goes black and STAYS black

But the phone is still on, or atleast I think it is because when I press the lock/power button the charge light doesn't go on. If I press the power button for a longer time the phone powers off, and the charge light flashes if I press the power button.

I can still boot normally to Harmattan by pressing the meego logo.

Any idea what could be the source to the problem? Or should i just try again from the start?

remove your /sailfish dir and try extracting again. worked for me

junnuvi 2014-01-11 07:10

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by Samuwww (Post 1405508)
But the phone is still on, or atleast I think it is because when I press the lock/power button the charge light doesn't go on. If I press the power button for a longer time the phone powers off, and the charge light flashes if I press the power button.

And be patient.. There is no boot logo and booting will take some time :)

juiceme 2014-01-11 07:56

Re: Porting Sailfish to N9 (or other)
 
It should take a couple of minutes at most to boot, if it takes longer something is broken.
Probably you messed up extracting the FS image.

coderus 2014-01-11 09:55

Re: Porting Sailfish to N9 (or other)
 
most of peoples forgot using --numeric-owner when extracting image :)

Samuwww 2014-01-11 10:22

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by Shadwblade2652 (Post 1405544)
remove your /sailfish dir and try extracting again. worked for me

Removed the dir, tried extracting again, but this time (or I missed it the first time) it gave me "invalid tar magic error". So I downloaded the sailfish.tar.bz2 again, and extracted again, and now it boots to Sailfish. Thank you. :)

mikecomputing 2014-01-11 12:19

Re: Porting Sailfish to N9 (or other)
 
I hate the fact that if battery drained you had too force charging via flasher.

Is there anyway invoke flasher without reflash kernel/image etc?

I some kind of "diagnostic mode" in flasher where it just charging phone to 10% and then boot sailfishos normally.

coderus 2014-01-11 12:55

Re: Porting Sailfish to N9 (or other)
 
none of that in flasher.

Nad 2014-01-11 15:12

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by mikecomputing (Post 1405614)
I hate the fact that if battery drained you had too force charging via flasher.

Is there anyway invoke flasher without reflash kernel/image etc?

I some kind of "diagnostic mode" in flasher where it just charging phone to 10% and then boot sailfishos normally.

You could invoke flasher to charge to 10% then cancel the flashing procedure and manually power off, then on the handset.

But no way without flasher.

coderus 2014-01-11 15:30

Re: Porting Sailfish to N9 (or other)
 
i remember when you starting flasher for charging and pressing ctrl+c for killing flasher, phone continue charging

peterleinchen 2014-01-11 20:07

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by coderus (Post 1405648)
i remember when you starting flasher for charging and pressing ctrl+c for killing flasher, phone continue charging

Yes. That is what I heard, too.
Not yet the need to confirm it myself.

thedead1440 2014-01-11 20:13

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by peterleinchen (Post 1405705)
Yes. That is what I heard, too.
Not yet the need to confirm it myself.

It should be ctrl+z as doing so will suspend the process. I may be wrong but I remember doing so many months ago...

rainisto 2014-01-12 16:54

Re: Porting Sailfish to N9 (or other)
 
"flasher -i" doesnt flash anything, but keeps you in charging mode.

peterleinchen 2014-01-12 21:40

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by rainisto (Post 1405864)
"flasher -i" doesnt flash anything, but keeps you in charging mode.

That would be too easy to have been implemented by NOkia ;)
Never checked but when Jonni says so :)
Why did nobody came to find out? Too easy? Up to now everybody fiddled with flasher and the 11% hurdle.

--
But 'flasher - i' terminates itself after a few seconds. Charging goes on?
Or do we need a loop of 'flasher -i' ?

juiceme 2014-01-13 06:19

Re: Porting Sailfish to N9 (or other)
 
There was one idea I was toying with over the weekend, but have not yet looked into it any deeper.

The way charging-by-flasher works (or actually the whole flashing thing works) is following:
  • 1. the flasher loads a small kernel image to the device (called APE algorithm for some obscure reason...?)
    The APE algorithm has an included initramfs that contains the software to flash the device and also a BME implementation that can charge the device if needed
  • 2. when the APE is loaded, it either charges the device f under 11% capacity and reports the charging back to the flasher, or it flashes the images transferred down from the flasher

Now, to my knowledge the sources of the APE image have not been published, but as it is a linux implementation it should be gotten from Nokia if somebody just would politely ask about it.

What could be implemented:
If the minimal configuration for charging the device could be determined then it would be no-brainer to make a jumpstarter image that could be started like flasher-charging, but something that does not flash the device, just charges it up to 100% or whatever required.

Additionally I could then implement the charging algorithm in ubiboot, so that would not drain the battery and could be used to jumpstart it if in need.

bitpowers 2014-01-13 08:37

Re: Porting Sailfish to N9 (or other)
 
I have a problem with the font in Sailfish. The basic menu and the setting is normal and readable.
In other cases, such as email is pretty much illegible.
Is this normal or do I have something is wrong?
Thank you for answers and solutions.

romu 2014-01-13 08:40

Re: Porting Sailfish to N9 (or other)
 
Check the issue tracker, there are some issues about font rendering.

juiceme 2014-01-13 09:06

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by juiceme (Post 1406021)
There was one idea I was toying with over the weekend, but have not yet looked into it any deeper.

Started to hack on it, just for fun :)

It was actually fairly easy to extract the rootfs from APE, now I need just tweak that a bit and try to repack it into a kernel image and see what happens :D

juiceme 2014-01-13 11:00

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by juiceme (Post 1406050)
Started to hack on it, just for fun :)

It was actually fairly easy to extract the rootfs from APE, now I need just tweak that a bit and try to repack it into a kernel image and see what happens :D

mmh... it seems that most intresting things are happening inside a binary "/usr/sbin/softupd" that init calls as the last thing.

What I did is I extracted that and naturally, uploaded it to my N9 and ran it as root :p
Scared the s**t out of me, that one...

RM696-21-3:~#
RM696-21-3:~#
RM696-21-3:~# ./softupd
[14519.192718] Creating 1 MTD partitions on "omap2-onenand":
[14519.192840] 0x000000000000-0x000001000000 : "tmp"
[14519.230529] Creating 2 MTD partitions on "omap2-onenand":
[14519.230651] 0x000000000000-0x000000100000 : "tmp"
[14519.241851] 0x000000100000-0x000000340000 : "config"
[14519.271820] Creating 6 MTD partitions on "omap2-onenand":
[14519.271942] 0x000000000000-0x000000100000 : "bootloader"
[14519.277404] 0x000000100000-0x0000003c0000 : "config"
[14519.287719] 0x0000003c0000-0x0000013c0000 : "kernel"
[14519.288146] 0x0000013c0000-0x0000015c0000 : "log"
[14519.299133] mtdoops: Attached to MTD device 3
[14519.299224] 0x0000015c0000-0x00001e000000 : "var"
[14519.302978] 0x00001e000000-0x000020000000 : "moslo"
FATAL: Error inserting g_softupd (/lib/modules/2.6.32.54-dfl61-20121301/g_softupd.ko): Device or resource busy
FATAL: Error inserting g_nokia (/lib/modules/2.6.32.54-dfl61-20121301/g_nokia.ko): Device or resource busy
Cannot find device "upnlink0"
ifconfig: SIOCGIFFLAGS: No such device
phonet: interface `upnlink0' not found
BB5 bb5_rdc_cert_read return value. LIB: 0x00000019 (Inappropriate ioctl for device)
BB5 bb5_rdc_cert_read return value. ROM: 0xFFFFFFFF (UNKNOWN)
BB5 bb5_rdc_cert_read return value. PA: 0xFFFFFFFF (UNKNOWN)
BB5 sec_get_locks return value. LIB: 0xFFFFFFFF (Unknown error 4294967295)
BB5 sec_get_locks return value. ROM: 0x0000000A (SEC_ROM_RET_FAIL)
BB5 sec_get_locks return value. PA: 0xFFFFFFFF (UNKNOWN)
Simlock certificate check: 473 SUCCESS ret val: 0
Image lock is open

^C^C

RM696-21-3:~#

Looking at that I really thought now I've blown it big time...
it seems the sneaky bit of software went and repartitioned my MTD just like that... whooooo!
Well, did it also clear it? hopefully not.... no way to check but reboot and see if it comes back alive....

...and it did (phewwww....) :)

Now I need to experiment a bit with that if I can get anything worthwhile out of it.
Too bad there's probably no source available for softupd.

Hurrian 2014-01-13 11:36

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by juiceme (Post 1406064)
Looking at that I really thought now I've blown it big time...
it seems the sneaky bit of software went and repartitioned my MTD just like that... whooooo!
Well, did it also clear it? hopefully not.... no way to check but reboot and see if it comes back alive....

...and it did (phewwww....) :)

Now I need to experiment a bit with that if I can get anything worthwhile out of it.
Too bad there's probably no source available for softupd.

Oh man, that's living on the edge! I actually thought it'd go and flash_erase stuff.

Sounds more like it was preparing the in-memory mappings for MTD partitions for flashing.

IIRC, what it does is open up an interface over USB to accept flash images, then does any tidying up after flashing.

Can't wait to see what you come up with - recovering from a flat battery on every Nxxx device is a pain!

anthonie 2014-01-13 12:25

Re: Porting Sailfish to N9 (or other)
 
Running 1.0.2.5 here and I must say, I am pretty impressed about some things. With other things I am underwhelmed. All in all it's a mixed bag with lots of potential.

That being said, there are some issues I encounter that I did not see mentioned in the thread so far.

When I try and enter my simlock pin, often I need to pick up the phone first, before I can enter digits. Almost as if the accelerometer triggers the keypads to function or something. But for that, it should happen consistently, but it doesn't. When I type digits, phone laying down, sometimes it takes 3 of 4 keystrokes before the eventhandler picks it up. Sometimes it doesn't react and I need to pick up the phone first. Odd behaviour, it seems.

In other places keystrokes (the terminal, to name one) also seem a bit sticky, reacting slow at times. But in apps the trouble usually appears after running Sailfish for several hours. A reboot quickly resolves it, until everything connected with typing comes to a grind again

Another thing is my N9 seems to warm up a lot more than it does running Harmattan. Just having the terminal and a browser open, perhaps the store and in half an hour or so the device really starts to warm up. Not to alarming heats but enough to be significant in comparison to Harmattan.

Anyone else experiencing things like this?

Edit: Also, is there a way to get rid of the boot warning (warranty) without flashing the phone through again? I mean, I didn't care at first, but rebooting often makes it quite annoying. However, a clean format/reflash sequence for both Harmattan and Sailfish is not an option.

Hurrian 2014-01-13 12:38

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by anthonie (Post 1406083)
Another thing is my N9 seems to warm up a lot more than it does running Harmattan. Just having the terminal and a browser open, perhaps the store and in half an hour or so the device really starts to warm up. Not to alarming heats but enough to be significant in comparison to Harmattan.

Anyone else experiencing things like this?

Edit: Also, is there a way to get rid of the boot warning (warranty) without flashing the phone through again? I mean, I didn't care at first, but rebooting often makes it quite annoying. However, a clean format/reflash sequence for both Harmattan and Sailfish is not an option.

1) It's the added CPU overhead of some stuff in Sailfish, and maybe some lacking power management stuff. It's bearable - definitely not as hot as running NITDroid.

2) Nope, only option's to reflash. The NAND area that displays the image is locked (to programs using the CAL library) from writes.

anthonie 2014-01-13 12:59

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by Hurrian (Post 1406084)
1) It's the added CPU overhead of some stuff in Sailfish, and maybe some lacking power management stuff. It's bearable - definitely not as hot as running NITDroid.

Watching top, I've seen lipstick and sensord coming both to notable heights like >14%.

I suppose it will sourt itself out. POC and all.

Quote:

2) Nope, only option's to reflash. The NAND area that displays the image is locked (to programs using the CAL library) from writes.
Bummer. And the warning is only removable by a complete flash (id est, including EMMC)?

And just a second ago I had this nice dejavu with good old N900 times. A call comes in, black screen, no way to unlock it. Ah well. Wasn't in the mood to talk anyway :D

juiceme 2014-01-13 13:08

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by anthonie (Post 1406083)
When I try and enter my simlock pin, often I need to pick up the phone first, before I can enter digits. Almost as if the accelerometer triggers the keypads to function or something. But for that, it should happen consistently, but it doesn't. When I type digits, phone laying down, sometimes it takes 3 of 4 keystrokes before the eventhandler picks it up. Sometimes it doesn't react and I need to pick up the phone first. Odd behaviour, it seems.

That's capacitive touch for you :)

For some reason the digitizer needs better earthing (through a firm grip on the device) to work on Sailfish than on Harmattan.
I think it is due to some calibration that would be needed on the device to make it more sensitive, and that's missing on MER so the digitizer works on default sensitivity.

Some people experience this behaviour on Harmattan, also, so it is not that uncommon.

marmistrz 2014-01-13 17:14

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by anthonie (Post 1406093)

Bummer. And the warning is only removable by a complete flash (id est, including EMMC)?

I'm not an expert here (no warranty for this method) but you can take a try to flash a closed mode kernel, remove the warranty warning, and flash open mode & ubiboot back. In worst case you'll end up reflashing, what you were to do.

anthonie 2014-01-13 18:58

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by juiceme (Post 1406097)
That's capacitive touch for you

Every time my girlfriend (SGS2 owner) needed my N900, she would complain. After I got the N9 it took some adjustment as well. At least I know the difference now :D

Quote:

For some reason the digitizer needs better earthing (through a firm grip on the device) to work on Sailfish than on Harmattan.
I think it is due to some calibration that would be needed on the device to make it more sensitive, and that's missing on MER so the digitizer works on default sensitivity.
Calibration seems like something easily solvable, given there is time for people to work on it. Like I said, for a proof of concept, things work miraculously well!

Quote:

Some people experience this behaviour on Harmattan, also, so it is not that uncommon.
I was not aware of that, so I take your word for it.

Quote:

Originally Posted by marmistrz (Post 1406144)
I'm not an expert here (no warranty for this method) but you can take a try to flash a closed mode kernel, remove the warranty warning, and flash open mode & ubiboot back. In worst case you'll end up reflashing, what you were to do.

You mean using the stock kernel image to overwrite the NAND en then quitting the process of flashing? Sounds legit. Question is, how to know when it's safe to press Ctrl-C?

marmistrz 2014-01-13 19:22

Re: Porting Sailfish to N9 (or other)
 
Quote:

Originally Posted by anthonie (Post 1406182)
You mean using the stock kernel image to overwrite the NAND en then quitting the process of flashing? Sounds legit. Question is, how to know when it's safe to press Ctrl-C?

I mean flash only kernel from the so-called main.bin, boot into closed mode, and follow the instructions by coderus. Then flash ubiboot back.

coderus 2014-01-13 19:29

Re: Porting Sailfish to N9 (or other)
 
you cant turn to normal mode by flashing only kernel. only full reflash.

juiceme 2014-01-13 21:40

Re: Porting Sailfish to N9 (or other)
 
Exactly. Going Open Mode is a one-way-street, once you so much as once boot a non-signed kernel there is no going back.
There's a Secure Mode signature bit flashed to your system to a non-accessible location by the boot loader.
The Secure Mode bit is cleared only when you do a full reflash to Closed Mode.

Nad 2014-01-14 20:10

Re: Porting Sailfish to N9 (or other)
 
You can remove the warning via root Terminal with:
disclaimer-cal remove View-openmode
thanks to coderus from this thread

This requires vanilla firmware. You can then flash the openmode kernel. You have to delete your aegis keys prior to flashing the open kernel as its not back-to-back flashing closed->open.

mcbook 2014-01-14 21:21

Hey guys, I was wondering if I can run sailfish on my N9 withouth repartitioning it...?


All times are GMT. The time now is 23:36.

vBulletin® Version 3.8.8