| Version 25 (modified by GNUtoo, 3 years ago) (diff) |
|---|
Warning
SHR on n900 is in very early stages
Installation
- migrate the old page here
Post-installation tweaks
Usage
Interesting informations
- http://natisbad.org/N900/n900-commented-hardware-specs.html
- http://omapzoom.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
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
linphonec
- set the jack function to headset in alsamixer
- use linphonec as usual
- plug the headset and use it
Camera
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 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
