Sailfish

(First draft.)
(Final draft)
Line 27: Line 27:
= Notes =
= Notes =
 +
 +
 +
If your handset is factory SIM-locked, it may not be possible to install unsigned kernels thus Sailfish. There is currently no known work-around and unlocking the handset after purchase does not seem to alleviate this.
To completely turn off the handset manually, hold the power button for ~8 seconds.
To completely turn off the handset manually, hold the power button for ~8 seconds.
Line 39: Line 42:
==Firmwares==
==Firmwares==
-
Obtain Nokia N9 firmwares from http://skeiron.org/firmware/N9/40.2012.21.3/ or <br>
+
Obtain Nokia N9 firmwares from [http://skeiron.org/firmware/N9/40.2012.21.3/ skeiron.org] or <br>
-
http://mrcrab.net/nokia/Nokia_N9.html?productID=4823499691&productType=RM-696
+
[http://mrcrab.net/nokia/Nokia_N9.html?productID=4823499691&productType=RM-696 mrcrab.net]
==Kernels==
==Kernels==
Obtain the OpenMode kernel from [http://www.swagman.org/juice/ubiboot/other/zImage_2.6.32.54-openmode_l2fix]
Obtain the OpenMode kernel from [http://www.swagman.org/juice/ubiboot/other/zImage_2.6.32.54-openmode_l2fix]
-
Obtain the MOSLO kernel from: [http://releases.nemomobile.org/snapshots/repos/hw/ti/omap3/n950-n9/latest/armv7hl/armv7hl/moslo-0.0.13.2-1.5.Nemo.Adaptation.N9xx.armv7hl.rpm] or
+
Obtain the MOSLO kernel from: [http://releases.nemomobile.org/snapshots/repos/hw/ti/omap3/n950-n9/latest/armv7hl/armv7hl/moslo-0.0.13.2-1.5.Nemo.Adaptation.N9xx.armv7hl.rpm nemomobile.org] or
-
[http://www.multiupload.nl/WLLK09RF96] (zip file)
+
[http://www.multiupload.nl/WLLK09RF96 multiupload.nl] (zip file)
==Ubiboot==
==Ubiboot==
-
Obtain Ubiboot from [http://www.swagman.org/juice/ubiboot/ubiboot-02/]
+
Obtain Ubiboot from [http://www.swagman.org/juice/ubiboot/ubiboot-02/ swagman.org]
Download the latest version available.
Download the latest version available.
For more information on Ubiboot, please visit the [[Ubiboot|Maemo Community Wiki article]]
For more information on Ubiboot, please visit the [[Ubiboot|Maemo Community Wiki article]]
Line 59: Line 62:
===SourenAraya's Sailfish images===
===SourenAraya's Sailfish images===
-
Available for download from: [http://n9.araya.su/images/mic_images/]  
+
Available for download from: [http://n9.araya.su/images/mic_images/ araya.su]  
The newer images have Terminal pre-installed on Sailfish v1.0.1.10
The newer images have Terminal pre-installed on Sailfish v1.0.1.10
===max83's image===
===max83's image===
-
Available from [http://www.mediafire.com/download/zj4q8ai80xg41iu/sailfishos_n9_1_0_0_5.tar.bz2]
+
Available from [http://www.mediafire.com/download/zj4q8ai80xg41iu/sailfishos_n9_1_0_0_5.tar.bz2 mediafire.com]
This image has Terminal, Maps and a few third party applications pre-installed on Sailfish v1.0.0.5
This image has Terminal, Maps and a few third party applications pre-installed on Sailfish v1.0.0.5
Line 73: Line 76:
This script allows compositions of an image using the MerSDK kit.
This script allows compositions of an image using the MerSDK kit.
-
Please see [https://wiki.merproject.org/wiki/Platform_SDK] and [http://martinbrook.blogspot.co.uk/2013/12/n950-and-jolla-phone-repos-ive-been.html?m=1] for more information about creating your own image.
+
Please see [https://wiki.merproject.org/wiki/Platform_SDK Mer Project Platform SDK] and [http://martinbrook.blogspot.co.uk/2013/12/n950-and-jolla-phone-repos-ive-been.html?m=1 Martin Brook's blog] for more information about creating your own image.
Line 88: Line 91:
=Installation Guide=
=Installation Guide=
==Step 1 - Backup your N9==
==Step 1 - Backup your N9==
-
Backup your N9 (using Nokia Suite or the phones inbuilt utility) AND your emmc (connect you N9 in data storage mode)!!
+
*Backup your Nokia N9 using Nokia Suite for PC or the phone's built-in utility in Setting. Also backup you EMMC (MyDocs) by connecting your Nokia N9 to your PC in "USB Mass Storage Mode".
-
1a - Connect your phone as Mass Storage and backup the .backup folder locally if you used the inbuilt utility.
+
**If you have used the built-in tool, connect your phone as "USB Mass Storage Mode" and ensure you have backed up the '''.backup folder''' on your PC.
-
1b - Close all your open applications. I would also recommend you to backup up /home/.config , /home/.local and /home/.whatsup too so you have the configurations and settings for your applications. Use N9QuickTweak [url]http://talk.maemo.org/showthread.php?t=80600[/url], option H, enable SSH for root. Then use WinSCP/Filezilla to access you phone and copy these files. [url]http://winscp.net/eng/index.php[/url] [url]https://filezilla-project.org/[/url]
+
*Close all your open applications on your Nokia N9. It is recommended that you backup up '''/home/.config''', '''/home/.local''' and '''/home/.whatsup (or/home/.wazapp)''' too so you have the configurations and settings for your installed applications. This can easily be achieved by using  [http://talk.maemo.org/showthread.php?t=80600 N9QuickTweak]. Install it, choose Option "'''H'''", and select "'''Enable SSH for root'''". Now, use [http://winscp.net/eng/index.php WinSCP] or [https://filezilla-project.org/ Filezilla] to access you phone and copy these folders to your PC.
-
1b - [B]BACKUP YOUR BACKUPS[/B]
+
*Backup your backups.
-
==Step 2 - Re-flash the firmware to factory==
+
==Step 2 - Re-flash your Nokia N9 to factory firmware==
-
Download firmwares from: [url]http://skeiron.org/firmware/N9/40.2012.21.3/[/url] or [url]http://mrcrab.net/nokia/Nokia_N9.html?productID=4823499691&productType=RM-696[/url]
+
*Note: Flashing can permanently damage or brick your Nokia N9. Do so at your own risk.
-
2a - Make sure handset is charged. Disconnect from all cables and turn off completely.
+
*Download the firmware you wish to use Harmattan with from [http://skeiron.org/firmware/N9/40.2012.21.3/ skeiron.org] or [http://mrcrab.net/nokia/Nokia_N9.html?productID=4823499691&productType=RM-696 mrcrab.net]. Your factory product code is printed on your SIM tray e.g. 059J245. You want the two files containing "DFL _61" e.g. A6D5F456_'''DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY'''_005-OEM1-958_ARM.bin and 59BEC3BC_'''DFL61_HARMATTAN_40.2012.13-7'''.SEAP_'''EMMC'''_SEAP.bin.
-
2b - If you have not already, download the flasher for your system and install it. You want v3.12.1. [url]http://skeiron.org/tablets-dev/maemo-dev-env-downloads/[/url]
+
*Rename your firmware to "main.bin" and "emmc.bin" respectively and copy them to the directory where the flasher program is installed (e.g. '''"C:\Program Files\Nokia\Flasher"'''). Check the [Flashing_N9 Maemo Community Wiki Nokia N9 Flashing Guide] for further information.
-
2c - Copy your firmwares to the directory where the flasher program is and rename them to main.bin and emmc.bin (for the main firmware files and emmc files respectively) [url]http://wiki.maemo.org/Flashing_N9[/url] for more info if needed.
+
*Ensure your handset is fully charged. Disconnect from all cables from it and turn off.
 +
*If you have not already, download the Flasher for your system and install it. You want v3.12.1 from [http://skeiron.org/tablets-dev/maemo-dev-env-downloads/ here]
-
NB: You can also flash you phone when it completely turned off by initiating a flasher command and connecting it.
+
*Open up a Root Terminal (Or Terminal and gain root/use sudo) or an elevated cmd.exe (by running it as Administrator on Windows Vista onwards) and set the directory to where flasher is located: <br>
-
"flasher -i" is useful to see if you phone is in the correct environment.
+
'''cd /d "C:\Program Files\Nokia\Flasher"''' (for Windows)
-
2d - Fire up an elevated cmd.exe/run cmd.exe as admin (win) or login to a terminal as root (nix) and go to the directory where you flasher program and firmware files are.
+
-
2e - Flash your firmware with the command "flasher -F main.bin -F emmc.bin -f" (no quotes)
+
-
2z - IF FLASHING FAILS (PARTITION MISMATCH, SIMLOCK ON: CANNOT FLASH UNSIGNED IMAGE, NO REPLY FROM PING ETC.) TRY THIS. I HAVE DONE IT MULTIPLE TIMES AND NOT NOTICED ANY CONSEQUENCES BUT I TAKE NO RESPONSIBILITY IF YOU PERMA-BRICK!
+
*By connecting the USB cable to the computer and the turned off phone, you will initialise the Flashing Mode.
 +
**This status can be checked with the command:<br>
 +
'''flasher -i'''
 +
*Flash your firmware with the command:<br>
 +
'''flasher -F main.bin -F emmc.bin -f'''
-
Completely turn off the handset.
 
-
Start flasher with the following command: "flasher -f -F main.bin --erase-user-data=secure -F emmc.bin --erase-mmc=secure" (no quotes)
 
-
This should fix it but takes a few hours to run (I left it overnight and did not time it).
 
-
*********
+
*If flashing fails e.g. due to a Partition Mismatch, Security Code On Status or No Reply from Ping, you can try the following. There is a risk of bricking your phone and no warranty is provided by anyone!
 +
**Completely turn off the handset.
 +
**Start flasher with the following command:<br>
 +
'''flasher -f -F main.bin --erase-user-data=secure -F emmc.bin --erase-mmc=secure'''<br>
 +
This should flash the handset but takes a few hours to complete therefore is best left to run overnight.
-
IF YOU ARE ABIT IMPATIENT (LIKE ME) PULL OUT YOUR CABLE WHEN THIS COMMAND STARTS (YOU CAN CANCEL THE FLASH COMMAND WITH CTRL+Z IF YOU WANT FIRST) THEN TURN OFF THE PHONE COMPLETELY.  
+
***If you do not wish to wait, you can stop the zeroising task and pull out the USB cable from the handset. This is a risky manoeuvre and could permanatly  The task can be stopped by:<br>
-
TURN IT ON AND YOU WILL GET A MESSAGE ASKING YOU TO INSTALL AN AUTHORISED OPERATING SYSTEM.
+
'''Pressing CTRL + Z''' in a Linux Terminal <br>
-
TURN IT BACK OFF.
+
Opening Task Manager ('''CTRL+ALT+DEL''') and Ending the tasks '''cmd.exe''' and '''flasher.exe''' in Windows
-
RUN: "flasher -F main.bin -F emmc.bin -f" (no quotes) AND IT SHOULD FLASH FINE
+
**Now completely turn off the phone.
-
*************
+
**Turn it on and you will get a message asking you to "Install and Authorised Operating System"
 +
**Turn the phone back off.
 +
**In flasher, run:<br>
 +
'''flasher -F main.bin -F emmc.bin -f'''
 +
**The phone should proceed to flash normally.
-
==Step 3 - Give your handset freedom via openmode!==
+
==Step 3 - Flash the OpenMode!==
-
3a - Download the openmode kernel from [url]http://www.swagman.org/juice/ubiboot/other/zImage_2.6.32.54-openmode_l2fix[/url] and place it in the same directory as flasher and your firmware files.  
+
*Download the OpenMode kernel from [http://www.swagman.org/juice/ubiboot/other/zImage_2.6.32.54-openmode_l2fix swagman.org] and place it in the same directory as flasher and your firmware files.  
-
3b - Flash the openmode kernel and reboot your phone with:
+
*Flash the OpenMode kernel and reboot your phone with: <br>
-
"flasher -a main.bin -k zImage_2.6.32.54-openmode_l2fix --flash-only=kernel -f -R" (without quotes)
+
flasher -a main.bin -k zImage_2.6.32.54-openmode_l2fix --flash-only=kernel -f -R"
==Step 4 - Prepare Harmattan==
==Step 4 - Prepare Harmattan==
-
4a - Let Harmattan load up and run for a few minutes so you have date/time set and it is fully functional.  
+
*Let Harmattan load up and run for a few minutes so you have date and time set correctly and the handset is fully functional.
-
4b - Install developer mode so you have terminal (it is useful later on).
+
*Install Developer Mode on Harmattan so Terminal is made available as it is useful later on and required if are do not Linux.
-
4c - (Optional) Install N9QT [url]http://talk.maemo.org/showthread.php?t=80600[/url], and enable option H (enable SSH for root). This will allow you to run commands in chroot for sailfish on your pc (copy & paste easily)
+
*(Optional) Install N9QT from [http://talk.maemo.org/showthread.php?t=80600 here] and choose Option "'''H'''", and select "'''Enable SSH for root'''". This will allow you to run commands on Harmattan from your PC and enables copying and pasting of commands and files to and from your PC easily.
==Step 5 - Re-partition your handset==
==Step 5 - Re-partition your handset==
-
5a - Turn off your hand set. If you have not already, start up a linux machine/vm (a live image is useful, just make sure you backup downloaded files on your host PC).  
+
*Turn off your handset. If you have not already, start up a Linux computer/virtual machine.  
-
5b - Download the MOSLO kernel ([url]http://releases.nemomobile.org/snapshots/repos/hw/ti/omap3/n950-n9/latest/armv7hl/armv7hl/moslo-0.0.13.2-1.5.Nemo.Adaptation.N9xx.armv7hl.rpm[/url])
+
*Download the MOSLO kernel from [http://releases.nemomobile.org/snapshots/repos/hw/ti/omap3/n950-n9/latest/armv7hl/armv7hl/moslo-0.0.13.2-1.5.Nemo.Adaptation.N9xx.armv7hl.rpm nemomobile.org] or [http://www.multiupload.nl/WLLK09RF96 multiupload.nl]. Windows users must download from multiupload.nl as it is a .zip file. Extract the files using "Archive Manager" or an unzipping utility and copy them to where flasher and your firmware files are.
-
If you dont have linux and want to stay with windows, download the MOSO kernel zip file from here: [url]http://www.multiupload.nl/WLLK09RF96[/url] and extract it to where flasher is.. Flash it using "flasher -k zImage-moslo -n initrd-moslo -l -b" (no quotes), then jump to [B][U]Step W[/U][/B]
+
*Flash the MOSLO kernel using:<br>
 +
'''flasher -k zImage-moslo -n initrd-moslo -l -b'''
 +
**Allow MOSLO to repartition your handset. If you are a Windows user, please now proceed to '''Step W - Install Sailfish (Windows only Users)'''.
-
5c - Extract the .rpm with archive manager or:
+
**If you are a Linux user, MOSLO will now connect the "Alt_OS" partition to your PC. Disconnect the phone and turn it off completely. <br>
-
"rpm2cpio moslo-*.armv7hl.rpm | cpio -vidu" (you may need to install rpm2cpio [apt-get install rpm2cpi]). Copy the contents to the same directory as flasher, main.bin, emmc.bin and zImage_2.6.32.54-openmode_l2fix
+
-
5d - Flash the MOSLO kernel to your phone with:
+
-
"flasher -k zImage-moslo -n initrd-moslo -l -b" (no quotes)
+
-
After flashing, it will repartition you N9 and connect it to the PC.  
+
'''You can now either proceed to installing Sailfish (Step 7) or continue installing Ubiboot for a newer and customisable boot-loader and the future ability to have Nitdroid and Firefox OS on your handset (see the [Ubiboot|Maemo Community Ubiboot Wiki Page] for further details.'''
-
[U]You can now either jump to installing sailfish (step 6d) or continue installing ubiboot for more control and the future ability to have nitdroid and firefox os.[/U]
 
-
Disconnect the phone and turn it off completely.
 
-
==Step 6 Install Ubiboot and Sailfish==
+
==Step 6 - Install Ubiboot==
-
6a - Download and extract the [B][U]latest[/U][/B] ubiboot from [url]http://www.swagman.org/juice/ubiboot/ubiboot-02/[/url] (ubiboot-02_0.3.5_301013.tar as of 2013-12-08) into the directory where flasher, main.bin and emmc.bin reside.
+
*Download and extract the '''latest''' Ubiboot from [http://www.swagman.org/juice/ubiboot/ubiboot-02/ swagman.org] into the directory where flasher, main.bin and emmc.bin reside.
 +
*Install the ubiboot kernel with:<br>
 +
'''flasher -a main.bin -k zImage_2.6.32.54-ubiboot-02_301013 --flash-only=kernel -f -R'''
-
6b - Now install the ubiboot kernel with:
+
*Leave the cable plugged in and allow Ubiboot to enter maintenance mode.
-
"flasher -a main.bin -k zImage_2.6.32.54-ubiboot-02_301013 --flash-only=kernel -f -R"
+
-
Leave the cable plugged in and allow ubiboot to enter maintenance mode.
+
4 Removable Partitions will be visible in Computer. These are "'''rootfs'''" (Harmattan root filesystem), "Alt_'''OS'''" (where nemo/sailfish lives) "'''x767x676x7c6'''" (a random string of letters +/- numbers. This is where you can install Nitdroid and Firefox OS if you wish. It is also the "/home/" directory in Harmattan but NOT "/home/user/MyDocs"). "'''Nokia N9'''" is "/home/user/MyDocs" directory on Harmattan [EMMC/USB Mass Storage Mode]).<br><br>
-
 
+
-
Partitions are "rootfs" (Harmattan root filesystem) "Alt_OS" (where nemo/sailfish lives) "x767x676x7c6" (a random string of letters +/- numbers. This is where you will install nitdroid and firefox OS if you wish and is "/home/" in Harmattan but NOT "/home/user/MyDocs") and "Nokia N9" (THIS is "/home/user/MyDocs" on Harmattan [USB Mass Storage Mode]).
+
NB: If you format Alt_OS, it will get a random string of letters and numbers, like the "/home/" directory. It is the 4.2GB file system.  
NB: If you format Alt_OS, it will get a random string of letters and numbers, like the "/home/" directory. It is the 4.2GB file system.  
-
6c - Go to "/media/Nokia N9" on your PC (Harmattans Mass Storage). Make a directory called "boot". Copy "ubiboot.conf" and "ubiboot-02.menus.cpio" from the extracted ubiboot-02_310513.tar into the newly created "boot" folder.
+
*Go to "/media/Nokia N9" on your PC (Harmattan's Mass Storage). Make a directory called "'''boot'''".  
-
6c Go to "/media/rootfs" on your PC to access Harmattans root file system. Go to the "boot" directory (/media/rootfs/boot). Copy "zImage_2.6.32.54-openmode_l2fix" (which we flashed earlier) into "/media/rootfs/boot").
+
**Copy "'''ubiboot.conf'''" and "'''ubiboot-02.menus.cpio'''" from the extracted '''ubiboot-02_310513.tar''' into "/media/Nokia N9"/boot".
 +
**Go to "'''/media/rootfs'''" on your PC to access Harmattan's root file system. Go to the "'''boot'''" directory ("'''/media/rootfs/boot'''"). Copy "'''zImage_2.6.32.54-openmode_l2fix'''" (which was flashed earlier) into "'''/media/rootfs/boot'''").
-
[B][U]6d[/U][/B] - Now download the sailfish image of choice (or make one using the mer sdk and "sailfish2-armv7hl-n950.ks", but I wont go into that. Check [url]http://martinbrook.blogspot.co.uk/2013/12/n950-and-jolla-phone-repos-ive-been.html?m=1[/url], [url]https://wiki.merproject.org/wiki/Platform_SDK[/url] and [url]https://github.com/martinbrook/jolla-n950-kickstart[/url] for more info if interested.
+
==Step 7 - Install Sailfish==
 +
*Now download the Sailfish image of choice, or compile your own using the Mer SDK. Rename it to '''sailfish.tar.bz2'''
 +
*Extract the Sailfish archive to "'''/media/Alt_OS'''" on your PC with:<br>
 +
'''tar --numeric-owner -xvjf sailfish.tar.bz2 -C /media/Alt_OS/'''
-
Download Sailfish from: [url]http://n9.araya.su/images/mic_images/sailfish-1.0.1.10/vgrade/[/url] (vgrade-sailfish_proximity-workaround.tar.bz2 ) (no zypper in this image to install additional packages, sailfish v1.0.0.10)
+
==Step W - Install Sailfish (Windows only Users)==
 +
*Download Sailfish image of choice. Rename it to '''sailfish.tar.bz2'''
 +
*In Harmattan, install Developer Mode if you haven't already.  Connect the phone to Windows in "USB Mass Storage Mode ".
 +
*Copy sailfish.tar.bz2' to the root of your MMC (X:\, where X is the letter of your removable drive).
 +
*Disconnect the phone from the PC and remove the USB cable.
 +
*Launch Terminal on Harmattan (or SSH in) any type the following commands:
 +
'''devel-su'''
 +
'''rootme''' # Or your root password
 +
'''cd /home/user/MyDocs/'''
 +
'''ls''' # Here, you should see all your MyDocs and sailfish.tar.bz2
 +
'''mkdir /sailfish''' # Mount Alt_OS in Harmattan
 +
'''mount /dev/mmcblk0p4 /sailfish'''
-
6e - Extract Sailfish to "/media/Alt_OS" on your PC with:
+
'''tar --numeric-owner -xvjf sailfish.tar.bz2 -C /sailfish/''' # This will take a while as it extracts Sailfish onto the handset
-
"time tar --numeric-owner -xvjf vgrade-sailfish_proximity-workaround.tar.bz2 -C /media/Alt_OS/"
+
'''sync'''
-
==Step W - Install Sailfish using only Windows==
 
-
Credits to mikecomputing for suggesting this method.
+
You can now exit Terminal and reboot into Sailfish or '''Enable root SSH access on Sailfish''', starting at "mount -o bind /proc /sailfish/proc".
-
After installing the MOSLO kernel, allow it to repartition your device. Disconnect and boot into Harmattan.
+
'''To upgrade to a new image, simply delete everything in /media/Alt_OS ("'''rm -frv /media/Alt_OS/'''*") when on a Linux PC or "'''rm -frv /sailfish/'''*" when you have mounted Alt_OS in Harmattan. You will loose ALL your Sailfish data!'''
-
Wa - Download Sailfish image of choice
+
-
Wb - In Harmattan, install developer mode if you haven't already.  Connect the phone as "Mass Storage Device"
+
-
Wc - Copy vgrade-sailfish_proximity-workaround.tar.bz2 to the root of your MMC.
+
-
Wd - Disconnect the phone from the PC.
+
-
We - Launch Terminal on Harmattan (or SSH in)
+
-
devel-su
+
-
rootme #or your root pass
+
-
cd /home/user/MyDocs/
+
-
ls
+
-
# you should see all your MyDocs and vgrade-sailfish_proximity-workaround.tar.bz2
+
-
mkdir /sailfish
+
==Step 8 - Boot into Sailfish==
-
mount /dev/mmcblk0p4 /sailfish
+
-
time tar --numeric-owner -xvjf vgrade-sailfish_proximity-workaround.tar.bz2 -C /sailfish/
+
-
# this will take a while as its extracting on the handset
+
-
# now exit out or jump to [B][U]Enable root SSH access on Sailfish[/U][/B], starting at "mount -o bind /proc /sailfish/proc"
+
-
Please read his post:
+
Disconnect your USB cable and turn off the handset completely. Turn it back on. If done correctly, this should present you Ubiboot boot-manager and 6 available operating system logos. Sailfish and Harmattan shall work.
-
[url]http://talk.maemo.org/showpost.php?p=1393646&postcount=436[/url]
+
-
Sync the disks and unmount all the filesystems:
+
If you do not select an OS, Harmattan will boot by default.
-
"sync ; sync ; sync ; umount /media/*"
+
-
(To upgrade to a new image, simply delete everything in /media/Alt_OS ("rm -frv /media/Alt_OS/*"). You will loose your data!
+
To boot into Sailfish, tap the Nemo icon (3rd one down on the left,  looks like a blue padlock) and tap either "latest 2.6.32" or "vmlinuz-2.6.63.20120129.1-n950". For Harmattan, it is "openmode+l2 fix".
-
Disconnect your USB cable and turn off the handset completely. Turn it back on. If done correctly, this should present you ubiboot bootmanager and 6 available OS', of which sailfish and harmattan work.
 
-
 
-
If you do not select an OS, Harmattan will boot by default.
 
-
To boot into Sailfish, tap the nemo icon (3rd one down on the left,  looks like a blue padlock) and tap either "latest 2.6.32" or "vmlinuz-2.6.63.20120129.1-n950". For Harmattan, it is "openmode+l2 fix"
 
=Additional Guidance=
=Additional Guidance=
Line 212: Line 213:
The date/time may not set correctly in Sailfish. To fix this, boot into Harmattan and fire up terminal:
The date/time may not set correctly in Sailfish. To fix this, boot into Harmattan and fire up terminal:
-
$ devel-su
+
'''devel-su
-
# rootme #(or ur root pass)
+
rootme # Or you root password
-
# date --set "2013-12-07 22:59"
+
date --set "2013-12-07 22:59"'''
==Enable root SSH access on Sailfish==
==Enable root SSH access on Sailfish==
-
To fix the proximity sensor (thanks souran), you need to have root access in Sailfish. This is pretty easy to get (thanks to liar (krnlyng) on piratepad):
+
To fix the proximity sensor, you need to have root access in Sailfish. This is pretty easy to obtain:<br><br>
-
Fire up a terminal Harmattan.
+
Open terminal in Harmattan and type:<br><br>
-
devel-su
+
'''devel-su<br>
-
cd /
+
cd /<br>
-
mkdir sailfish
+
mkdir sailfish<br>
-
mount /dev/mmcblk0p4 /sailfish
+
mount /dev/mmcblk0p4 /sailfish<br>
-
mount -o bind /proc /sailfish/proc
+
mount -o bind /proc /sailfish/proc<br>
-
mount -o bind /sys /sailfish/sys
+
mount -o bind /sys /sailfish/sys<br>
-
mount -o bind /dev /sailfish/dev
+
mount -o bind /dev /sailfish/dev<br>
-
/usr/sbin/chroot /sailfish
+
/usr/sbin/chroot /sailfish<br><br>
-
su
+
-
passwd root
+
-
nemo #enter a root pass
+
-
nemo #confirm root pass
+
-
passwd nemo
+
-
nemo #enter pass for nemo
+
-
nemo #confirm nemo pass
+
-
zypper in nano #shouldn't be needed, some will use vi
+
su<br>
-
# now lets enable root ssh in sailfish
+
passwd root'''<br>
-
# this  also allows copying files to and from sailfish with winscp/filezilla
+
'''nemo''' # Enter a password for root<br>
 +
'''nemo''' # Confirm root's password<br>
 +
'''passwd nemo'''<br>
 +
'''nemo''' # Enter a password for nemo<br>
 +
'''nemo''' # Confirm nemo's password<br><br>
-
nano /etc/ssh/sshd_config
+
zypper in nano # Shouldn't be needed in some images, alternatively<br><br>
-
# add the following somewhere
+
-
PermitRootLogin yes
+
-
# exit: ctrl+x , y to save changes
+
-
# you can also install any additional packages, such as terminal now as per [url]http://www.who.is.free.fr/wiki/doku.php?id=n950club[/url] and [url]http://piratepad.net/nVuyI2uxrY[/url] e.g.:
+
Now let's enable root SSH access in Sailfish. This also allows copying of files to and from sailfish with WinSCP/Filezilla<br><br>
-
zypper install \
+
-
  jolla-alarm-ui jolla-calculator jolla-calendar jolla-clock jolla-configuration-n9 \
+
-
  jolla-demo jolla-developer-mode jolla-development-tools jolla-email jolla-fileman \
+
-
  jolla-mediaplayer jolla-notes jolla-rnd
+
-
exit
+
'''nano /etc/ssh/sshd_config'''<br>
 +
Add the following somewhere <br>
 +
'''PermitRootLogin yes'''<br>
-
umount /sailfish/dev
+
To exit: CTRL+X , type "y" to save changes<br><br>
-
umount /sailfish/proc
+
-
umount /sailfish/sys
+
-
umount /sailfish
+
-
exit #out of su
+
-
exit #out of chroot
+
-
reboot
+
 +
You can also install any additional packages, such as terminal now as per [http://www.who.is.free.fr/wiki/doku.php?id=n950club rzr's n950club guide]  and the [http://piratepad.net/nVuyI2uxrY piratepad] e.g.:
 +
'''zypper install jolla-calculator'''<br><br>
-
Reboot you phone and enjoy ssh/terminal on your Sailfish!
+
'''exit'''<br>
 +
'''exit'''<br><br>
 +
 
 +
'''umount /sailfish/dev<br>
 +
umount /sailfish/proc<br>
 +
umount /sailfish/sys<br>
 +
umount /sailfish'''<br>
 +
'''exit''' # Exit out of devl-su<br>
 +
'''exit''' # Exit out of Terminal
 +
 
 +
 
 +
Reboot your phone and enjoy SSH/root Terminal on Sailfish!
==Developer Mode frame rate issue==
==Developer Mode frame rate issue==
-
When in developer mode, DO NOT ENABLE FRAME RATE DISPLAY. It causes random colour drawings on the screen, making it impossible to disable. To fix, delete everthing in /home/nemo/.gconf/*
 
-
liar said the value to enable/disable the frame rate option may be in:
+
When in developer mode, DO NOT ENABLE FRAME RATE DISPLAY. It causes random colour drawings on the screen, making it impossible to disable. To fix, delete everything in /home/nemo/.gconf/*
-
[quote]
+
 
-
/home/nemo/.gconf/desktop/lipstick-jolla-home/gconf.xml
+
liar stated the value to enable/disable the frame rate option may be in either of:
-
or
+
'''/home/nemo/.gconf/desktop/lipstick-jolla-home/gconf.xml <br>
-
/mnt/home/nemo/.gconf/desktop/gconf.xml
+
/mnt/home/nemo/.gconf/desktop/gconf.xml
-
[/quote]
+
'''
==Proximity sensor fix==
==Proximity sensor fix==
-
To fix the proximity sensor (thanks souran & eekkelund, must be done every boot)
+
To fix the proximity sensor (this must be done at every boot). in Sailfish terminal type:<br><br>
-
In sailfish terminal:
+
su<br>
-
su
+
nemo<br>
-
nemo
+
echo 1 > /sys/devices/platform/i2c_omap.2/i2c-2/2-0039/prox_enable<br>
-
echo 1 > /sys/devices/platform/i2c_omap.2/i2c-2/2-0039/prox_enable
+

Revision as of 21:34, 11 December 2013

Contents

Introduction

Introduction


Credits

This guide has been compiled from numerous previous sources and credits are due to lots of individuals for their original work, methods and support to the community, including: rzr, souran, Martin Brook, vgrade, mikecomputing, TMavica, krnlyng/liar, max83, flotron, juiceme, contributors to piratepad, Nemo contributors and anyone else trying to make Sailfish run on the Nokia N9/N950.

Please help by contributing any information or methods you have to help make Nemo and Sailfish run better on the Nokia N9/N950.


Installation environment

The guide assumes some basic Linux knowledge although help can be obtained in this thread should the need arise.

A tested environment has been as follows:

  • Windows 7 Host
  • Debian v7.2 x64 as a Virtual Machine Running on VMware. Virtualbox is free-ware and should work fine too. Any Linux distribution shall work but the instructions that follow have been used on Debian with Root Terminal. Live ISO's are also an option however files may not be retained on following reboot therefore it is advised to store everything on a local hard disk or removable drive.

It is strongly recommended to do everything on the Linux installation as it can easily read the EXT3/4 partitions presented by the MOSLO and Ubiboot maintenance modes.

There can be a loss of Internet connectivity (until reboot) on the Linux machine when in MOSLO/Ubiboot maintenance mode therefore a second device with internet capabilities is recommended.

For a Windows only installation, please follow the guide then proceed to Step W when prompted.

Notes

If your handset is factory SIM-locked, it may not be possible to install unsigned kernels thus Sailfish. There is currently no known work-around and unlocking the handset after purchase does not seem to alleviate this.

To completely turn off the handset manually, hold the power button for ~8 seconds.

When extracting a tarball ending with .tar, use "tar --numeric-owner -xvf " and you get a message saying "invalid tar magic", it is probably .tar.bz2 therefore use "tar --numeric-owner -xvjf "

Lack of the package jolla-xt9 means there is no text correction engine in Sailfish. This also manifests as Pīnyīn to Hanzi conversion for input of the Chinese language.

Downloadable Resources

These resources are required to get Sailfish working on your Nokia N9/N950.

Firmwares

Obtain Nokia N9 firmwares from skeiron.org or
mrcrab.net

Kernels

Obtain the OpenMode kernel from [1]

Obtain the MOSLO kernel from: nemomobile.org or multiupload.nl (zip file)

Ubiboot

Obtain Ubiboot from swagman.org Download the latest version available. For more information on Ubiboot, please visit the Maemo Community Wiki article

Sailfish Images

There are numerous images available for download.

SourenAraya's Sailfish images

Available for download from: araya.su The newer images have Terminal pre-installed on Sailfish v1.0.1.10

max83's image

Available from mediafire.com This image has Terminal, Maps and a few third party applications pre-installed on Sailfish v1.0.0.5

vgrade's Kickstarter

Available from https://github.com/martinbrook/jolla-n950-kickstart

This script allows compositions of an image using the MerSDK kit.

Please see Mer Project Platform SDK and Martin Brook's blog for more information about creating your own image.


Additional Reading Material

These are not required to be read for installation but many of the latest developments are highlighted here.

rzr's n950club
PiratePad
IRC - IRC Chat for support and discussion. Monthly meetings on the first Sunday of month at 19:00 UTC.


Installation Guide

Step 1 - Backup your N9

  • Backup your Nokia N9 using Nokia Suite for PC or the phone's built-in utility in Setting. Also backup you EMMC (MyDocs) by connecting your Nokia N9 to your PC in "USB Mass Storage Mode".
    • If you have used the built-in tool, connect your phone as "USB Mass Storage Mode" and ensure you have backed up the .backup folder on your PC.
  • Close all your open applications on your Nokia N9. It is recommended that you backup up /home/.config, /home/.local and /home/.whatsup (or/home/.wazapp) too so you have the configurations and settings for your installed applications. This can easily be achieved by using N9QuickTweak. Install it, choose Option "H", and select "Enable SSH for root". Now, use WinSCP or Filezilla to access you phone and copy these folders to your PC.
  • Backup your backups.

Step 2 - Re-flash your Nokia N9 to factory firmware

  • Note: Flashing can permanently damage or brick your Nokia N9. Do so at your own risk.
  • Download the firmware you wish to use Harmattan with from skeiron.org or mrcrab.net. Your factory product code is printed on your SIM tray e.g. 059J245. You want the two files containing "DFL _61" e.g. A6D5F456_DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_005-OEM1-958_ARM.bin and 59BEC3BC_DFL61_HARMATTAN_40.2012.13-7.SEAP_EMMC_SEAP.bin.
  • Rename your firmware to "main.bin" and "emmc.bin" respectively and copy them to the directory where the flasher program is installed (e.g. "C:\Program Files\Nokia\Flasher"). Check the [Flashing_N9 Maemo Community Wiki Nokia N9 Flashing Guide] for further information.
  • Ensure your handset is fully charged. Disconnect from all cables from it and turn off.
  • If you have not already, download the Flasher for your system and install it. You want v3.12.1 from here
  • Open up a Root Terminal (Or Terminal and gain root/use sudo) or an elevated cmd.exe (by running it as Administrator on Windows Vista onwards) and set the directory to where flasher is located:

cd /d "C:\Program Files\Nokia\Flasher" (for Windows)

  • By connecting the USB cable to the computer and the turned off phone, you will initialise the Flashing Mode.
    • This status can be checked with the command:

flasher -i

  • Flash your firmware with the command:

flasher -F main.bin -F emmc.bin -f


  • If flashing fails e.g. due to a Partition Mismatch, Security Code On Status or No Reply from Ping, you can try the following. There is a risk of bricking your phone and no warranty is provided by anyone!
    • Completely turn off the handset.
    • Start flasher with the following command:

flasher -f -F main.bin --erase-user-data=secure -F emmc.bin --erase-mmc=secure
This should flash the handset but takes a few hours to complete therefore is best left to run overnight.

      • If you do not wish to wait, you can stop the zeroising task and pull out the USB cable from the handset. This is a risky manoeuvre and could permanatly The task can be stopped by:

Pressing CTRL + Z in a Linux Terminal
Opening Task Manager (CTRL+ALT+DEL) and Ending the tasks cmd.exe and flasher.exe in Windows

    • Now completely turn off the phone.
    • Turn it on and you will get a message asking you to "Install and Authorised Operating System"
    • Turn the phone back off.
    • In flasher, run:

flasher -F main.bin -F emmc.bin -f

    • The phone should proceed to flash normally.

Step 3 - Flash the OpenMode!

  • Download the OpenMode kernel from swagman.org and place it in the same directory as flasher and your firmware files.
  • Flash the OpenMode kernel and reboot your phone with:

flasher -a main.bin -k zImage_2.6.32.54-openmode_l2fix --flash-only=kernel -f -R"

Step 4 - Prepare Harmattan

  • Let Harmattan load up and run for a few minutes so you have date and time set correctly and the handset is fully functional.
  • Install Developer Mode on Harmattan so Terminal is made available as it is useful later on and required if are do not Linux.
  • (Optional) Install N9QT from here and choose Option "H", and select "Enable SSH for root". This will allow you to run commands on Harmattan from your PC and enables copying and pasting of commands and files to and from your PC easily.

Step 5 - Re-partition your handset

  • Turn off your handset. If you have not already, start up a Linux computer/virtual machine.
  • Download the MOSLO kernel from nemomobile.org or multiupload.nl. Windows users must download from multiupload.nl as it is a .zip file. Extract the files using "Archive Manager" or an unzipping utility and copy them to where flasher and your firmware files are.
  • Flash the MOSLO kernel using:

flasher -k zImage-moslo -n initrd-moslo -l -b

    • Allow MOSLO to repartition your handset. If you are a Windows user, please now proceed to Step W - Install Sailfish (Windows only Users).
    • If you are a Linux user, MOSLO will now connect the "Alt_OS" partition to your PC. Disconnect the phone and turn it off completely.

You can now either proceed to installing Sailfish (Step 7) or continue installing Ubiboot for a newer and customisable boot-loader and the future ability to have Nitdroid and Firefox OS on your handset (see the [Ubiboot|Maemo Community Ubiboot Wiki Page] for further details.


Step 6 - Install Ubiboot

  • Download and extract the latest Ubiboot from swagman.org into the directory where flasher, main.bin and emmc.bin reside.
  • Install the ubiboot kernel with:

flasher -a main.bin -k zImage_2.6.32.54-ubiboot-02_301013 --flash-only=kernel -f -R

  • Leave the cable plugged in and allow Ubiboot to enter maintenance mode.

4 Removable Partitions will be visible in Computer. These are "rootfs" (Harmattan root filesystem), "Alt_OS" (where nemo/sailfish lives) "x767x676x7c6" (a random string of letters +/- numbers. This is where you can install Nitdroid and Firefox OS if you wish. It is also the "/home/" directory in Harmattan but NOT "/home/user/MyDocs"). "Nokia N9" is "/home/user/MyDocs" directory on Harmattan [EMMC/USB Mass Storage Mode]).

NB: If you format Alt_OS, it will get a random string of letters and numbers, like the "/home/" directory. It is the 4.2GB file system.

  • Go to "/media/Nokia N9" on your PC (Harmattan's Mass Storage). Make a directory called "boot".
    • Copy "ubiboot.conf" and "ubiboot-02.menus.cpio" from the extracted ubiboot-02_310513.tar into "/media/Nokia N9"/boot".
    • Go to "/media/rootfs" on your PC to access Harmattan's root file system. Go to the "boot" directory ("/media/rootfs/boot"). Copy "zImage_2.6.32.54-openmode_l2fix" (which was flashed earlier) into "/media/rootfs/boot").

Step 7 - Install Sailfish

  • Now download the Sailfish image of choice, or compile your own using the Mer SDK. Rename it to sailfish.tar.bz2
  • Extract the Sailfish archive to "/media/Alt_OS" on your PC with:

tar --numeric-owner -xvjf sailfish.tar.bz2 -C /media/Alt_OS/

Step W - Install Sailfish (Windows only Users)

  • Download Sailfish image of choice. Rename it to sailfish.tar.bz2
  • In Harmattan, install Developer Mode if you haven't already. Connect the phone to Windows in "USB Mass Storage Mode ".
  • Copy sailfish.tar.bz2' to the root of your MMC (X:\, where X is the letter of your removable drive).
  • Disconnect the phone from the PC and remove the USB cable.
  • Launch Terminal on Harmattan (or SSH in) any type the following commands:

devel-su rootme # Or your root password cd /home/user/MyDocs/ ls # Here, you should see all your MyDocs and sailfish.tar.bz2

mkdir /sailfish # Mount Alt_OS in Harmattan mount /dev/mmcblk0p4 /sailfish

tar --numeric-owner -xvjf sailfish.tar.bz2 -C /sailfish/ # This will take a while as it extracts Sailfish onto the handset sync


You can now exit Terminal and reboot into Sailfish or Enable root SSH access on Sailfish, starting at "mount -o bind /proc /sailfish/proc".

To upgrade to a new image, simply delete everything in /media/Alt_OS ("rm -frv /media/Alt_OS/*") when on a Linux PC or "rm -frv /sailfish/*" when you have mounted Alt_OS in Harmattan. You will loose ALL your Sailfish data!

Step 8 - Boot into Sailfish

Disconnect your USB cable and turn off the handset completely. Turn it back on. If done correctly, this should present you Ubiboot boot-manager and 6 available operating system logos. Sailfish and Harmattan shall work.

If you do not select an OS, Harmattan will boot by default.

To boot into Sailfish, tap the Nemo icon (3rd one down on the left, looks like a blue padlock) and tap either "latest 2.6.32" or "vmlinuz-2.6.63.20120129.1-n950". For Harmattan, it is "openmode+l2 fix".


Additional Guidance

Date/Time Fix

The date/time may not set correctly in Sailfish. To fix this, boot into Harmattan and fire up terminal:

devel-su rootme # Or you root password date --set "2013-12-07 22:59"

Enable root SSH access on Sailfish

To fix the proximity sensor, you need to have root access in Sailfish. This is pretty easy to obtain:

Open terminal in Harmattan and type:

devel-su
cd /
mkdir sailfish
mount /dev/mmcblk0p4 /sailfish
mount -o bind /proc /sailfish/proc
mount -o bind /sys /sailfish/sys
mount -o bind /dev /sailfish/dev
/usr/sbin/chroot /sailfish

su
passwd root
nemo # Enter a password for root
nemo # Confirm root's password
passwd nemo
nemo # Enter a password for nemo
nemo # Confirm nemo's password

zypper in nano # Shouldn't be needed in some images, alternatively

Now let's enable root SSH access in Sailfish. This also allows copying of files to and from sailfish with WinSCP/Filezilla

nano /etc/ssh/sshd_config
Add the following somewhere
PermitRootLogin yes

To exit: CTRL+X , type "y" to save changes

You can also install any additional packages, such as terminal now as per rzr's n950club guide and the piratepad e.g.: zypper install jolla-calculator

exit
exit

umount /sailfish/dev
umount /sailfish/proc
umount /sailfish/sys
umount /sailfish
exit # Exit out of devl-su
exit # Exit out of Terminal


Reboot your phone and enjoy SSH/root Terminal on Sailfish!


Developer Mode frame rate issue

When in developer mode, DO NOT ENABLE FRAME RATE DISPLAY. It causes random colour drawings on the screen, making it impossible to disable. To fix, delete everything in /home/nemo/.gconf/*

liar stated the value to enable/disable the frame rate option may be in either of: /home/nemo/.gconf/desktop/lipstick-jolla-home/gconf.xml
/mnt/home/nemo/.gconf/desktop/gconf.xml


Proximity sensor fix

To fix the proximity sensor (this must be done at every boot). in Sailfish terminal type:

su
nemo
echo 1 > /sys/devices/platform/i2c_omap.2/i2c-2/2-0039/prox_enable