Installing postmarketOS on the Nokia N900

From Bibliotheca Anonoma
Revision as of 04:42, 21 January 2018 by Amersel (talk | contribs) (Change of requirements wording)

PostmarketOS is a touch-optimized, preconfigured Alpine Linux distro for your phone. With support for mainline kernels, this distro may very well become the last OS actively maintained on the N900.

Installation

Requirements

  • You must use a GNU/Linux distro. If you don't have a GNU/Linux distro, you can virtualize one with VirtualBox.
  • At least an 8GB microSD card
  • Python 3.4+ and git
  • Nokia N900 with pali's uboot preinstalled

Initialization

First initialize pmbootstrap for building.

git clone https://github.com/postmarketOS/pmbootstrap
cd pmbootstrap
./pmbootstrap.py init

Type the device name and a username.

Available (50): amazon-thor, asus-flo, asus-grouper, asus-tf101, fairphone-fp2...
Device [nokia-rx51]: nokia-rx51
Username [user]: yourusernamegoeshere

Interface

Choose xfce4 or mate as the user interface and add video drivers. I prefer mate since it appears to be more stable and looks better

Available user interfaces (6): 
* none: No graphical environment
* hildon: (X11) Lightweight GTK+2 UI (optimized for single-touch touchscreens)
* luna: (Wayland) webOS UI, ported from the LuneOS project (Not working yet)
* mate: (X11) MATE Desktop Environment, fork of GNOME2 (stylus recommended)
* plasma-mobile: (Wayland) Mobile variant of KDE Plasma, optimized for touchscreen
* weston: (Wayland) Reference compositor (demo, not a phone interface)
* xfce4: (X11) Lightweight GTK+2 desktop (stylus recommended)
User interface [none]: mate 
Additional packages that will be installed to rootfs. Specify them in a comma separated list (e.g.: vim,file) or "none"
Extra packages []: xf86-video-vesa,mesa-egl,linux-firmware

Flashing onto the sdcard

Finally, install postmarketOS onto the microSD card.

# Replace sdX with the location of your sdcard device
# To disable full disk encryption add --no-fde
./pmbootstrap.py install --sdcard=/dev/sdX

Post Installation

Boot

  • Now boot up postmarketOS by plugging in the sdcard and booting with the keyboard slide open.
  • Select u-boot shell and enter run sdboot

https://wiki.debian.org/DebianOnN900

SSH through USB

SSH is incredibly important for setting up postmarketOS since

During installation, you choose whether you wanted to upload your private keys so you could connect to your device securely. If you do not have an ssh private key, it is strongly recommended that you generate and upload one.

To connect, make sure your n900 was unplugged during boot, plug it into the computer you will ssh from, and connect with:

ssh [email protected]


Touchscreen

As a result of Linux kernel mainlining, the touchscreen was renamed from TSC200X to TSC2005 likely causing an inversion of the y-axis.

Note: If you are running these commands over SSH, you will need to set DISPLAY to :0.0
export DISPLAY=:0.0

Setting the id number of the Evdev Axis Inversion property to 0 1 flips the y-axis.

xinput --set-prop --type=int "TSC2005 touchscreen" "Evdev Axis Inversion" 0 1

Keyboard Configuration

By default, the most UIs will use their own Generic 104-key PC layout which makes it impossible to type certain important characters on the keyboard, thus making it essentially useless when using a terminal.

To switch keyboard layouts, use setxkbmap to set the keyboard to the nokiarx51 layout.

setxkbmap -rules evdev -model nokiarx51 -option grp:ctrl_shift_toggle -layout us,cz -variant ",qwerty"

Wifi

The wifi service should already be running on boot, just create a wpa_supplicant config file and place it in /etc/wpa_supplicant/wpa_supplicant.conf and restart the service.

$ sudo su
# wpa_passphrase $YOUR_SSID > /etc/wpa_supplicant/wpa_supplicant.conf
<enter your passphrase and press Enter>
# rc-service wpa_supplicant restart
# exit

Audio

Sound modules are ready to use, and the speaker is set to on by default. To use headphones you must turn on the headphones using alsamixer and shut the speakers off.