Difference between revisions of "Nokia N900"
Line 439: | Line 439: | ||
(Be patient, first loading and settings are slow) | (Be patient, first loading and settings are slow) | ||
== | == Status table == | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 446: | Line 446: | ||
! Notes | ! Notes | ||
|- | |- | ||
| Kernel version || | | Kernel version || 6.1.20 || Mainline + PowerVR Patches: https://github.com/maemo-leste/n9xx-linux | ||
|- | |- | ||
| Serial || Yes || Requires special hardware | | Serial || Yes || Requires special hardware | ||
Line 468: | Line 468: | ||
| Audio || Yes || Works (minus speaker protection), but requires complex alsa configuration and currently no ucm support | | Audio || Yes || Works (minus speaker protection), but requires complex alsa configuration and currently no ucm support | ||
|- | |- | ||
| 2G/3G data || Yes || Works with ofono - UI is | | 2G/3G data || Yes || Works with ofono - UI is working, see https://github.com/maemo-leste/connui-cellular/ | ||
|- | |- | ||
| 4G data || N/A || no hardware | | 4G data || N/A || no hardware | ||
|- | |- | ||
| SMS || Yes || Works with ofono | | SMS || Yes || Works with ofono and Conversations UI | ||
|- | |- | ||
| Phone calls || WIP || Works, no UI, poor quality for upstream audio, might require pulseaudio audio filters | | Phone calls || WIP || Works, no UI, poor quality for upstream audio, might require pulseaudio audio filters | ||
Line 504: | Line 504: | ||
| Camera || No || Needs complex v4l work, no leste integration | | Camera || No || Needs complex v4l work, no leste integration | ||
|- | |- | ||
| Idle power consumption || ~ | | Idle power consumption || ~160mW / up to 30 hours || Device does not enter RET or OFF mode | ||
|} | |} | ||
[[Category:Device]] | [[Category:Device]] |
Revision as of 16:41, 8 April 2023
Installation
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 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:
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/
2. Download u-boot from https://maedevu.maemo.org/images/n900/tools/
3. 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
4. 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
(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
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 80mA, which is quite a lot. On a good battery this will last for about 15 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:
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 / Undervolting
Nokia N900 is stable using following scalable frequencies:
250-500-600-720-800MHz
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 };"
By a new opp-table:
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-800000000 { opp-hz = < 0x00 0x2faf0800 >; opp-microvolt = < 0x124f80 0x124f80 0x124f80 >; opp-supported-hw = < 0xffffffff 0x03 >; }; opp6-720000000 { opp-hz = < 0x00 0x2aea5400 >; opp-microvolt = < 0x149970 0x149970 0x149970 >; opp-supported-hw = < 0xffffffff 0x02 >; turbo-mode; }; };
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 5-18.9, your vmlinuz version is vmlinuz-5.18.9
In the next command, replace "vmlinuz-<version>" by yours (ie vmlinuz-5.18.9)
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".
Installing cpufrequtils is useful to change frequency governors.
Prefer "conservative" instead of "ondemand" governor.
"Performance" governor locks N900 at 800MHz.
As root
cpufreq-set -c 0 -g conservative
Tips / Tweaks
SD Card
To avoid overall slowness, please only use SDHC Class 10 or better.
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
Only unable Double buffering and Disable screensaver
- In Options / Preferences / Audio:
Output driver: pulse
Disable everything else
Channel by default: 2 (Stereo)
High speed playback: No
- 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)
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.
More SWAP
First method:
To create a simple swap file 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
Second method:
To extand existing zswap you can install zram-tools from the repo, and edit
/etc/default/zramswap
as necessary. It's probably convenient to set allocation to 768 or 1024.
See Get Started Wiki.
Web browsing
Opera Mini 8 is a temporary solution.
To get it working, install openjdk from repo and microemulator-2.0.4 from the web (.jar)
Then from microemulator directory run:
java -jar microemulator-2.0.4.jar
On the main screen: / File / Open Midlet File and choose your Opera Mini jar file
Click Start (the first loading is quite long and an old Nokia smartphone will appear on the screen)
Once loaded and installed, click on resize button to fit to N900 screen.
(Be patient, first loading and settings are slow)
Status table
Feature | Leste supported | Notes |
---|---|---|
Kernel version | 6.1.20 | Mainline + PowerVR Patches: https://github.com/maemo-leste/n9xx-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 driver |
Touchscreen | Yes | Resistive |
Audio | Yes | Works (minus speaker protection), but requires complex alsa configuration and currently no ucm support |
2G/3G 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 ofono and Conversations UI |
Phone calls | WIP | Works, no UI, poor quality for upstream audio, might require pulseaudio audio filters |
Bluetooth | No | Driver needs some work |
FM Transmitter | Yes | Install v4l-utils , then enable chip and set frequency using: v4l2-ctl -d /dev/radio0 -c mute=0,tune_power_level=120 -f <freq>
|
FM Receiver | No | |
Accelerometer | Yes | |
Compass | N/A | No hardware |
Gyro | N/A | No hardware |
Proximity sensor | Yes | evdev interface not supported in mce |
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 | Broken | TX only (hardware limitation). Sending pulses causes a kernel oops |
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 |