Changes between Version 35 and Version 36 of N900Install


Ignore:
Timestamp:
Mar 21, 2011, 10:55:53 AM (9 years ago)
Author:
pespin
Comment:

moved to Devices/NokiaN900/InstallGuide

Legend:

Unmodified
Added
Removed
Modified
  • N900Install

    v35 v36  
    1 == Warning ==
    2 SHR on n900 is in very early stages
    3 == Installation ==
    4  * migrate the [http://wiki.freesmartphone.org/index.php/Hardware/N900/Installation old] page here
    5 === U-Boot ===
    6 
    7 {{{
    8 wget http://build.shr-project.org/shr-unstable/images/nokia900/u-boot-nokia900-2010.06+gitr0+bd2313078114c4b44c4a5ce149af43bcb7fc8854-r68.bin -O u-boot.bin
    9 wget http://build.shr-project.org/shr-unstable/images/nokia900/uImage-nokia900.bin -O uImage
    10 wget https://elektranox.org/n900/files/uboot/builder.txt -O builder.py
    11 python builder.py
    12 # test the resulting combined.bin on your n900 (without flashing)
    13 flasher-3.5 -b -l -k combined.bin
    14 
    15 # flash the resulting combined.bin into the kernel partition
    16 flasher-3.5 -f -R -k combined.bin
    17 }}}
    18 
    19 You can use different uImage ie from default maemo kernel package or kernel-power, see
    20 https://elektranox.org/n900/kernel/uboot.html
    21 how to prepare such uImage.
    22 
    23 Expected partition layout is:
    24 
    25  * shr is started as default (after timeout with slide open and immediately when closed)
    26  * boot.scr:  optional on 1st ext2 partition /boot.scr
    27  * run shr:   rootfs on 1st ext2 partition and kernel in /boot/uImage
    28  * run shr2:  rootfs on 1st partition and kernel on 3rd fat partition /uImage
    29  * run p2:    rootfs on 2nd partition and kernel on 3rd fat partition /uImage
    30  * run maemo: rootfs on eMMC and kernel provided by NOLO
    31 
    32 == Post-installation tweaks ==
    33 
    34 == Usage ==
    35 === Interesting informations ===
    36  * http://natisbad.org/N900/n900-commented-hardware-specs.html
    37  * http://omappedia.org/wiki/Bootargs_for_enabling_display
    38 === NAND ===
    39 {{{
    40 root@nokia900 ~ # cat /proc/mtd
    41 dev:    size   erasesize  name
    42 mtd0: 00020000 00020000 "bootloader"
    43 mtd1: 00060000 00020000 "config"
    44 mtd2: 00040000 00020000 "log"
    45 mtd3: 00200000 00020000 "kernel"
    46 mtd4: 00200000 00020000 "initfs"
    47 mtd5: 0fb40000 00020000 "rootfs"
    48 }}}
    49 how to access it:
    50 {{{
    51 ubiattach /dev/ubi_ctrl -m 5
    52 mkdir /mnt/ubi
    53 mount -t ubifs ubi0_0 /mnt/ubi/
    54 cd /mnt/ubi/
    55 }}}
    56 
    57 === TV-out ===
    58 Not sure which steps are really necessary but it works
    59 {{{
    60 #set the jack function to tv-out in alsamixer
    61 echo 4000000 >  /sys/class/graphics/fb1/size
    62 fbset -fb /dev/fb1 -xres 320 -yres 240
    63 
    64 ovl0=/sys/devices/platform/omapdss/overlay0
    65 ovl1=/sys/devices/platform/omapdss/overlay1
    66 tv=/sys/devices/platform/omapdss/display1
    67 fb0=/sys/class/graphics/fb0
    68 fb1=/sys/class/graphics/fb1
    69 
    70 w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1`
    71 h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1`
    72 
    73 echo "0" > $ovl0/enabled
    74 echo "0" > $ovl1/enabled
    75 
    76 echo "" > $fb1/overlays
    77 echo "0,1" > $fb0/overlays
    78 
    79 echo "$w,$h" > $ovl1/output_size
    80 echo "tv" > $ovl1/manager
    81 
    82 echo "1" > $ovl0/enabled
    83 echo "1" > $ovl1/enabled
    84 
    85 echo "1" > $tv/enabled
    86 
    87 }}}
    88 === Radio ===
    89 
    90 ==== Radio transciver ====
    91 {{{
    92 #!/bin/sh
    93 amixer -D hw:0 set PCM 100%
    94 
    95 amixer -D hw:0 set 'Line DAC' 80%
    96 
    97 amixer -D hw:0 set 'LineL' on
    98 amixer -D hw:0 set 'LineR' on
    99 
    100 amixer -D hw:0 set 'Left DAC_L1 Mixer LineL' on
    101 amixer -D hw:0 set 'Left DAC_L1 Mixer LineR' on
    102 #amixer -D hw:0 set 'Left DAC_L1 Mixer Line' on
    103 
    104 
    105 amixer -D hw:0 set 'FMTX Function' On
    106 
    107 
    108 amixer -D hw:0 'Left DAC_L1 Mixer Line' on #2.6.28
    109 amixer -D hw:0 'Right DAC_R1 Mixer Line' on #2.6.28
    110 ###########################################
    111 v4l2-ctl --set-ctrl mute=0 -d /dev/radio0
    112 v4l2-ctl -f 100.0 -d /dev/radio0
    113 
    114 
    115 v4l2-ctl -d /dev/radio0  -c tune_power_level=120 #2.6.37
    116 echo 120 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level #2.6.28
    117 }}}
    118 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.
    119 Also put Left DAC Mux on DAC_l3
    120 === DSPs ===
    121  * mount the maemo's filesystem and copy the /lib/dsp firmwares in /lib/dsp of SHR
    122  * load the kernel driver
    123 {{{
    124 modprobe bridgedriver base_img=/lib/dsp/baseimage.dof
    125 modprobe dspbridge
    126 }}}
    127  * cross-compile gst-dsp
    128 {{{
    129 oe_runmake CROSS_COMPILE="arm-oe-linux-gnueabi-"  DSP_API=0
    130 }}}
    131  * copy it to the target
    132 {{{
    133 scp libgstdsp.so root@192.168.0.202:/usr/lib/gstreamer-0.10/
    134 }}}
    135  * opkg install the required gst plugins
    136  * do that:
    137 {{{
    138 gst-launch-0.10 -v playbin2 uri=file://$(pwd)/video.m4v
    139 }}}
    140 or alternatively cross-compile [http://code.google.com/p/gst-player/ gst-player]:
    141 {{{
    142 oe_runmake  CC="arm-oe-linux-gnueabi-gcc
    143 }}}
    144 === linphonec ===
    145  * set the jack function to headset in alsamixer
    146  * use linphonec as usual
    147  * plug the headset and use it
    148 
    149 === Camera ===
    150 for activating the camera(adapted from https://elektranox.org/n900/installation/hardware.html)
    151 {{{
    152 for module in dspbridge iommu2 omap3-iommu omap34xxcam-mod omap_previewer_hack board-rx51-camera et8ek8 ad5820 adp1653 uinput ; do  modprobe $module ; done
    153 }}}
    154 ==== Taking pictures with mplayer ====
    155 {{{
    156 mplayer -vf screenshot -fps 15 tv:// -tv  driver=v4l2:device=/dev/video0
    157 #Take snapshots while streaming by pressing 's'
    158 }}}
    159 ==== Encoding videos with mencoder ====
    160 {{{
    161 mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -nosound -ovc lavc -o filename.avi
    162 }}}
    163 
    164 ==== streaming the n900 camera on your computer ====
    165 on the n900 do:
    166 {{{
    167 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
    168 }}}
    169 on the computer do:
    170 {{{
    171 gst-launch tcpclientsrc host=192.168.0.202 port=5000 ! multipartdemux ! jpegdec ! autovideosink
    172 }}}
    173 ==== Changing settings of the camera ====
    174 {{{
    175 wget http://www.vanheusden.com/dov4l2/dov4l2-0.1.tgz
    176 tar xvzpf dov4l2-0.1.tgz
    177 cd dov4l2-0.1
    178 #source the devshell
    179 oe_runmake
    180 scp dov4l2 root@192.168.0.202:
    181 ssh root@192.168.0.202
    182 }}}
    183 For instance for increasing the video luminosity in low light conditions on the back camera
    184 {{{
    185 ./dov4l2 -d /dev/video0  -w "Gain [0.1 EV]" -a write -z 40
    186 }}}
    187 == TODO ==
    188 
    189 == Uninstallation ==
    190 '''FOLLOW THAT PROCEDURE ONLY IF YOU FLASHED AN SHR KERNEL AND THAT YOU WANT MAEMO 1.2 BACK'''
    191  * lookup what kernel you use
    192  * download the deb
    193 for instance for the default maemo kenrel do:
    194 {{{
    195 mkdir maemo
    196 cd maemo
    197 wget http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20101501+0m5_armel.deb
    198 }}}
    199  * then unpack it
    200 {{{
    201 ar x kernel_2.6.28-20101501+0m5_armel.deb
    202 tar xvzf data.tar.gz
    203 }}}
    204  * then install 0xFFFF if it's not done already
    205 {{{
    206 hg clone http://hg.youterm.com/0xFFFF
    207 cd 0xFFFF
    208 make
    209 cd ..
    210 }}}
    211  * then flash back the original kernel
    212 {{{
    213 ./0xFFFF/src/0xFFFF -F  boot/zImage-2.6.28-20101501+0m5.fiasco -R
    214 ./0xFFFF/src/0xFFFF -R
    215 }}}