Sailfish
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
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 http://skeiron.org/firmware/N9/40.2012.21.3/ or
http://mrcrab.net/nokia/Nokia_N9.html?productID=4823499691&productType=RM-696
Kernels
Obtain the OpenMode kernel from [1]
Obtain the MOSLO kernel from: [2] or [3] (zip file)
Ubiboot
Obtain Ubiboot from [4] 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: [5] The newer images have Terminal pre-installed on Sailfish v1.0.1.10
max83's image
Available from [6] 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 [7] and [8] 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 N9 (using Nokia Suite or the phones inbuilt utility) AND your emmc (connect you N9 in data storage mode)!! 1a - Connect your phone as Mass Storage and backup the .backup folder locally if you used the inbuilt utility. 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] 1b - [B]BACKUP YOUR BACKUPS[/B]
Step 2 - Re-flash the firmware to factory
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] 2a - Make sure handset is charged. Disconnect from all cables and turn off completely. 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] 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.
NB: You can also flash you phone when it completely turned off by initiating a flasher command and connecting it. "flasher -i" is useful to see if you phone is in the correct environment. 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!
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 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. TURN IT ON AND YOU WILL GET A MESSAGE ASKING YOU TO INSTALL AN AUTHORISED OPERATING SYSTEM. TURN IT BACK OFF. RUN: "flasher -F main.bin -F emmc.bin -f" (no quotes) AND IT SHOULD FLASH FINE
Step 3 - Give your handset freedom via 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. 3b - 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" (without quotes)
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. 4b - Install developer mode so you have terminal (it is useful later on). 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)
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). 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])
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]
5c - Extract the .rpm with archive manager or: "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.
[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
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.
6b - Now 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.
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.
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. 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").
[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.
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)
6e - Extract Sailfish to "/media/Alt_OS" on your PC with: "time tar --numeric-owner -xvjf vgrade-sailfish_proximity-workaround.tar.bz2 -C /media/Alt_OS/"
Step W - Install Sailfish using only Windows
Credits to mikecomputing for suggesting this method.
After installing the MOSLO kernel, allow it to repartition your device. Disconnect and boot into Harmattan. 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 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: [url]http://talk.maemo.org/showpost.php?p=1393646&postcount=436[/url]
Sync the disks and unmount all the filesystems: "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!
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
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 ur root pass)
- date --set "2013-12-07 22:59"
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):
Fire up a terminal Harmattan. 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 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
- now lets enable root ssh in sailfish
- this also allows copying files to and from sailfish with winscp/filezilla
nano /etc/ssh/sshd_config
- 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.:
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
umount /sailfish/dev umount /sailfish/proc umount /sailfish/sys umount /sailfish exit #out of su exit #out of chroot reboot
Reboot you phone and enjoy ssh/terminal on your 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 everthing in /home/nemo/.gconf/*
liar said the value to enable/disable the frame rate option may be in: [quote] /home/nemo/.gconf/desktop/lipstick-jolla-home/gconf.xml
or /mnt/home/nemo/.gconf/desktop/gconf.xml
[/quote]
Proximity sensor fix
To fix the proximity sensor (thanks souran & eekkelund, must be done every boot) In sailfish terminal: su nemo echo 1 > /sys/devices/platform/i2c_omap.2/i2c-2/2-0039/prox_enable