Skip to main content

skip to main content

developerWorks  >  Linux  >

Linux on board: Linux powers Nokia 770

Development options add appeal to an "Internet tablet"

developerWorks
Document options

Document options requiring JavaScript are not displayed


Rate this page

Help us improve this content


Level: Introductory

Peter Seebach (dw@seebs.net), Writer, Freelance

22 Nov 2006

The Linux®-based Nokia 770 Internet tablet is an intriguing gadget for Linux enthusiasts. Though it lacks most of the personal information manager (PIM) apps one would expect from a palmtop-sized device, recent advances in its development environment make it a toybox for hobbyists and professional embedded developers alike.

The Nokia 770 was released to some fanfare in the Linux world. Unlike the Zaurus before it, or Pocket PC or Palm systems, the 770 does not offer personal information manager (PIM) functionality; indeed, it does not provide particularly easy access to the features that would be needed to make a PDA. Instead, it's pitched as an "Internet tablet," providing applications such as a Web browser and an e-mail client.

Nokia recently released an update to the 770's software that makes it a little more friendly to users who want to poke around on the device. In earlier releases, it was necessary to enter research and development (R&D) mode to obtain root access. Version 1.05 makes it possible to work around that more easily.

The Nokia 770 has two storage devices available, an internal flash device (formatted as JFFS2), and a plug-in card (formatted as a FAT filesystem). The 770's connectivity options are interesting. The device's default behavior when connected over USB is to serve as a mass storage device. The 770's internal storage is not exposed this way; instead, the plug-in card is made available to the upstream computer as a generic USB storage device to allow easy transfer of files. While the 770 is connected over USB this way, the card is unmounted from the 770, to prevent corruption. This is an elegant answer to the question of how to present access to the device's files.

For the most part, the device doesn't require a lot of manual configuration; it can connect to Bluetooth phones or Wi-Fi networks, either automatically or with minimal instruction. The progress that Linux-based systems have made in automatic network configuration is striking.

About that USB keyboard support

The Nokia 770's USB keyboard support is absolutely fascinating, because it's primarily a hardware hack. The problem is essentially physical; the 770's USB hardware has a plug of the sort usually used for downstream devices, and the chip it's connected to wakes up only if 5 volts of power is provided to it -- the way it would be if the device were used as a downstream machine. There is also a software problem: the machine must be configured in USB host mode, rather than USB device mode. This requires a bit of messing about with the flasher utility. Oddly, although the Nokia pages are mostly built in terms of Windows® downloads, the flasher utility is available for Mac OS X and Linux only.

But, since I'm a software guy, the part I find fascinating is the development of circuits that add 5 volts of power to a USB cable. There's a link to information about this in the Resources section, below.

An overview of the installation

The 770's installation, as is often the case for such devices, is built around BusyBox. The startup scripts are fairly standard Debian scripts, complete with README files. The interesting part is the user interface and development tools, which are a noticeable improvement over the relatively primitive environment of the Zaurus. The developer support, provided through the maemo.org pages, is fairly comprehensive. (See Resources for a link.)

And this is where the 770 departs from the previous Linux-based devices I've looked at: the developer support seems more active, and more involved. The 770 doesn't do all that many things very well out of the box (with Web browsing being a pleasant exception). However, Nokia seems to be looking at the potential for community development as a major benefit of the machine. The developer tools are being pitched towards hobbyists, not just commercial developers. The utility used to load new ROM images and set special device flags (such as the R&D mode) is available for download.

This has resulted in a fair amount of interesting development. For instance, like most tablet or PDA devices, the 770 has a significant weakness in the area of text input: even if you like the keyboard or handwriting recognition, it still chews up screen real estate, which is not cheap to come by on a device with a four-inch screen. Now, hobbyists have made Bluetooth and USB keyboards work with the device; life is good. (See the sidebar for more information.)



Back to top


Getting access

In earlier releases of the 770, it was necessary to use the flasher utility to put the device into R&D mode, then run the gainroot script. The script itself, illustrated in Listing 1, is kind of interesting.


Listing 1. The gainroot script
#!/bin/sh -e
       trap exit SIGHUP SIGINT SIGTERM
       PATH=/bin:/usr/bin:/sbin:/usr/sbin
       MODE=`/usr/sbin/chroot /mnt/initfs cal-tool --get-rd-mode`
       if [ x$MODE = xenabled ]
       then
              echo "Root shell enabled"
              /bin/sh
       else
              echo "Enable RD mode if you want to break your device"
       fi

The default sudoers file permits anyone to run this script via sudo; if your 770 is in R&D mode, you get a shell; otherwise, you get the humorous warning message.

In the more recent release, a slightly simpler option is available: you can ssh in as root. This requires you to download a third-party dropbear package, but then you just ssh in as root, with the password rootme. The widely documented default password and permitted root login make that password fairly descriptive; if you install the ssh server, change your root password. No, really. Do. One obvious solution would be to set the user password, configure /etc/sudoers, then run passwd -l root to disable root logins entirely.

The point of this digression is to establish that, while some vendors are providing minimalist subsets of Linux, carefully crippled and protected, Nokia is barely stopping short of waving a compiler in your face. This device is, at the moment, not a mass-market consumer item for most people; it's a toybox. There's something really nice about finding a fairly full-featured Linux on a tiny little device.



Back to top


Desktop cruft

The install on the 770 has never quite decided whether it's an embedded system or a full-fledged desktop Linux. Earlier releases provided a system image in which the installed files were not controlled by the package management system; in the release I looked at, the package manager comes with over 900 packages, some more optional than others, as shown in Listing 2.


Listing 2. The beginning of a very long list
# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  adduser        3.51           Add and remove users and groups
ii  apt            0.6.42.3osso13 Advanced front-end for dpkg
ii  archtunjo      0.0.8-4        the D-BUS wrapper for games
ii  autoipd        0.9.6-1osso9   Autoipd from Howl
ii  base-files     3.1.osso2      Debian base system miscellaneous files
ii  base-passwd    3.5.7.osso1    Debian base system master password and group
ii  bluez-utils    2.25-cvs200605 Bluetooth tools and daemons

This sets the stage for a more flexible install, in the event that you would want to make room to install additional files -- not that the system is likely to run out of room quickly. The bulky files that generally fill portable gizmos are likely to live on the removable card rather than in main storage, anyway.

Presumably, a bit of work could have stripped out a few programs or scripts that aren't doing much; for instance, the glibc.sh script that warns about glibc compatibility requirements on AMD64 systems is, unsurprisingly, totally unused. (It does actually have some marginal reference to ARM systems; they need kernel version 2.4 or later. The 2.6.16 kernel in the release I examined is probably fine.) Still, every system I've looked at has some stuff like this; in practice, it's probably not worth the hassle of trying to track it down to remove it.



Back to top


Development

The software development environment for the 770 is something new, although an end user of the 770 wouldn't see this, as the development tools are not actually loaded on the device but rather run on a workstation or PC. About three years ago, I wrote about cross-compilation for the Sharp Zaurus (see Resources for a link). The process was fairly involved. The 770 uses a new cross-compilation setup called Scratchbox, development of which was sponsored by Nokia. This is a substantial improvement, providing an environment in which target-system binaries are run (in emulation) during cross-development. The net result is that all the hassles and confusion of outsmarting poorly-written portability tests are gone; you get the performance of the host system (including, presumably, native execution of the compiler toolchain), and the behavior of the target.

These tools, while clearly still in development, appear to be stable and functional, and actively maintained. This may have lasting effects on the way tools are developed for a variety of other systems. Furthermore, a good cross-compilation environment, without some of the quirks of the more conventional sort, helps reduce the inconvenience of a machine that frankly hasn't got the memory or CPU to do large software builds.



Back to top


The inevitable comparisons

The 770 shows some of the influences and lessons learned from the Zaurus. I noted above the lack of a physical keyboard, but this has attracted a lot of outside development effort. More subtle is the amount of available memory; while the 770 has more than some previous devices, it runs out fairly easily. Even a small amount of additional memory would help a lot. On the other hand, full screen video playback is quite the thing, and that it can be done at all is rather impressive.

The 770 doesn't have the expansion options that some PDA-type devices do, with both CompactFlash and Secure Digital card slots. Its single expansion slot uses a reduced form factor SD card, which admittedly fits quite nicely in a very crowded case. On the other hand, very few PDAs can be configured to work as USB host devices; if you're willing to put in the time and effort, the 770 can use USB hard drives.

Because it's the size of a handheld, the 770 gets compared to various palmtop devices. The 770 isn't a PDA. It's an Internet widget. The provided version of the Opera Web browser is exceptional for a handheld device. It doesn't have the PIM apps that users would expect from a PDA, but many devices that are designed as PDAs are used primarily for other applications, such as Web and e-mail access. In many cases, the 770 does an excellent job of replacing those, although better keyboard support -- for conventional IR keyboards, for instance -- would have been nice.

Nokia has put some effort and thought into making the 770 friendly to hobbyists and hackers, but the default install doesn't contain any kind of shell; this is a noticeable difference from, say, the Zaurus. The presented interface is more like a simplified Internet kiosk than a desktop workstation. Like the TiVo, the 770 doesn't require that you know or care that you're running Linux to make effective use of its basic features. Unlike the TiVo, it welcomes you to make use of Linux to add your own features.



Back to top


Where are they going with this?

In researching this article, I read a lot of reviews of the 770, and my impression is that a lot of people are not quite sure what it is. For as much as everyone said they wanted a tablet-based Web browser, a lot of people are unsure what to do with it.

The 770 shines as a device for looking things up on the Web, given Wi-Fi or Bluetooth access. It also has great potential as a development target for custom applications; for instance, it would make an excellent wireless sniffer.

Despite any uncertainty as to the 770's intent, Nokia has been doing some significant research; they developed an entire, new cross-compilation architecture that is most visibly used with the 770. The developer-friendly environment seems to have brought a lot of casual hackers into the field, and the feedback and patches these developers generate will certainly improve the development environment. Even if it isn't all that successful directly, the 770 is contributing substantially to the world of embedded Linux development, and may make future Linux-based devices better and less expensive as a result.



Resources

Learn

Get products and technologies
  • Visit the Nokia 770 Internet Tablet home page to learn more.

  • Order the SEK for Linux, a two-DVD set containing the latest IBM trial software for Linux from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere®.

  • With IBM trial software, available for download directly from developerWorks, build your next development project on Linux.


Discuss


About the author

Author photo

Peter Seebach has been using computers for years and is gradually becoming acclimated. He still doesn't know why mice need to be cleaned so often, though.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top


DB2, Lotus, Rational, Tivoli, and WebSphere are trademarks of IBM Corporation in the United States, other countries, or both. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.