kbdd for Nokia 770/N800

kbdd is userspace driver for serial keyboards and for bluetooth keyboards that support serial port bluetooth profile instead of more recent HID profile. This version supports 770 screen unblanking on key press (needed for IT2005 only) and also four additional bluetooth keyboards:
binary (kbdd, uinput kernel module, btkbd helper script, menu shortcut)

Nokia 770 with IT2005 - kbdd-it2005.tar.gz
Nokia 770, N800 with IT2006/7/8 - kbdd.tar.gz (IT2006 version 1.2006.26-8, 2.2006.39-14, 3.2006.49-2, IT2007 2.2006.51-6, 3.2007.10-7, 4.2007.26-8, 4.2007.38-2, IT2008 2.2007.50-2)

You need to have shell access (osso-xterm, ssh server) for installation. To use it as intended you need to have 'sudo gainroot' method of getting root shell working (enable R&D mode or for IT>=2006 install latest becomeroot ). Extract archive on device with 'tar zxvf kbdd*.tar.gz' command and see README inside for details.

source

kbdd source in HH CVS http://handhelds.org/cgi-bin/cvsweb.cgi/apps/kbdd/
0.10 kbdd source kbdd-0.10_src.tgz
diff to 0.10 source for btfoldable keyboard btfoldable.diff
diff to 0.10+btfoldable source for freedom keyboard FR layout freedom.diff by David Lapetina
diff to 0.10 kbdd source for 770 D-BUS hack that prevents display blanking blanking.diff (needed for IT2005 only)
diff to kbdd source for releasing all pressed keys automatically on kbdd exit (useful when kbdd dies when some keys are pressed) kbdd_keyrelease.diff
diff to 0.10+btfoldable source for Just Mobile RoKy2 elektex.diff by Jeffrey Mark Siskind, his archive with more details here
current kbdd source with all patches above kbdd_src.tgz

Modified initfs with onscreen boot menu and usb network recovery

Nokia 770 - IT2006 versions 1.2006.26-8, 2.2006.39-14, 3.2006.49-2, IT2007 hacker edition 2.2006.48-7, 4.2007.36-2
N800 - IT2007 versions 2.2006.51-6, 3.2007.10-7, 4.2007.26-8, 4.2007.38-2
N800,N810 - IT2008 versions 1.2007.42-18, 1.2007.42-19, 2.2007.50-2, 4.2008.23-14 (Diablo), 4.2008.30-2 (first Diablo update), 4.2008.36-5, 5.2008.43-7


Last change: November 12, 2009 - Mer compatibility = should not break bootmenu items installed by Mer, should allow booting Mer (LINUXRC item option now works)
Previous change: January 14, 2009 - fix 'remove extra stuff' option for N810 wimax edition (RX-48)

This is modification of initfs partition with boot menu and usb network recovery added. It allows you to select boot device via tablet keys on each boot. It also allows you to start ssh and telnet server in the device and login over usb before even root filesystem is mounted so you can fix system which is not booting properly.

To rebuild (and reflash) initfs jffs2 image directly on your tablet, get initfs flashing script here initfs_flasher.tgz (based on MTD utils). Extract tgz archive on your tablet (tar zxvf initfs_flasher.tgz), check README file for details (cd initfs_flasher ; more README.txt) , execute initfs_flash (./initfs_flash) in shell (osso-xterm or via ssh) and follow instructions. Use ssh only if your connection is stable. If it drops while flashing, do not reboot the device but reconnect and retry again with previously prepared initfs image as a parameter (./initfs_flash initfs.bootmenu.jffs2) or better use osso-xterm next time.

You can still skip the final flashing part and download created initfs.bootmenu.jffs2 image (and initfs.orig.jffs2 backup) to PC and flash via official flasher if you want to be extra safe.

With OS 2007 and 8 (but not 6) there is an issue related to booting from mmc and USB storage functionality - when inserting USB cable system fails to unmount all partitions and usb storage functionality does not work. Solution for OS2007 here and for OS2008 here. Beware that you must not allow your PC to mount active partition you boot from over USB too. This is not issue with Windows (it can read only first partition on removable drives and doesn't understand ext2) but it is real problem with modern Linux distributions. See this ITT post or this blog entry

Some initial version of bootmenu was packaged for contrib/extras repository by Marius Vollmer and documented here. This version does not work for anything >= IT2006 2.2006.39-14. Now the project is moved to Maemo Garage. Until there is first project release and new matching package in contrib repository, you can use initfs_flasher.tgz above. For latest features you may then grab newest version of bootmenu.sh from Garage SVN here or directly here. The file belongs to /mnt/initfs/. Please note that due to way jffs2 filesystem works in low free space situation, the copy may fail in the middle and you may no longer write to the filesystem. In such case initfs reflash is needed.

Extended backlight level control for 770/N800 kernel

IT2005

Official Nokia 770 kernel provides only 15 levels of backlight settable via /sys/devices/platform/omapfb/panel/backlight_level and only 9 of them (2,3,4,5,6,9,11,13,15) are available in the GUI. The 770 hardware allows 127 levels of brightness. Current kernel translates levels 0-15 to hardware levels with formula:
hw level = (level * 127 / 15)
As the current GUI is limited I implemented customizable translation table in the kernel which translates those 15 levels to any value in 1-127 interval you wish. Initially table is populated with the original formula but you can set any level via
echo value > /sys/devices/platform/omapfb/panel/backlight_level
where value=(hw level*16)+level. Level 0 is not settable but means current level.
Examples:
value 1*16+0=16 changes current active level to minimum hw level 1
value 1*16+1=17 changes level 1 (this is level used in inactivity before screen goes off) to hw level 1
value 2*16+3=35 changes level 3 to hw level 2
value 127*16+15=2047 changes level 15 to hw level 127
In shell you can use expressions, echo $((1*16+1)) prints 17.
Or simply use this shell script.

source

original kernel source
modified drivers/video/omap/lcd_lph8923.c, use diff command to see the changes.

Proper fix would be to leave 127 levels in backlight_level and fix GUI to provide more choices with slider (like 127?). You can comment #define BACKLIGHT_USE_TABLE in lcd_lph8923.c for this but the GUI still has only 9 levels so it is not very useful now.

modified kernel image

firmware 2005.51 and 2006.13-7 zImage-su-18-200550-backlight.zip
Unzip and flash from linux via 'flasher -k zImage-su-18-200550-backlight -f -R'
Or you can first test it via 'flasher -l -b -k zImage-su-18-200550-backlight' to boot the kernel temporarily without flashing and flash it later if you don't see any problems.

Beware that flashing may make you device inoperable. This kernel image is provided 'as is' and without any warranty.

IT2006

Official kernel provides 127 levels. Still the system above kernel (more specifically the dsme daemon) resets it periodically and has 10 hardcoded levels - level 1 (dim level) and levels 3,25,33,42,50,76,93,110,127 (9 levels in brightness applet). Similar table like in IT2005 is implemented here for first IT2006 firmware or here for later ones. Formula to set is level+128+256*hwlevel. Level 0 means current level, 1-9 means 9 UI levels (3,25,...). To change lowest UI level 1 to hw level 1 (from harcoded 3) execute "echo $((128+1+1*256)) >/sys/devices/platform/omapfb/panel/backlight_level". Or you may use this shell script. Downloadable kernel with just this feature is not available (space limit on free hosting) but it is part of high-speed mmc kernel below. This is useful only if you feel that default lowest brightness value (3) is still too bright at night and you really want to go lower (2 or 1).

IT2007 on N800

Similar situation like for IT2006 on Nokia 770. The only change is that lowest hardcoded level is 6 instead of 3. Source diff here, blset script is same as for IT2006. For downloadable kernel with this feature use the pptp kernel for N800 below.

IT2008 on N800/810

Similar situation like for OS2007. There are only 6 levels (dim+5) with values 3,25,50,76,101,127. Source diff here, blset script is same as for IT2006. Downloadable kernel with this feature only is not available. You can get my custom one for for 2.2007.50-2 here (+ additional modules) with SD/MMC high speed mode (48MHz) enabled, extended brightness control and crypto api (for PPTP). See also .config.diff inside the archive for exact difference to original configuration.

Kernel flasher for Nokia 770, N800 and N810

Nokia 770 - IT2006 version 1.2006.26-8, 2.2006.39-14, 3.2006.49-2, IT2007 hacker edition 2.2006.48-7
N800 - any IT2007 or IT2008 version
N810 - any IT2008 version


This is kernel flasher script that can flash kernel image directly on the device. It uses mtd-utils. For Nokia 770 it also uses kernel module hack to make kernel (/dev/mtd2) partition writable. Flasher tgz archive for 770 and N8x0 is here. Kernel module source for Nokia 770 is here for those interested.
For flashing kernel unpack flasher tgz archive and run kernel_flasher script with kernel zImage as parameter. If you download zip archive with kernel image, make sure to unpack it first :-)

This flasher is provided 'as is' and without any warranty. Make sure kernel image is valid before flashing. By flashing wrong kernel image you may brick your device. In such case use official flasher and firmware image to restore your device.



PPTP client and kernel with MPPE support

Correct pppd (version 2.4.2) is already present on the device. Setup guide that worked for me is here.

IT2005

You need modified kernel with MPPE patch and pptp client executable compiled from source.

If you don't want to compile from source then pptp binary is here and zip archive with kernel image with mppe support is here.
I suggest you first test it via 'flasher -l -b -k zImage-su-18-200550-mppe' before flashing permanently.
If it works you can flash it via 'flasher -k zImage-su-18-200550-mppe -f -R'.

IT2006

You need stock kernel (2.6.16 already includes MPPE) but with enabled Cryptographic API which is disabled in default 770 kernel. Kernel for 1.2006.26-8 is here (or use high-speed mmc kernel below), mppe kernel modules and pptp binary are here. Yo need to 'insmod' included modules (arc4, sha1, ppp_mppe) as root before using pptp. For newer firmware versions get one of SDHC enabled kernels below. There is also archive with various modules there including those needed for pptp.

N800 - IT2007 version 4.2007.38-2 and .26-8 (kernel contains MMC corruption bugfix)

You need stock kernel but with enabled Cryptographic API. Kernel image for 4.2007.38 and .26 firmware is here, extra modules are here. You may extract both directly on device via 'tar zxvf 4.2007*.tar.gz'. For kernel flashing you may use my kernel flasher above. Before using PPTP you need to 'insmod' included modules (crypto/arc4.ko, sha1.ko, drivers/net/ppp_mppe.ko) as root. Kernel contains also the extended brightness patch (see above, it is harmless and the additional code is not called unless you use the blset script) and mmcplus patches from http://intr.overt.org/blog/?p=54. Also some (unneeded, leaved in by mistake?) features were removed from kernel to keep its size and RAM requirements down. Those features were enabled as kernel modules instead (if you really need them) - ramdisk (rd.ko), scsi (scsi_mod.ko,sd_mod.ko), loop device (loop.ko)

N800/810 - IT2008 version 2.2007.50-2 (Chinook)

Kernel is here, extra modules here. List of modules to insert (as per this thread) - crypto_algapi,arc4,sha1,cryptomgr,blkcipher,cbc,pcbc,ecb,ppp_mppe. Kernel has extended brightness patch and SD/MMC high speed mode (48MHz) enabled, see also included .config.diff for kernel configuration changes.

N800/810 - IT2008 version 5.2008.43-7 (latest Diablo)

Kernel is here, extra modules here. List of modules to insert (as per this thread) - crypto_algapi,arc4,sha1,cryptomgr,blkcipher,cbc,pcbc,ecb,ppp_mppe. Kernel has fixes for bug 2747, bug 3243 and also has dsp speed tuning via /sys/power/op_dsp. No 48MHz sd/mmc modes or display rotation included (on purpose, just bugfixes and harmless stuff here), see also included .config and diff for changes.

Beware that flashing may make you device inoperable. These kernel images are provided 'as is' and without any warranty.

Please note that according to some studies pptp is not very secure so it is probably better to use other solutions.



Tearing synchronization (OMAPFB_CAPS_TEARSYNC) and fixed YUV420 output for Nokia 770

This is backported tearsync code which was released by Nokia as part of 2.6.18 N800 kernel. This code allows video playback withour screen tearing with MPlayer. It also contains fixed YUV420 output usable with MPlayer too. For more details see ITT thread here or here.

Source patch is here n770-49-yuv420+tearsync.diff.
For binary kernel image with this feature check SDHC kernels below.


Support for higher MMC 4.1 bus speeds for Nokia 770 (outdated, see SDHC kernel below)

This is modified kernel which disables artificial slowdown for legacy (=up to 20Mhz) MMC cards (bus speed changed from 12 to 16Mhz) and adds support for high-speed mode (26 or 52Mhz) defined by MMC 4.1 standard. Speedup should be 1.3x (~1.8MB/s) for legacy (RS-)MMC cards (Sandisk 1GB RS-MMC), 2x (~2.6MB/s) or 4x (~5MB/s) for highspeed mmcplus/mmcmobile cards (Kingston 1 or 2GB MMCmobile). Some older/buggy cards (my 64MB one inluded with 770) may not work and produce read/write errors.

More details about highspeed mode here:
MMC v4.1 Application Notes
Samsung MMC 4.1 datasheet
Samsung Application Notes

99% of work was done by Philip Langdale, patches available here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=115974566024309&w=2
http://marc.theaimsgroup.com/?l=linux-kernel&m=115974518926141&w=2
Only trivial missing bits were added by me. I had the idea, found datasheets and decided to write the support but luckily after a bit of additional googling I found Philip already done all the work few months earlier so I could just take his code. Great, thanks :-) Also since now he has N800 too, see his blog http://intr.overt.org/blog/ for high speed patches (and SDHC funcionality) for N800. There is no reason to duplicate it here.

Full source patch against 2.6.16.rel-osso15 used in 1.2006.26-8 is here. It contains also variant of 2GB patch and is already out of date.
Patch against 2.6.16.rel-osso26 used in 2.2006.39-14 is here. It contains also multiblock write code but disabled. To enable it uncomment 'mmc->caps |= MMC_CAP_MULTI_WRITE;' in drivers/mmc/omap.c

ZIP file for 1.2006.26-8 with kernel to flash is here. Additional modules (pptp,nfs,cifs,fuse,..) here
ZIP file for 2.2006.39-14 with kernel to flash is here. Additional modules (pptp,nfs,cifs,fuse,..) here. This works on newer 3.2006.49-2 too, see also details here.

Experimental kernel with multiblock writes enabled (writing is ~2MB/s instead of ~300KB/s) is here (1.2006.26-8) or here (2.2006.39-14). Experimental means that it is currenly unknown whether this is safe in all situations. See the mail with patch for more details. Works for me just fine but YMMV.

I suggest you first boot it via 'flasher-2.0 -l -b -k zImage-su-18-200625-2gb-mmcplus52Mhz' and test all your cards before flashing permanently.
If it works you can flash it via 'flasher-2.0 -k zImage-su-18-200625-2gb-mmcplus52Mhz -f -R'.
If you are sure you want to flash it without testing and prefer flashing directly from the device without using USB cable, you may try my kernel flasher above.

Beware that flashing may make you device inoperable. This kernel image is provided 'as is' and without any warranty. While I believe this modification does NOT cause any hardware to operate out of its specifications I may be wrong and you may lose data or even destroy your device or MMC card.


Support for SDHC cards and higher SD/MMC speeds for Nokia 770

This is kernel with backported MMC layer from latest 2.6.18 osso55 kernel for N800. It includes various generic MMC fixes (including multiblock writing), MMC 4.1 and SD high speed modes and SDHC and MMC 4.2 high capacity support for cards >=4GB. It also includes delayed MMC clock turn off a.k.a. SDHC corruption bugfix. Full source diff against 2.6.16.rel-osso29 is here, precompiled kernels for 3.2006.49 and 2007HE below. This kernel also contain extended brightness control, tearing synchronization and fixed YUV420 mode output, these features should be harmless (especially when not used :-).

kernel-sdhc-48MHz-3.2006.49.tar.gz MMC bus clock limit 48MHz (fastest, may be unstable with some cards)
kernel-sdhc-24MHz-3.2006.49.tar.gz MMC bus clock limit 24MHz (fast, may be still unstable with some cards, please let me know if you really needed this and what card you used)
kernel-sdhc-12MHz-3.2006.49.tar.gz MMC bus clock limit 12MHz (slow read speed and multiblock writing turned off just like original kernel, please let me know if you really needed this and what card you used)

Additional kernel modules here. This kernel was tested by me only with Kingston 2gb MMCmobile card. No SD or SDHC card were tested by me but some were tested by others. For details and success reports check ITT thread SDHC SD possible with N770. For using (full/mini/micro) SD cards in your Nokia 770 you need to modify RS-MMC slot or use microSD card with modified adapter (make it thinner, cut usb part, fix card with tape or glue). For ready made solution see also N770 8G SDHC card without hacking MMC slot.

Beware that flashing may make you device inoperable. This kernel image is provided 'as is' and without any warranty. While I believe this modification does NOT cause any hardware to operate out of its specifications I may be wrong and you may lose data or even destroy your device or MMC card.

ScummVM port

Original port by Tomas Junnonen here

changes:

Source patch here for 0.8.1, works for 0.8.2 too, here for 0.9.1
Since 0.11.0 this port was acepted as official Maemo port of ScummVM and this patch is part of official source tarball. See README inside for build instructions. Contact me for current unstable patch, see scummvm package details in Application Manager for email.

Installation packages

You can get most recent stable version from Maemo Extras repository. For single click install use Maemo Downloads: Nokia 770/OS2006 N800/OS2007 N8x0/OS2008
Below are older versions and current unstable one.

version IT2005 IT2006 IT2007 IT2008 Maemo5/Fremantle
0.8.2 scummvm_0.8.2_arm.deb scummvm_0.8.2-2_armel.deb N/A N/A N/A
0.9.0 N/A scummvm_0.9.0-3_armel.deb N/A N/A N/A
0.9.1 N/A scummvm_0.9.1-1_armel.deb scummvm_0.9.1-1_armel.deb N/A N/A
0.10.x N/A scummvm_0.10.0-5_armel.deb scummvm_0.10.0-5_armel.deb scummvm_0.10.0-5_armel.deb N/A
0.11.x N/A scummvm_0.11.1_armel.deb scummvm_0.11.1_armel.deb scummvm_0.11.1_armel.deb N/A
0.12.x N/A scummvm_0.12.0_armel.deb scummvm_0.12.0_armel.deb scummvm_0.12.0_armel.deb N/A
0.13.x N/A scummvm_0.13.1_armel.deb scummvm_0.13.1_armel.deb scummvm_0.13.1_armel.deb N/A
1.0.0 N/A scummvm_1.0.0_armel.deb N/A
1.1.0 N/A scummvm_1.1.0_armel.deb
1.1.1 N/A scummvm_1.1.1_armel.deb
1.2.0 N/A scummvm_1.2.0_armel.deb
SVN trunk (unstable) scummvm_0.9.0svn03062006_arm.deb N/A N/A N/A N/A

Beware that games saved with newer versions may be unreadable in older versions and you can have only one scummvm package installed.
Make sure you backup your saved games and ~/.scummvmrc file if you want to go back to older versions or reinstall firmware. You can also change save game path to point to your mmc card to keep them safe. On main ScummVM screen click 'Options' -> 'Paths' -> 'Save path:'.


EWE

This is just quick recompile of EWE java-like virtual machine. 1.49 binaries are here, full sources+binaries here. I don't plan any further work on this. It compiles out of box but is a bit slow and looks strange in Maemo. Even if it is GTK app, virtual keyboard does not work.



If you feel generous, found something useful on this page and want to encourage me in further work, you may consider donation. Thank you :-)