Installation (updated for Maemo pr1.3 and SHR-CORE)
N900 Flash Tool (Flasher 3.5)
At the moment an open source flash tool called 0xFFFF and the Flasher 3.5 from Nokia are available to flash the N900. Here the Flasher 3.5 method is described. Download the Flasher 3.5 from http://tablets-dev.nokia.com/maemo-dev-env-downloads.php?f=maemo_flasher-3.5_2.5.2.2.tar.gz Using wget or curl is not possible here because you must accept the license by pressing a button. After downloading extract it:
$ tar xzf maemo_flasher-3.5_2.5.2.2.tar.gz
Prepare the original maemo kernel
# get the maemo kernel package (PR1.3)
$ curl -O http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb
# extract the fiasco image from the deb package
$ ar p kernel_2.6.28-20103103+0m5_armel.deb data.tar.gz | tar xzO ./boot/zImage-2.6.28-20103103+0m5.fiasco > zImage.fiasco
# extract the zImage from the fiasco image
$ ./maemo_flasher-3.5_2.5.2.2/flasher-3.5 -F zImage.fiasco -u
flasher v2.5.2 (Oct 21 2009)
Image 'kernel', size 1705 kB
Version 2.6.28-20103103+0m5
Unpacking kernel image to file 'zImage'...
# create an uImage for the fiasco image
$ mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n maemo -d zImage uImage
Image Name: maemo
Created: Mon Dec 26 20:23:52 2011
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1746688 Bytes = 1705.75 kB = 1.67 MB
Load Address: 80008000
Entry Point: 80008000
Boot loader (u-boot)
The u-boot boot loader is used to provide multi boot on N900.
#get u-boot curl -o u-boot.bin http://build.shr-project.org/shr-core/images/nokia900/u-boot-nokia900.bin
Combine u-boot and original maemo kernel
The N900 will normally start the default maemo kernel. To provide multi boot, u-boot and maeomo kernel are merged into one binary and flashed as a kernel image into the N900. So N900 starts first u-boot and then optionally the already loaded maemo kernel or starts another kernel from SD card.
#download the script which combines the images curl -k -o builder.py https://elektranox.org/n900/files/uboot/builder.txt #combine the images (u-boot.bin and uImage) $ python builder.py 0x2d960 0x1aa740
Flash the new u-boot+kernel image
Switch the N900 off and remove USB connection. Then start Flasher 3.5:
# flash the resulting combined.bin into the kernel partition sudo ./maemo_flasher-3.5_2.5.2.2/flasher-3.5 -f -R -k combined.bin flasher v2.5.2 (Oct 21 2009) Suitable USB device not found, waiting.
Then open the keyboard press and hold 'u' key and plug in USB cable:
USB device found found at bus 001, device address 013. Found device RX-51, hardware revision 2104 NOLO version 1.4.14 Version of 'sw-release': <no version> Sending kernel image (1961 kB)... 100% (1961 of 1961 kB, avg. 29281 kB/s) Flashing kernel... done.
Default Boot Order
If the keyboard slider is closed, the N900 boots into Maemo. This should now work. With open keyboard slider u-boot tries to boot from first partition of SD card.
Installing SHR-CORE image on the microsd card
At the moment the next release is just in progress, to understand our staging procedure which will lead to a release please read Stabilizing. There you'll find the information where to download current images for your N900.
- Connect your micro SD to your computer
- create a partition at the beginning of your card (booting from 1st partition is default when slider open)
- format the first partition of your micro SD to ext2 or ext3 (that loose all the data that is on it)
- mount your micro SD
- go inside the place where your micro SD is mounted
- extract the image to the micro SD:
$ sudo tar xvzpf /path/to/full-om-gta02.tar.gz --numeric-owner
Install Missing Firmware
Some of the kernel modules needs binary firmware images. The information how to install them can be found in Nokia N900/Firmware.
Installation (outdated)
- migrate the old page here
U-Boot
# this expects uSD card as mmcblk1, iirc like with 2.6.28 wget http://build.shr-project.org/shr-unstable/images/nokia900/u-boot-nokia900-2010.06+gitr0+bd2313078114c4b44c4a5ce149af43bcb7fc8854-r68.bin -O u-boot.bin # this expects uSD card as mmcblk0, iirc 2.6.35 and current 2.6.37 wget http://build.shr-project.org/shr-unstable/images/nokia900/u-boot-nokia900-2010.06+gitr0+bd2313078114c4b44c4a5ce149af43bcb7fc8854-r68.bin.mmcblk0 -O u-boot.bin # this is also in both mmcblk0 versions like above and starts maemo by default when slide is closed (and also reads /boot.scr even with slide closed) wget http://build.shr-project.org/shr-unstable/images/nokia900/u-boot-nokia900-2010.06+gitr0+bd2313078114c4b44c4a5ce149af43bcb7fc8854-r68.bin.dos-like -O u-boot.bin wget http://build.shr-project.org/shr-unstable/images/nokia900/u-boot-nokia900-2010.06+gitr0+bd2313078114c4b44c4a5ce149af43bcb7fc8854-r68.bin.mmcblk0.dos-like -O u-boot.bin # # or newer 2011.06 based (dos-like and mmcblk0) wget http://build.shr-project.org/shr-core/images/nokia900/u-boot-nokia900-2011.06+gitr2+b1af6f532e0d348b153d5c148369229d24af361a-r2.bin -O u-boot.bin wget http://build.shr-project.org/shr-kernels/nokia900/uImage-kernel-power-47.bin -O uImage wget https://elektranox.org/n900/files/uboot/builder.txt -O builder.py python builder.py # test the resulting combined.bin on your n900 (without flashing) flasher-3.5 -b -l -k combined.bin # flash the resulting combined.bin into the kernel partition flasher-3.5 -f -R -k combined.bin
You can use different uImage ie from default maemo kernel package ( http://build.shr-project.org/shr-kernels/nokia900/) or some kernel built with OE if it's small enough, see https://elektranox.org/n900/kernel/uboot.html how to prepare such uImage and make sure you have right modules installed in maemo rootfs (in /lib/modules).
How to get uImage from power-kernel http://talk.maemo.org/showthread.php?t=65776
Expected partition layout is:
- shr is started as default (after timeout with slide open and immediately when closed)
- boot.scr: optional on 1st ext2 partition /boot.scr
- run shr: rootfs on 1st ext2 partition and kernel in /boot/uImage
- run shr2: rootfs on 1st partition and kernel on 3rd fat partition /uImage
- run p2: rootfs on 2nd partition and kernel on 3rd fat partition /uImage
- run maemo: rootfs on eMMC and kernel provided by NOLO
Post-installation tweaks
Usage
Interesting informations
- http://natisbad.org/N900/n900-commented-hardware-specs.html
- http://omappedia.org/wiki/Bootargs_for_enabling_display
NAND
root@nokia900 ~ # cat /proc/mtd dev: size erasesize name mtd0: 00020000 00020000 "bootloader" mtd1: 00060000 00020000 "config" mtd2: 00040000 00020000 "log" mtd3: 00200000 00020000 "kernel" mtd4: 00200000 00020000 "initfs" mtd5: 0fb40000 00020000 "rootfs"
how to access it:
ubiattach /dev/ubi_ctrl -m 5 mkdir /mnt/ubi mount -t ubifs ubi0_0 /mnt/ubi/ cd /mnt/ubi/
TV-out
Not sure which steps are really necessary but it works
#set the jack function to tv-out in alsamixer echo 4000000 > /sys/class/graphics/fb1/size fbset -fb /dev/fb1 -xres 320 -yres 240 ovl0=/sys/devices/platform/omapdss/overlay0 ovl1=/sys/devices/platform/omapdss/overlay1 tv=/sys/devices/platform/omapdss/display1 fb0=/sys/class/graphics/fb0 fb1=/sys/class/graphics/fb1 w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1` h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1` echo "0" > $ovl0/enabled echo "0" > $ovl1/enabled echo "" > $fb1/overlays echo "0,1" > $fb0/overlays echo "$w,$h" > $ovl1/output_size echo "tv" > $ovl1/manager echo "1" > $ovl0/enabled echo "1" > $ovl1/enabled echo "1" > $tv/enabled
Radio
Radio transciver
#!/bin/sh amixer -D hw:0 set PCM 100% amixer -D hw:0 set 'Line DAC' 80% amixer -D hw:0 set 'LineL' on amixer -D hw:0 set 'LineR' on amixer -D hw:0 set 'Left DAC_L1 Mixer LineL' on amixer -D hw:0 set 'Left DAC_L1 Mixer LineR' on #amixer -D hw:0 set 'Left DAC_L1 Mixer Line' on amixer -D hw:0 set 'FMTX Function' On amixer -D hw:0 'Left DAC_L1 Mixer Line' on #2.6.28 amixer -D hw:0 'Right DAC_R1 Mixer Line' on #2.6.28 ########################################### v4l2-ctl --set-ctrl mute=0 -d /dev/radio0 v4l2-ctl -f 100.0 -d /dev/radio0 v4l2-ctl -d /dev/radio0 -c tune_power_level=120 #2.6.37 echo 120 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level #2.6.28
Note that connecting the usb cable, even if not connected to a computer, make it act like an extended antenna and improve the signal a lot. Also put Left DAC Mux on DAC_l3
DSPs
- mount the maemo's filesystem and copy the /lib/dsp firmwares in /lib/dsp of SHR
- load the kernel driver
modprobe bridgedriver base_img=/lib/dsp/baseimage.dof modprobe dspbridge
- cross-compile gst-dsp
oe_runmake CROSS_COMPILE="arm-oe-linux-gnueabi-" DSP_API=0
- copy it to the target
scp libgstdsp.so root@192.168.0.202:/usr/lib/gstreamer-0.10/
- opkg install the required gst plugins
- do that:
gst-launch-0.10 -v playbin2 uri=file://$(pwd)/video.m4v
or alternatively cross-compile gst-player:
oe_runmake CC="arm-oe-linux-gnueabi-gcc
linphonec
- set the jack function to headset in alsamixer
- use linphonec as usual
- plug the headset and use it
New camera ISP (2.6.37 meego kernel)
./media-ctl -r -l '"et8ek8":0 -> "OMAP3 ISP CCP2":0 [1], "OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1], "OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1], "OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1], "OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' echo "---------------" ./media-ctl -f '"et8ek8":0 [SGRBG10_DPCM8 1296x984], "OMAP3 ISP CCP2":1 [SGRBG10 1296x984], "OMAP3 ISP CCDC":2 [SGRBG10 1296x983], "OMAP3 ISP preview":1 [UYVY 1278x975], "OMAP3 ISP resizer":1 [UYVY 800x480]' echo "/dev/video6" mplayer -tv driver=v4l2:width=800:height=480:outfmt=uyvy:device=/dev/video6 -vo xv -vf screenshot tv://
Old Camera (2.6.28 kernel)
for activating the camera(adapted from https://elektranox.org/n900/installation/hardware.html)
for module in dspbridge iommu2 omap3-iommu omap34xxcam-mod omap_previewer_hack board-rx51-camera et8ek8 ad5820 adp1653 uinput ; do modprobe $module ; done
Taking pictures with mplayer
mplayer -vf screenshot -fps 15 tv:// -tv driver=v4l2:device=/dev/video0 #Take snapshots while streaming by pressing 's'
Encoding videos with mencoder
mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -nosound -ovc lavc -o filename.avi
streaming the n900 camera on your computer
on the n900 do:
gst-launch -vvv v4l2src ! videoscale ! video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)25/1 ! ffmpegcolorspace ! jpegenc ! multipartmux ! tcpserversink host=192.168.0.202 port=5000
on the computer do:
gst-launch tcpclientsrc host=192.168.0.202 port=5000 ! multipartdemux ! jpegdec ! autovideosink
Changing settings of the camera
wget http://www.vanheusden.com/dov4l2/dov4l2-0.1.tgz tar xvzpf dov4l2-0.1.tgz cd dov4l2-0.1 #source the devshell oe_runmake scp dov4l2 root@192.168.0.202: ssh root@192.168.0.202
For instance for increasing the video luminosity in low light conditions on the back camera
./dov4l2 -d /dev/video0 -w "Gain [0.1 EV]" -a write -z 40
TODO
Uninstallation
FOLLOW THAT PROCEDURE ONLY IF YOU FLASHED AN SHR KERNEL AND THAT YOU WANT MAEMO 1.2 BACK
- lookup what kernel you use
- download the deb
for instance for the default maemo kenrel do:
mkdir maemo cd maemo wget http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20101501+0m5_armel.deb
- then unpack it
ar x kernel_2.6.28-20101501+0m5_armel.deb tar xvzf data.tar.gz
- then install 0xFFFF if it's not done already
hg clone http://hg.youterm.com/0xFFFF cd 0xFFFF make cd ..
- then flash back the original kernel
./0xFFFF/src/0xFFFF -F boot/zImage-2.6.28-20101501+0m5.fiasco -R ./0xFFFF/src/0xFFFF -R
