Difference between revisions of "Nokia N900"

From Maemo Leste Wiki
Jump to navigationJump to search
Tag: Manual revert
 
(204 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Stub}}
{{Infobox Device
{{Infobox Device
|image=[[File:Nokia N900 - Leste pre-alpha.jpg|250px]]
|image=[[File:Nokia N900 - Leste pre-alpha.jpg|250px]]
Line 7: Line 5:
|dimensions=110.9mm x 59.8mm x 18mm
|dimensions=110.9mm x 59.8mm x 18mm
|release_date=2009-11-11
|release_date=2009-11-11
|soc=TI OMAP 3430 @600MHz
|category=Supported
|soc=TI OMAP 3430 @600MHz <br>overclock @805MHz <br>Cortex-A8 <br>Armv7‑A
|dram=256 MB Mobile DDR
|dram=256 MB Mobile DDR
|power=
|power=
Line 19: Line 18:
|sensors=
|sensors=
|other=
|other=
|headers=
|battery=1320mAh
|sw_kernel=6.6
|sw_serial=Yes, UART under battery, 2.7V max!
|sw_charging=Yes
|sw_usb_slave=Gadgets only
|sw_usb_host=With hacks
|sw_touchscreen=Yes, single-touch
|sw_keyboard=Yes
|sw_screen=Yes
|sw_hdmi=
|sw_tv=Yes
|sw_3daccel=Yes, closed driver
|sw_vibration=Yes
|sw_audio=Yes (complex, ucm, no speaker protection)
|sw_calls=Yes
|sw_sms=Yes
|sw_wifi=Yes, firmware required
|sw_ethernet=
|sw_irda=Yes, actually CIR, not  IrDA
|sw_2g3gdata=Yes
|sw_4gdata=
|sw_bluetooth=No
|sw_fmtx=Yes
|sw_fmrx=No
|sw_nfc=
|sw_accelerometer=Yes
|sw_compass=
|sw_gyro=
|sw_proximity=Yes
|sw_als=Yes
|sw_gps=Yes
|sw_agps=No
|sw_frontcam=
|sw_backcam=
|sw_idlepower=160mW (WIP)
|sw_standbytime=
}}
}}


The original Nokia N900.
== Installation ==


== Notes ==
The installation consists of two steps: copying the image to the microsd card, and setting up the bootloader on the phone.
 
=== Image installation ===
 
* Latest image: https://phoenix.maemo.org/job/leste-image-n900/lastSuccessfulBuild/artifact/arm-sdk/dist/
* Image archive: https://maedevu.maemo.org/images/n900/
 
dd the image to an sd card.


* If your battery is not calibrated, the battery applet will not give you any data. Charge the battery fully, and then let it discharge (almost) completely.
If using a Windows machine, you can use [https://etcher.io/ Etcher]
* Speakers are enabled by default, but don't overuse them, as you might fry them if you are not careful.


Also see: https://elinux.org/N900
See the next section on how to boot. (using either 0xFFFF/flasher-3.5 or u-boot/bootmenu: http://talk.maemo.org/showthread.php?t=81613)


Power usage right now is reported to be about 80mA, which is quite a lot, but on a good battery last for about 15 hours, this is being worked on: https://github.com/maemo-leste/bugtracker/issues/170
=== Bootloader (U-Boot) setup ===


* https://wiki.maemo.org/N900_Hardware_Power_management
==== Quick ====
* https://wiki.maemo.org/N900_Hardware_Power_Consumption


== Status ==
If you don't want to configure u-boot from Fremantle, or your Fremantle rootfs is broken), or you just want to install quickly (dual boot mode):


{| class="wikitable"
1. Either download 0xFFFF (binary for x86) from https://maedevu.maemo.org/images/n900/tools/ or build from source from https://github.com/pali/0xFFFF/ on *nix systems make sure to $ chmod a+x 0xFFFF
! Feature
! Leste supported
! Notes
|-
| Kernel version || 5.1 || Mainline + PowerVR Patches: https://github.com/maemo-leste/n9xx-linux
|-
| Serial || Yes || Requires special hardware
|-
| Charging || Yes ||
|-
| Wireless || Yes || Involves installing non-free firmware
|-
| Ethernet || N/A ||
|-
| Micro USB || Yes || USB Network, Mass Storage. OTG not working, although it might be possible
|-
| Keyboard || Yes ||
|-
| Screen || Yes || Uses omapfb, not omapdrmfb yet
|-
| 3D Acceleration || Yes || Works fast(!)
|-
| Touchscreen || Yes || Resistive
|-
| Audio || Yes || Everything should work (minus speaker protection), but requires complex alsa configuration
|-
| 2G/3G data || WIP || Works with ofono; UI underway: https://github.com/maemo-leste/connui-cellular ; see https://github.com/maemo-leste/bugtracker/issues/76
|-
| SMS || WIP || Works with ofono, will using telepathy-ring, no UI yet, not enabled by default
|-
| Phone calls || WIP || Reported to work, no UI, poor quality, not enabled by default (might require pulseaudio audio filters)
|-
| Bluetooth || No || Driver problems in mainline
|-
| FM Transmitter || Yes || Install <code>v4l-utils</code>, then enable chip and set frequency using: <code>v4l2-ctl -d /dev/radio0 -c mute=0,tune_power_level=120 -f <freq></code>
|-
| FM Receiver || No || Depends on Bluetooth.  [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/staging?id=757c2bf597a8e9f859f8efceda9c5108607fd98d Removed in Linux 5.4-rc1.]
|-
| Accelerometer || Not yet || Available as input device, needs MCE work
|-
| Compass || N/A || Missing in hardware
|-
| Proximity sensor || Not yet ||
|-
| Ambient Light Sensor || Not yet ||
|-
| Vibration Motor || Yes || No integration yet
|-
| HDMI-out || N/A || Missing in hardware
|-
| TV-out || Yes || Enable in alsamixer (Jack Function in alsamixer to TV OUT), enable with <code>xrandr --output TV --mode 800x480 --same-as LCD</code>. Set PAL/NTSC with <code>xrandr --output TV --set SignalProperties PAL</code>, and scale with <code>xrandr --output TV --set TVScale 90</code>.
|-
| GPS || WIP || Works using gps3 and gpsd, needs integration still
|-
| Infrared || Yes || TX only (hardware limitation).
|}


== Installation ==
2. Download u-boot from https://maedevu.maemo.org/images/n900/tools/ save it in a subfolder called test.


Images: http://maedevu.maemo.org/images/n900/
3. Turn off Nokia N900, issue the following command on PC  <code>sudo ./0xFFFF -m test/u-boot-2013.04-2.bin -l</code>  you will get a message similar to the following:


dd the image to an sd card. If using a Windows machine, you can use [https://etcher.io/ Etcher] '''NB:''' Etcher does not warn you before starting the flashing operation, so please be extra careful that you choose the correct device to flash to
<code>0xFFFF v0.// Open Free Fiasco Firmware Flasher
Not a local device
Waiting for USB device... </code>


Then boot from the sd card using either 0xFFFF/flasher-3.5 or u-boot/bootmenu: http://talk.maemo.org/showthread.php?t=81613
and the connect Nokia N900 to the PC. you will then get a message like so:


=== U-Boot setup ===
<code>Found USB device: RX-51/RM-680/RM-696 (0x421:0x106) in Cold flashing mode
USB device product string: Nokia USB ROM
USB device serial number string: (not detected)
Detected USB device: (not detected) 
Waiting for ASIC ID...
Detected OMAP3430 chip (revision 87)
Device: (not detected)
HW revision: (not detected)
NOLO version: (not detected)
Kernel version: (not detected)
Initfs version: (not detected)
Software release version: (not detected)
Content eMMC version: (not detected)
Root device: (not detected)
USB host mode: (not detected)
R&D mode: (not detected)
Switching to NOLO mode...
Sending OMAP memory boot message...
Waiting for USB device... 
Found USB device: SU-18/RX-34/RX-44/RX-48/RX-51/RM-680/RM-696 (0x421:0x105) in NOLO mode
USB device product string: Nokia N900 (Update mode)
USB device serial number string: MUN233033
Detected USB device: RX-51           
Initializing NOLO...
Device: RX-51
HW revision: 2204
NOLO version: 1.4.14
Kernel version: 2.6.28-20101501+0m5
Initfs version: (not detected)
Software release version: RX-51_2009SE_21.2011.38-1.203.1_PR_203
Content eMMC version: RX-51_2009SE_10.2010.13-2.UK-IRELAND
Root device: flash
USB host mode: disabled
R&D mode: disabled
Load image:
File: test/u-boot-2013.04-2.bin
Image type: kernel
Image size: 212864 bytes
Sending image header...
Sending image...
100% [#################################################################]
Done
</code>


==== If you don't want to use/install Fremantle, or want to install quickly ====
4. Open the keyboard slider on the N900, and then issue following command on PC to test boot: <code>./0xFFFF -b</code> you will get an output such as:


1. Download 0xFFFF and u-boot from https://maedevu.maemo.org/images/n900/tools/
<code>0xFFFF v0.// Open Free Fiasco Firmware Flasher
Not a local device
Waiting for USB device...
Found USB device: SU-18/RX-34/RX-44/RX-48/RX-51/RM-680/RM-696 (0x421:0x105) in NOLO mode
USB device product string: Nokia N900 (Update mode)
USB device serial number string: MUN233033
Detected USB device: RX-51           
Initializing NOLO...
Device: RX-51
HW revision: 2204
NOLO version: 1.4.14
Kernel version: 2.6.28-20101501+0m5
Initfs version: (not detected)
Software release version: RX-51_2009SE_21.2011.38-1.203.1_PR_203
Content eMMC version: RX-51_2009SE_10.2010.13-2.UK-IRELAND
Root device: flash
USB host mode: disabled
R&D mode: disabled
Booting kernel with default cmdline...
</code>


2. Turn off Nokia N900, issue the following command on PC and connect Nokia N900 to the PC: '''sudo ./0xFFFF -m test/u-boot-2013.04-2.bin -l'''
This should present u-boot from which you can select external SD card and boot to Maemo Leste. The screen might not be backlit so it will be difficult to read. If you are presented with a menu, select the option to boot from External SD card. If you just get a command prompt, type <code>run sdboot</code>. The screen might be very dim and look off. So it might be difficult to see. Boot up the first time will take a long time full 2 min on test. Some text will show and will then go back to black screen but eventually you will see the splash screen and later the icons will show.  


3. Open the keyboard slider on the N900, and then issue following command on PC to test boot: '''./0xFFFF -b'''


This should present u-boot from which you can select external SD card and boot to Maemo Leste. If you are presented with a menu, select the option to boot from External SD card. If you just get a command prompt, type '''run sdboot'''.
To flash u-boot permanently, you can issue the following command


To flash u-boot permanently, you can issue the following command '''(BE CAREFUL THOUGH, AS THIS WILL REPLACE THE EXISTING FREMANTLE KERNEL, ONLY DO THIS IF YOU DO NOT CARE ABOUT THE EXISTING MAEMO INSTALLATION)''':
'''(Be careful though. This will replace the existing fremantle kernel. Only do this if you do not care about the existing maemo installation or you know how to recover from this condition)''')


'''sudo ./0xFFFF -m test/u-boot-2013.04-2.bin -f'''
<code>sudo ./0xFFFF -m test/u-boot-2013.04-2.bin -f</code>


==== Existing Fremantle ====
==== Existing Fremantle ====
If you have a functional Fremantle installation, you can follow these steps instead:


1. Install "U-Boot with kernel 2.6.28-omap1"
1. Install "U-Boot with kernel 2.6.28-omap1"
Line 134: Line 183:
  u-boot-update-bootmenu
  u-boot-update-bootmenu


4. Reboot the device
4. Reboot the device with the keyboard slide open (U-boot will boot the default option if the keyboard slide is closed)


=== Increase filesystem size ===
=== Increase filesystem size ===
As of 2018/11, the latest pre-alpha image results in a 1.2GB root filesystem with about 100MB to spare. This can be extended, provided that your SD card is big enough.
Perform the following steps on a Linux machine with none of the SD card's partitions mounted:
* assumption: /dev/sda2 is Leste root partition
* e2fsck -f /dev/sda2
* use parted/gparted/cfdisk/... to enlarge /dev/sda2 to the desired size
* resize2fs -p /dev/sda2
* e2fsck -f /dev/sda2


The latest images have a script, <code>/etc/expandcard.sh</code> from https://github.com/maemo-leste/image-builder/blob/master/rootfs-overlay/common/etc/expandcard.sh
Run the following script: <code>/etc/expandcard.sh</code>


=== Serial ===
== Serial ==


http://n900.elektranox.org/serial-adapter.html
http://n900.elektranox.org/serial-adapter.html


http://wiki.maemo.org/N900_Hardware_Hacking#Debug_ports
http://wiki.maemo.org/N900_Hardware_Hacking#Debug_ports
Use this command line (specifically the part after rootwait):
<pre>
root=/dev/mmcblk0p2 rootwait console=ttyS2,115200 verbose earlyprintk debug
</pre>
== Notes ==
=== Speakers ===
* Speakers are enabled by default, but be careful of very high frequencies/levels - there are concerns regarding the possibility to blow them. There is no clear consensus about this, but it is best to err on the side of caution.
=== Torch ===
The N900 has an Analog Devices ADP1653 flash controller, mainly for use with the camera. It drives two white power LEDs connected in series, and has an additional red indicator led (referred to as a privacy indicator). The ADP1653 has a driver in mainline kernel, and it probes fine. However, some DTS changes are needed to make it work, since the driver requires it to be tied to a camera.
In the meantime, the LEDs can be used as a torch manually using <code>i2cset</code>.
However, '''BE WARNED:''' setting wrong values via i2c runs the risk of over-driving the LEDs and causing permanent hardware damage.
<source lang="shell-session">
Install the prerequisites
$ sudo apk add i2c-tools
Unload the driver in case it is already loaded. We will use i2c manually
$ sudo modprobe -r adp1653
Enable the chip
$ echo 88 | sudo tee /sys/class/gpio/export
$ echo "out" | sudo tee /sys/class/gpio/gpio88/direction
$ echo 1 | sudo tee /sys/class/gpio/gpio88/value
Turn the torch on, using the lowest torch current - DO NOT use other values here or you risk burning the LED
Values between 1 and 7 enable the red privacy/recording led, with different intensity
0x8 is the lowest torch intensity, and we do not recommend going above it
$ sudo i2cset -y 2 0x30 0x0 0x8
Turn the torch off
$ sudo i2cset -y 2 0x30 0x0 0x0
Disable the chip
$ echo 0 | sudo tee /sys/class/gpio/gpio88/value
$ echo 88 | sudo tee /sys/class/gpio/unexport
</source>


== Power Management ==
== Power Management ==
This ticket tracks hitting idle states for the N900: https://github.com/maemo-leste/bugtracker/issues/545
Power usage right now is reported to be about 45mA (idle, modem ON and data ON). On a good battery this will last for about 30 hours. Power management on the N900 is being worked on: https://github.com/maemo-leste/bugtracker/issues/170
* https://wiki.maemo.org/N900_Hardware_Power_management
* https://wiki.maemo.org/N900_Hardware_Power_Consumption


Run:
Run:
Line 167: Line 259:
Currently it does not yet reliably reach any sleep modes.
Currently it does not yet reliably reach any sleep modes.


== Accessing MTD ==
See this code for a work in progress power management script: https://github.com/maemo-leste/n900-pm
 
List devices:
cat /proc/mtd
 
Mount:
apt install mtd-utils
mkdir -vp /mnt/fremantle
ubiattach -p /dev/mtd5
mount -t ubifs ubi:rootfs /mnt/fremantle


== Battery calibration ==
== Battery calibration ==
Line 195: Line 278:
Tip 1. If for any reason you want to reset the battery calibration value to see the message “Battery is not calibrated” again, you should remove the battery from the device for about 6 hours.
Tip 1. If for any reason you want to reset the battery calibration value to see the message “Battery is not calibrated” again, you should remove the battery from the device for about 6 hours.
Tip 2. If you replace the battery, you may want to do 1-2 calibration cycles described above to update the gauge for your new battery.
Tip 2. If you replace the battery, you may want to do 1-2 calibration cycles described above to update the gauge for your new battery.
== Accessing MTD ==
List devices:
cat /proc/mtd
Mount:
apt install mtd-utils
mkdir -vp /mnt/fremantle
ubiattach -p /dev/mtd5
mount -t ubifs ubi:rootfs /mnt/fremantle
== Overclocking (optional) ==
'''Overclocking is now available in -devel using cpufreq boost.'''
It uses 250-500-550-600-720-805MHz frequencies
To enable it, edit:
<code>/sys/devices/system/cpu/cpufreq/boost</code>
And replace 0 by 1.
It is possible to customise max/min/available frequencies editing files in:
<code>/sys/devices/system/cpu/cpu0/cpufreq/</code>
'''No other steps are needed and updates/upgrades work with boost mode.'''
Installing cpufrequtils is useful to change frequency governors.
Prefer "conservative" instead of "ondemand" governor.
"Performance" governor locks N900 at 805MHz.
As root
<code>cpufreq-set -c 0 -g conservative</code>
'''WARNING: some devices can't run at 805MHz. For this specific case, select powersave governor instead of ondemand, activate boost mode, replace 805000 by 720000 in scaling_max_freq file and finally select conservative governor'''
== Overclocking - Old method for testing purpose ==
To be able to overclock two steps are needed:
1) From Fremantle: add new Maemo Leste menu item (run as root):
cat > /etc/bootmenu.d/30-maemo-leste-Overclock.item << "EOF" &&
ITEM_NAME="Maemo Leste Overclock"
ITEM_KERNEL="uImageX"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_FSTYPE="ext2"
EOF
u-boot-update-bootmenu
2) From Maemo Leste (run as root):
<code>cp /usr/lib/linux-image-omap/omap3-n900.dtb /home/user</code>
<code>dtc -I dtb -O dts /home/user/omap3-n900.dtb -o /home/user/omap3-n900.dts</code>
(wait for a few seconds...)
<code>chmod +w /home/user/omap3-n900.dts</code>
(then the funny part...)
<code>nano /home/user/omap3-n900.dts</code>
(Now it's time to modify frequencies and voltage: be careful to do exactly the same)
Find "opp-table" with <code>ctl+w</code> and Replace all content in "opp-table { opp1 opp2 opp3 opp4 opp5 opp6 };"
New opp-table for example:
<pre>opp-table {
compatible = "operating-points-v2-ti-cpu";
syscon = < 0x05 >;
phandle = < 0x03 >;
opp1-250000000 {
opp-hz = < 0x00 0xee6b280 >;
opp-microvolt = < 0xee098 0xee098 0xee098 >;
opp-supported-hw = < 0xffffffff 0x03 >;
};
opp2-500000000 {
opp-hz = < 0x00 0x1dcd6500 >;
opp-microvolt = < 0x106738 0x106738 0x106738 >;
opp-supported-hw = < 0xffffffff 0x03 >;
opp-suspend;
};
opp3-600000000 {
opp-hz = < 0x00 0x23c34600 >;
opp-microvolt = < 0x124f80 0x124f80 0x124f80 >;
opp-supported-hw = < 0xffffffff 0x03 >;
};
opp4-720000000 {
opp-hz = < 0x00 0x2aea5400 >;
opp-microvolt = < 0x124f80 0x124f80 0x124f80 >;
opp-supported-hw = < 0xffffffff 0x03 >;
};
opp5-850000000 {
opp-hz = < 0x00 0x32a9f880 >;
opp-microvolt = < 0x149970 0x149970 0x149970 >;
opp-supported-hw = < 0xffffffff 0x03 >;
};
};</pre>
Then <code>ctl+x</code> to save and close.
And still as root:
<code>rm /home/user/omap3-n900.dtb</code>
<code>dtc -I dts -O dtb /home/user/omap3-n900.dts -o /home/user/omap3-n900.dtb</code>
Check your kernel version:
<code>uname -r</code>
For example if the result is 6.1.30, your vmlinuz version is vmlinuz-6.1.30
In the next command, replace "vmlinuz-<version>" by yours (ie vmlinuz-6.1.30)
As root:
<code>cat /boot/vmlinuz-<version> /home/user/omap3-n900.dtb > /tmp/zImage_dtb</code>
<code>mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -d /tmp/zImage_dtb /boot/uImageX</code>
That's it !
Now reboot and select "Maemo Leste Overclock in bootmenu".
('''WARNING with old method:''' always use stock "Maemo Leste" in bootmenu before dist-upgrade / kernel update. (New uImageX must be created again and old uImageX must be removed))
== Tips / Tweaks ==
=== SD Card and first boot===
To avoid overall slowness, SDXC U3 microSD card is a must. Class10 U1 cards are usually too slow to run Leste on N900 unfortunately, most probably because of their lower build quality.
'''WARNING''': unresponsive / freezing screen is normal during Hildon-desktop loading.
First boot is a bit complicated because Leste is loading lot of things even if hildon-desktop is already visible (wait at least 3 min before clicking somewhere).
Connecting to Wi-Fi must be avoided until the second boot (otherwise apt-worker starts automatically and N900 is unresponsive for few minutes).
Don't forget to run /etc/expandcard.sh on first boot and check if swap is activated.
Then reboot.
'''Note:''' it is recommended to dist-upgrade to -devel to enable more features by adding
<pre>deb https://maedevu.maemo.org/leste chimaera-devel main contrib non-free  n900</pre>
in <pre>/etc/apt/sources.list</pre>
('''Warning:''' don't remove other sources in this file)
=== Gnome-tracker in $HOME ===
By default trackers are indexing the entire $HOME folder, causing severe slowdown.
To avoid this issue, the solution (until a proper fix) is to add a .nomedia file in /home/user folder:
<pre>touch /home/user/.nomedia</pre>
=== Deactivating apt-worker ===
Run:
<pre>gconftool -s --type int /apps/hildon/update-notifier/check_interval 2147483647</pre>
=== Removing 250MHz CPU frequency (example) ===
Install cpufrequtils.
Replace 250000 by 500000 in  <pre>/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq</pre>
=== More SWAP / SWAP activation (testing purpose) ===
('''Note: SWAP is already activated by default''')
Enabling swap on eMMC 768MB partition if not already activated on first boot (works on the fly):
<pre>sudo swapon /dev/mmcblk1p3</pre>  (editing /etc/fstab/ is not needed and done automatically on next reboot)
'''Other possibility:''' create a simple 1GB swap file on the SDcard if swap is missing:
<pre>sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576</pre>
(It takes some time...)
<pre>sudo chmod 600 /swapfile</pre>
<pre>sudo mkswap /swapfile</pre>
<pre>sudo swapon /swapfile</pre>
To make the change permanent open:
<pre>sudo nano /etc/fstab</pre>
And add this line:
<pre>/swapfile swap swap defaults 0 0</pre>
To check if the swap is active:
<pre>sudo swapon --show</pre>
=== Tweaking Transitions ===
Many options are missing in CSSU Features package but it is possible to edit them in transitions.ini.
As root
<code>nano /usr/share/hildon-desktop/transitions.ini</code>
See Fremantle documentation for perfect setup.
'''Note: like Fremantle, blur effect can cause lags and slowness.''' It is possible to deactivate/modify it through the transitions.ini file:
<pre>[HOME]
radius = 1
radius_more = 2
</pre>
=== Web browsing ===
Links2 is currently the fastest and the most usable web browser on N900 -using an easy tweak-
<pre>sudo apt install links2</pre>
To use it in graphical mode, run in terminal:
<pre>links2 -g</pre> or press the hildon desktop icon.
Then press <code>Ctl + Shift + N</code> to disable Hildon composition -links2 performances will increase a lot-
Press <code>Ctl + Shift + N</code> if you want to enable Hildon composition again.
=== Video playing ===
Video playing is working fine using SMPLAYER:
- In Options / Preferences / General:
Media engine: Other: /user/bin/mplayer
- In Options / Preferences / Video:
Output driver: xv (0 - OMAP Textured Video)
Only unable Double buffering and Disable screensaver
- In Options / Preferences / Audio:
Output driver: pulse (or User defined)
Disable everything else
Channel by default: 2 (Stereo)
High speed playback: Auto
- In Options / Preferences / Performance:
Unable Allow frame drop
Hardware decoding: None
Prefer 360p - 480p max video format
(With overclocking, Video is working well using KODI 17.6 with equivalent A/V settings)
=== Voice Calls / SIP Calls ===
- Dist-upgrade to -devel (not working without)
Now SIP calls and SIP messages are working out of the box using Twinkle.
Voice calls are now working out of the box as well.
If sound is distorted, run:
<code>sudo chrt -a -f -p 99 $(pgrep pulseaudio)</code>
== Status table ==
{| class="wikitable"
! Feature
! Leste supported
! Notes
|-
| Kernel version || 6.6 LTS || Mainline + PowerVR Patches: https://github.com/maemo-leste/droid4-linux
|-
| Serial || Yes || Requires special hardware
|-
| Charging || Yes ||
|-
| Wireless || Yes || Firmware is non-free
|-
| Ethernet || N/A ||
|-
| Micro USB || Yes || USB Network, Mass Storage. OTG not working, although it might be possible
|-
| Keyboard || Yes ||
|-
| Screen || Yes ||
|-
| 3D Acceleration || Yes || closed PowerVR driver
|-
| Overclock || Yes || up to 805MHz (stable & supported), 850MHz works with some devices (not supported), Turbo mode works
|-
| Touchscreen || Yes || Resistive
|-
| Audio || Yes || Works (minus speaker protection), UCM support with Jack plug/unplug detection and FMTX
|-
| Video || Yes || Xv acceleration, up to 360-480p. Max 360p for online streaming with SMplayer.
|-
| 2G/3G/3.5G data || Yes || Works with ofono - UI is working, see https://github.com/maemo-leste/connui-cellular/
|-
| 4G data || N/A || no hardware
|-
| SMS || Yes || Works with Sphone or ofono scripts. Works with Conversations in -devel.
|-
| Phone calls || Yes || UCM support, sound is good. Works in 2G, 3G and 3.5G mode, works with Sphone
|-
| SIP calls / IM || Yes || Works with Twinkle, TLS transport is supported, Telepathy/Sphone integration is WIP
|-
| Bluetooth || No || Driver needs some work
|-
| FM Transmitter || Yes || Select 'FM Transmitter' in Pavucontrol
Install <code>v4l-utils</code> and set frequency using: <code>v4l2-ctl -d /dev/radio0 -c mute=0,tune_power_level=120 -f <freq></code>
|-
| FM Receiver || No || Depends on working Bluetooth stack
|-
| Accelerometer || Yes || Not used in Leste at the moment, since UI rotation does not work on N900
|-
| Compass || N/A || No hardware
|-
| Gyro || N/A|| No hardware
|-
| Proximity sensor || Yes || evdev interface not supported in mce since it depends on iio-sensor-proxy support. https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/363 for possible 'fix'
|-
| Ambient Light Sensor || Yes ||
|-
| Vibration Motor || Yes ||
|-
| HDMI-out || N/A || No hardware
|-
| TV-out || Yes || Enable in alsamixer (Jack Function in alsamixer to TV OUT), enable with <code>xrandr --output TV --mode 800x480 --same-as LCD</code>. Set PAL/NTSC with <code>xrandr --output TV --set SignalProperties PAL</code>, and scale with <code>xrandr --output TV --set TVScale 90</code>
|-
| GPS || Yes ||
|-
| Infrared || Yes || TX only (hardware limitation). Works with pwm-ir-tx driver (patched)
|-
| Camera || No || Needs complex v4l work, no leste integration
|-
| Idle power consumption || ~160mW / up to 30 hours || Device does not enter RET or OFF mode
|}




[[Category:Device]]
[[Category:Device]]

Latest revision as of 20:40, 14 September 2024

Nokia N900
Nokia N900 - Leste pre-alpha.jpg
Manufacturer Nokia
Codename Rover, RX-51
Dimensions 110.9mm x 59.8mm x 18mm
Release Date 2009-11-11
Category Supported
Specifications
SoC TI OMAP 3430 @600MHz
overclock @805MHz
Cortex-A8
Armv7‑A
DRAM 256 MB Mobile DDR
Hardware Features
LCD 800x480 3.5" Resistive TFT
Video PowerVR SGX530
Network WL1251
Storage 32GB
USB (Host/OTG) Micro USB 2.0 Slave
Battery Capacity 1320mAh
Software Features
Kernel 6.6
Serial Yes, UART under battery, 2.7V max!
Charging Yes
USB Slave Gadgets only
USB Host With hacks
Touchscreen Yes, single-touch
Keyboard Yes
Screen Yes
TV-out Yes
3D acceleration Yes, closed driver
Vibration motor Yes
Audio Yes (complex, ucm, no speaker protection)
Phone calls Yes
SMS Yes
Wifi Yes, firmware required
IrDA Yes, actually CIR, not IrDA
2G/3G data Yes
Bluetooth No
FM transmitter Yes
FM receiver No
Accelerometer Yes
Proximity Sensor Yes
Ambient Light Sensor Yes
GPS Yes
A-GPS No
Idle Power Consumption 160mW (WIP)

Installation

The installation consists of two steps: copying the image to the microsd card, and setting up the bootloader on the phone.

Image installation

dd the image to an sd card.

If using a Windows machine, you can use Etcher

See the next section on how to boot. (using either 0xFFFF/flasher-3.5 or u-boot/bootmenu: http://talk.maemo.org/showthread.php?t=81613)

Bootloader (U-Boot) setup

Quick

If you don't want to configure u-boot from Fremantle, or your Fremantle rootfs is broken), or you just want to install quickly (dual boot mode):

1. Either download 0xFFFF (binary for x86) from https://maedevu.maemo.org/images/n900/tools/ or build from source from https://github.com/pali/0xFFFF/ on *nix systems make sure to $ chmod a+x 0xFFFF

2. Download u-boot from https://maedevu.maemo.org/images/n900/tools/ save it in a subfolder called test.

3. Turn off Nokia N900, issue the following command on PC sudo ./0xFFFF -m test/u-boot-2013.04-2.bin -l you will get a message similar to the following:

0xFFFF v0.8 // Open Free Fiasco Firmware Flasher Not a local device Waiting for USB device...

and the connect Nokia N900 to the PC. you will then get a message like so:

Found USB device: RX-51/RM-680/RM-696 (0x421:0x106) in Cold flashing mode
USB device product string: Nokia USB ROM
USB device serial number string: (not detected)
Detected USB device: (not detected)   
Waiting for ASIC ID...
Detected OMAP3430 chip (revision 87)
Device: (not detected)
HW revision: (not detected)
NOLO version: (not detected)
Kernel version: (not detected)
Initfs version: (not detected)
Software release version: (not detected)
Content eMMC version: (not detected)
Root device: (not detected)
USB host mode: (not detected)
R&D mode: (not detected)
Switching to NOLO mode...
Sending OMAP memory boot message...
Waiting for USB device...  
Found USB device: SU-18/RX-34/RX-44/RX-48/RX-51/RM-680/RM-696 (0x421:0x105) in NOLO mode
USB device product string: Nokia N900 (Update mode)
USB device serial number string: MUN233033
Detected USB device: RX-51            
Initializing NOLO...
Device: RX-51
HW revision: 2204
NOLO version: 1.4.14
Kernel version: 2.6.28-20101501+0m5
Initfs version: (not detected)
Software release version: RX-51_2009SE_21.2011.38-1.203.1_PR_203
Content eMMC version: RX-51_2009SE_10.2010.13-2.UK-IRELAND
Root device: flash
USB host mode: disabled
R&D mode: disabled
Load image:
File: test/u-boot-2013.04-2.bin
Image type: kernel
Image size: 212864 bytes
Sending image header...
Sending image...
100% [#################################################################]
Done

4. Open the keyboard slider on the N900, and then issue following command on PC to test boot: ./0xFFFF -b you will get an output such as:

0xFFFF v0.8  // Open Free Fiasco Firmware Flasher
Not a local device
Waiting for USB device...  
Found USB device: SU-18/RX-34/RX-44/RX-48/RX-51/RM-680/RM-696 (0x421:0x105) in NOLO mode
USB device product string: Nokia N900 (Update mode)
USB device serial number string: MUN233033
Detected USB device: RX-51            
Initializing NOLO...
Device: RX-51
HW revision: 2204
NOLO version: 1.4.14
Kernel version: 2.6.28-20101501+0m5
Initfs version: (not detected)
Software release version: RX-51_2009SE_21.2011.38-1.203.1_PR_203
Content eMMC version: RX-51_2009SE_10.2010.13-2.UK-IRELAND
Root device: flash
USB host mode: disabled
R&D mode: disabled
Booting kernel with default cmdline...

This should present u-boot from which you can select external SD card and boot to Maemo Leste. The screen might not be backlit so it will be difficult to read. If you are presented with a menu, select the option to boot from External SD card. If you just get a command prompt, type run sdboot. The screen might be very dim and look off. So it might be difficult to see. Boot up the first time will take a long time full 2 min on test. Some text will show and will then go back to black screen but eventually you will see the splash screen and later the icons will show.


To flash u-boot permanently, you can issue the following command

(Be careful though. This will replace the existing fremantle kernel. Only do this if you do not care about the existing maemo installation or you know how to recover from this condition))

sudo ./0xFFFF -m test/u-boot-2013.04-2.bin -f

Existing Fremantle

If you have a functional Fremantle installation, you can follow these steps instead:

1. Install "U-Boot with kernel 2.6.28-omap1"

2. Install "Linux kernel for power user (boot image for U-Boot)". This is optional, but recommended.

3. Add Maemo Leste menu item (run as root):

cat > /etc/bootmenu.d/30-maemo-leste.item << "EOF" &&
ITEM_NAME="Maemo Leste"
ITEM_KERNEL="uImage"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_FSTYPE="ext2"
EOF
u-boot-update-bootmenu

4. Reboot the device with the keyboard slide open (U-boot will boot the default option if the keyboard slide is closed)

Increase filesystem size

Run the following script: /etc/expandcard.sh

Serial

http://n900.elektranox.org/serial-adapter.html

http://wiki.maemo.org/N900_Hardware_Hacking#Debug_ports

Use this command line (specifically the part after rootwait):

root=/dev/mmcblk0p2 rootwait console=ttyS2,115200 verbose earlyprintk debug

Notes

Speakers

  • Speakers are enabled by default, but be careful of very high frequencies/levels - there are concerns regarding the possibility to blow them. There is no clear consensus about this, but it is best to err on the side of caution.

Torch

The N900 has an Analog Devices ADP1653 flash controller, mainly for use with the camera. It drives two white power LEDs connected in series, and has an additional red indicator led (referred to as a privacy indicator). The ADP1653 has a driver in mainline kernel, and it probes fine. However, some DTS changes are needed to make it work, since the driver requires it to be tied to a camera.

In the meantime, the LEDs can be used as a torch manually using i2cset. However, BE WARNED: setting wrong values via i2c runs the risk of over-driving the LEDs and causing permanent hardware damage.

Install the prerequisites
$ sudo apk add i2c-tools

Unload the driver in case it is already loaded. We will use i2c manually
$ sudo modprobe -r adp1653

Enable the chip
$ echo 88 | sudo tee /sys/class/gpio/export
$ echo "out" | sudo tee /sys/class/gpio/gpio88/direction
$ echo 1 | sudo tee /sys/class/gpio/gpio88/value

Turn the torch on, using the lowest torch current - DO NOT use other values here or you risk burning the LED
Values between 1 and 7 enable the red privacy/recording led, with different intensity
0x8 is the lowest torch intensity, and we do not recommend going above it
$ sudo i2cset -y 2 0x30 0x0 0x8

Turn the torch off
$ sudo i2cset -y 2 0x30 0x0 0x0

Disable the chip
$ echo 0 | sudo tee /sys/class/gpio/gpio88/value
$ echo 88 | sudo tee /sys/class/gpio/unexport

Power Management

This ticket tracks hitting idle states for the N900: https://github.com/maemo-leste/bugtracker/issues/545

Power usage right now is reported to be about 45mA (idle, modem ON and data ON). On a good battery this will last for about 30 hours. Power management on the N900 is being worked on: https://github.com/maemo-leste/bugtracker/issues/170


Run:

modprobe ledtrig-default-on

And:

echo default-on > /sys/class/leds/debug::sleep/trigger

To enable the OMAP sleep debug LEDs (on the keyboard). Open keyboard, turn off the screen with the slider, and the LEDs will turn off if the phone ever reaches sleep modes.

Currently it does not yet reliably reach any sleep modes.

See this code for a work in progress power management script: https://github.com/maemo-leste/n900-pm

Battery calibration

Nokia N900 has bq27200 integrated circuit for monitoring battery state. The datasheet can be found here: http://www.ti.com/lit/ds/symlink/bq27200.pdf. If you are curious, check the section called "Gas Gauge Operation" for how the battery calibration is done in a low level.

Here are described the steps necessary to calibrate your battery. This should help if you see "Battery not calibrated" message in the status applet.

  • Fully charge Nokia N900. Don't detach the charger immediately, give it some time after you see "Fully charged" message (10 minutes should be enough).
  • Detach the charger and don't attach it again until the battery is fully depleted. Remember: if you attach the charger (or USB cable) at least once, you will need to start the calibration from the beginning (fully charge the device again).
  • You may use the device as you normally do. You may power it off, power it on, reboot. All as usual. Just don't connect the device to a charger or a PC using the USB cable.
  • When your Nokia N900 has battery depleted, it will alarm you with the "battery low" sound.
  • Wait for about 20 seconds and attach the charger. If the device was powered off because of battery depletion, it's fine. The battery should have done the calibration cycle. Just attach the charger to the device, give it a minute and press power button to start booting.
  • If you still see "Battery not calibrated" message, reboot the device.

After the first calibration cycle you will see that it has ~1700 mAh for the fully charged battery. This value is wrong. It's how the battery calibration works in low level: it can't change the fully charged value of the battery in steps that exceed 12.5%. What this means for us: it's needed to repeat the calibration cycle several times to get more accurate value. It may take about 3-7 calibration cycles to get the proper mAh value for fully charged battery. If you spend some time on this process, you will get really accurate battery gauge and you will always know how much charge is remaining.

Tip 1. If for any reason you want to reset the battery calibration value to see the message “Battery is not calibrated” again, you should remove the battery from the device for about 6 hours. Tip 2. If you replace the battery, you may want to do 1-2 calibration cycles described above to update the gauge for your new battery.

Accessing MTD

List devices:

cat /proc/mtd

Mount:

apt install mtd-utils
mkdir -vp /mnt/fremantle
ubiattach -p /dev/mtd5
mount -t ubifs ubi:rootfs /mnt/fremantle

Overclocking (optional)

Overclocking is now available in -devel using cpufreq boost.

It uses 250-500-550-600-720-805MHz frequencies

To enable it, edit:

/sys/devices/system/cpu/cpufreq/boost

And replace 0 by 1.

It is possible to customise max/min/available frequencies editing files in:

/sys/devices/system/cpu/cpu0/cpufreq/

No other steps are needed and updates/upgrades work with boost mode.

Installing cpufrequtils is useful to change frequency governors.

Prefer "conservative" instead of "ondemand" governor.

"Performance" governor locks N900 at 805MHz.

As root cpufreq-set -c 0 -g conservative


WARNING: some devices can't run at 805MHz. For this specific case, select powersave governor instead of ondemand, activate boost mode, replace 805000 by 720000 in scaling_max_freq file and finally select conservative governor

Overclocking - Old method for testing purpose

To be able to overclock two steps are needed:

1) From Fremantle: add new Maemo Leste menu item (run as root):

cat > /etc/bootmenu.d/30-maemo-leste-Overclock.item << "EOF" &&
ITEM_NAME="Maemo Leste Overclock"
ITEM_KERNEL="uImageX"
ITEM_DEVICE="${EXT_CARD}p1"
ITEM_FSTYPE="ext2"
EOF
u-boot-update-bootmenu

2) From Maemo Leste (run as root):

cp /usr/lib/linux-image-omap/omap3-n900.dtb /home/user

dtc -I dtb -O dts /home/user/omap3-n900.dtb -o /home/user/omap3-n900.dts

(wait for a few seconds...)

chmod +w /home/user/omap3-n900.dts

(then the funny part...)

nano /home/user/omap3-n900.dts

(Now it's time to modify frequencies and voltage: be careful to do exactly the same)

Find "opp-table" with ctl+w and Replace all content in "opp-table { opp1 opp2 opp3 opp4 opp5 opp6 };"

New opp-table for example:

opp-table {
		compatible = "operating-points-v2-ti-cpu";
		syscon = < 0x05 >;
		phandle = < 0x03 >;

		opp1-250000000 {
			opp-hz = < 0x00 0xee6b280 >;
			opp-microvolt = < 0xee098 0xee098 0xee098 >;
			opp-supported-hw = < 0xffffffff 0x03 >;
		};

		opp2-500000000 {
			opp-hz = < 0x00 0x1dcd6500 >;
			opp-microvolt = < 0x106738 0x106738 0x106738 >;
			opp-supported-hw = < 0xffffffff 0x03 >;
			opp-suspend;
		};

		opp3-600000000 {
			opp-hz = < 0x00 0x23c34600 >;
			opp-microvolt = < 0x124f80 0x124f80 0x124f80 >;
			opp-supported-hw = < 0xffffffff 0x03 >;
		};

		opp4-720000000 {
			opp-hz = < 0x00 0x2aea5400 >;
			opp-microvolt = < 0x124f80 0x124f80 0x124f80 >;
			opp-supported-hw = < 0xffffffff 0x03 >;
		};

		opp5-850000000 {
			opp-hz = < 0x00 0x32a9f880 >;
			opp-microvolt = < 0x149970 0x149970 0x149970 >;
			opp-supported-hw = < 0xffffffff 0x03 >;
		};
	};

Then ctl+x to save and close.

And still as root:

rm /home/user/omap3-n900.dtb

dtc -I dts -O dtb /home/user/omap3-n900.dts -o /home/user/omap3-n900.dtb


Check your kernel version:

uname -r

For example if the result is 6.1.30, your vmlinuz version is vmlinuz-6.1.30

In the next command, replace "vmlinuz-<version>" by yours (ie vmlinuz-6.1.30)

As root:

cat /boot/vmlinuz-<version> /home/user/omap3-n900.dtb > /tmp/zImage_dtb

mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -d /tmp/zImage_dtb /boot/uImageX

That's it !

Now reboot and select "Maemo Leste Overclock in bootmenu".


(WARNING with old method: always use stock "Maemo Leste" in bootmenu before dist-upgrade / kernel update. (New uImageX must be created again and old uImageX must be removed))

Tips / Tweaks

SD Card and first boot

To avoid overall slowness, SDXC U3 microSD card is a must. Class10 U1 cards are usually too slow to run Leste on N900 unfortunately, most probably because of their lower build quality.

WARNING: unresponsive / freezing screen is normal during Hildon-desktop loading.

First boot is a bit complicated because Leste is loading lot of things even if hildon-desktop is already visible (wait at least 3 min before clicking somewhere). Connecting to Wi-Fi must be avoided until the second boot (otherwise apt-worker starts automatically and N900 is unresponsive for few minutes). Don't forget to run /etc/expandcard.sh on first boot and check if swap is activated. Then reboot.


Note: it is recommended to dist-upgrade to -devel to enable more features by adding

deb https://maedevu.maemo.org/leste chimaera-devel main contrib non-free  n900

in

/etc/apt/sources.list

(Warning: don't remove other sources in this file)

Gnome-tracker in $HOME

By default trackers are indexing the entire $HOME folder, causing severe slowdown.

To avoid this issue, the solution (until a proper fix) is to add a .nomedia file in /home/user folder:

touch /home/user/.nomedia

Deactivating apt-worker

Run:

gconftool -s --type int /apps/hildon/update-notifier/check_interval 2147483647


Removing 250MHz CPU frequency (example)

Install cpufrequtils.

Replace 250000 by 500000 in

/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

More SWAP / SWAP activation (testing purpose)

(Note: SWAP is already activated by default)

Enabling swap on eMMC 768MB partition if not already activated on first boot (works on the fly):

sudo swapon /dev/mmcblk1p3

(editing /etc/fstab/ is not needed and done automatically on next reboot)


Other possibility: create a simple 1GB swap file on the SDcard if swap is missing:

sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576

(It takes some time...)

sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

To make the change permanent open:

sudo nano /etc/fstab

And add this line:

/swapfile swap swap defaults 0 0

To check if the swap is active:

sudo swapon --show

Tweaking Transitions

Many options are missing in CSSU Features package but it is possible to edit them in transitions.ini.

As root

nano /usr/share/hildon-desktop/transitions.ini

See Fremantle documentation for perfect setup.

Note: like Fremantle, blur effect can cause lags and slowness. It is possible to deactivate/modify it through the transitions.ini file:

[HOME]

radius = 1

radius_more = 2

Web browsing

Links2 is currently the fastest and the most usable web browser on N900 -using an easy tweak-

sudo apt install links2

To use it in graphical mode, run in terminal:

links2 -g

or press the hildon desktop icon.


Then press Ctl + Shift + N to disable Hildon composition -links2 performances will increase a lot-


Press Ctl + Shift + N if you want to enable Hildon composition again.


Video playing

Video playing is working fine using SMPLAYER:

- In Options / Preferences / General:

Media engine: Other: /user/bin/mplayer

- In Options / Preferences / Video:

Output driver: xv (0 - OMAP Textured Video)

Only unable Double buffering and Disable screensaver


- In Options / Preferences / Audio:

Output driver: pulse (or User defined)

Disable everything else

Channel by default: 2 (Stereo)

High speed playback: Auto

- In Options / Preferences / Performance:

Unable Allow frame drop

Hardware decoding: None

Prefer 360p - 480p max video format

(With overclocking, Video is working well using KODI 17.6 with equivalent A/V settings)

Voice Calls / SIP Calls

- Dist-upgrade to -devel (not working without)

Now SIP calls and SIP messages are working out of the box using Twinkle.

Voice calls are now working out of the box as well.

If sound is distorted, run:

sudo chrt -a -f -p 99 $(pgrep pulseaudio)

Status table

Feature Leste supported Notes
Kernel version 6.6 LTS Mainline + PowerVR Patches: https://github.com/maemo-leste/droid4-linux
Serial Yes Requires special hardware
Charging Yes
Wireless Yes Firmware is non-free
Ethernet N/A
Micro USB Yes USB Network, Mass Storage. OTG not working, although it might be possible
Keyboard Yes
Screen Yes
3D Acceleration Yes closed PowerVR driver
Overclock Yes up to 805MHz (stable & supported), 850MHz works with some devices (not supported), Turbo mode works
Touchscreen Yes Resistive
Audio Yes Works (minus speaker protection), UCM support with Jack plug/unplug detection and FMTX
Video Yes Xv acceleration, up to 360-480p. Max 360p for online streaming with SMplayer.
2G/3G/3.5G data Yes Works with ofono - UI is working, see https://github.com/maemo-leste/connui-cellular/
4G data N/A no hardware
SMS Yes Works with Sphone or ofono scripts. Works with Conversations in -devel.
Phone calls Yes UCM support, sound is good. Works in 2G, 3G and 3.5G mode, works with Sphone
SIP calls / IM Yes Works with Twinkle, TLS transport is supported, Telepathy/Sphone integration is WIP
Bluetooth No Driver needs some work
FM Transmitter Yes Select 'FM Transmitter' in Pavucontrol

Install v4l-utils and set frequency using: v4l2-ctl -d /dev/radio0 -c mute=0,tune_power_level=120 -f <freq>

FM Receiver No Depends on working Bluetooth stack
Accelerometer Yes Not used in Leste at the moment, since UI rotation does not work on N900
Compass N/A No hardware
Gyro N/A No hardware
Proximity sensor Yes evdev interface not supported in mce since it depends on iio-sensor-proxy support. https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/363 for possible 'fix'
Ambient Light Sensor Yes
Vibration Motor Yes
HDMI-out N/A No hardware
TV-out Yes Enable in alsamixer (Jack Function in alsamixer to TV OUT), enable with xrandr --output TV --mode 800x480 --same-as LCD. Set PAL/NTSC with xrandr --output TV --set SignalProperties PAL, and scale with xrandr --output TV --set TVScale 90
GPS Yes
Infrared Yes TX only (hardware limitation). Works with pwm-ir-tx driver (patched)
Camera No Needs complex v4l work, no leste integration
Idle power consumption ~160mW / up to 30 hours Device does not enter RET or OFF mode