Sailfish
(→Step 6 - Install Ubiboot) |
(→Enable root SSH access on Sailfish) |
||
Line 238: | Line 238: | ||
Open terminal in Harmattan and type:<br><br> | Open terminal in Harmattan and type:<br><br> | ||
'''devel-su<br> | '''devel-su<br> | ||
- | cd /<br> | + | '''cd /<br> |
- | mkdir sailfish<br> | + | '''mkdir sailfish<br> |
- | mount /dev/mmcblk0p4 /sailfish<br> | + | '''mount /dev/mmcblk0p4 /sailfish<br> |
- | mount -o bind /proc /sailfish/proc<br> | + | '''mount -o bind /proc /sailfish/proc<br> |
- | mount -o bind /sys /sailfish/sys<br> | + | '''mount -o bind /sys /sailfish/sys<br> |
- | mount -o bind /dev /sailfish/dev<br> | + | '''mount -o bind /dev /sailfish/dev<br> |
- | /usr/sbin/chroot /sailfish<br><br> | + | '''/usr/sbin/chroot /sailfish<br><br> |
- | su<br> | + | '''su<br> |
- | passwd root'''<br> | + | '''passwd root'''<br> |
'''nemo''' # Enter a password for root<br> | '''nemo''' # Enter a password for root<br> | ||
'''nemo''' # Confirm root's password<br> | '''nemo''' # Confirm root's password<br> | ||
Line 254: | Line 254: | ||
'''nemo''' # Confirm nemo's password<br><br> | '''nemo''' # Confirm nemo's password<br><br> | ||
- | zypper in nano # Shouldn't be needed in some images, alternatively<br><br> | + | '''zypper in nano''' # Shouldn't be needed in some images, alternatively<br><br> |
Now let's enable root SSH access in Sailfish. This also allows copying of files to and from sailfish with WinSCP/Filezilla<br><br> | Now let's enable root SSH access in Sailfish. This also allows copying of files to and from sailfish with WinSCP/Filezilla<br><br> | ||
Line 271: | Line 271: | ||
'''umount /sailfish/dev<br> | '''umount /sailfish/dev<br> | ||
- | umount /sailfish/proc<br> | + | '''umount /sailfish/proc<br> |
- | umount /sailfish/sys<br> | + | '''umount /sailfish/sys<br> |
- | umount /sailfish'''<br> | + | '''umount /sailfish'''<br> |
'''exit''' # Exit out of devl-su<br> | '''exit''' # Exit out of devl-su<br> | ||
'''exit''' # Exit out of Terminal | '''exit''' # Exit out of Terminal | ||
Line 279: | Line 279: | ||
Reboot your phone and enjoy SSH/root Terminal on Sailfish! | Reboot your phone and enjoy SSH/root Terminal on Sailfish! | ||
- | |||
==Developer Mode frame rate issue== | ==Developer Mode frame rate issue== |
Revision as of 23:20, 11 December 2013
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:
- 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:
- 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.
- 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").
- If you have boot issues, please consult for help in the Ubiboot thread on talk.maemo.org so the Sailfish thread remains for Sailfish issues!
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".
On your first boot, select your input and display languages. Next, select a theme colour. After going forward, you may have to go back and select your theme colour again and go forward again before the page that allows you to set the date and time appears.
You can then connect to the Internet if you wish to login or sign up for a Jolla account.
On Step 1 of the tutorial, you will be asked to do a edge left-right or edge right-left swipe to minimise the application. Due to an accelerometer bug, you have to swipe from the edge bottom upwards to minimise. You can then press and hold on the minimised Tutorial application view to close it.
To close an application, swipe from edge right to left. To view Notifications, swipe edge left to right. The phone cannot be turned off when the lock-screen is active.
Bugs and Known Issues
- No text correction engine therefore also no Pīnyīn to Hanzi conversion.
- No Android capability as of present.
- Camera does not work.
- Accelerometer does not work.
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