Article: Details emerge on Transmeta’s “Mobile Linux”
Feb 2, 2001 — by Rick Lehrbaum — from the LinuxDevices Archive — viewsHenry Kingman, senior producer of ZDNet's Linux Resource Center, attended a session at LinuxWorld Expo in New York and filed this report . . .
Buried in one of the technical sessions in the basement at Linuxworld came a low-key pre-announcement of the first public availability of “Mobile Linux,” a quasi-distribution and embedded Linux development toolkit that Linus Torvalds and other Transmeta employees have been working on for several years. “It's very close,” according to Dan Quinlan, a Linux developer at Transmeta.
Stricly speaking, “Mobile Linux” isn't a distribution since it lacks the large applications and out-of-the-box experience of typical distros. Still, for embedded developers and technical hobbyists, it stands to make reasonably capable Linux systems significantly easier to create on resource-constrained devices.
Not surprisingly, Mobile Linux is especially well-suited for use with Transmeta hardware, and despite the current lack of public availability, several commercial vendors have already shipped products based on it. One example is the Gateway Connected Touchpad currently shipping for around $500. Other parts of Mobile Linux, such as the cramfs, have been publicly available for some time, and have found their way into several distributions of Linux for PDAs.
Particularly impressive is the ability of Mobile Linux's cramfs to squeeze a more or less normal Linux system, complete with glibc, other libraries, the kernel and even the X windowing system into a paltry 8MB. This leaves plenty of room on the typical 32MB or 64MB storage devices used in embedded systems for applications such as Web browsers and mp3 music systems.
Cramfs saves space by optimizing inode table size and eliminating the space wasted between files in traditional filesystems. It also uses zlib compression for a better than 2-to-1 compression rate. The overhead for decompression is not especially bad because cramfs allows decompression of arbitrary blocks, rather than entire files, a function that the Linux kernel is able to exploit.
In addition to saving space, cramfs saves the appliance enduser from the prospects of waiting for fsck or worse, having to perform fsck manually after an abnormal termination. It does this by being read-only. This limitation makes some sense since flash ROM can withstand only a few hundred thousand write cycles. It could also be a security advantage in many circumstances. Still, an ongoing project is to incorporate compression into a journaling file system such as reiserfs which could be useful in some applications.
Another key to space savings is the use of BusyBox, a single executable offering lite versions of lots of standard Unix commands. Busybox will be familiar to those who have played around with floppy disk-based Linux routers, rescue disks and the like, but most users would find its utilities pretty limited.
Configuration and other data that must persist across reboots is first saved to a temporary filesystem built in RAM on a “ramfs” filesystem, another bit of Torvalds handywork. “Linus was on a filesystem spree there for a while,” according to Quinlan. When it's time to commit ramfs to persistent storage, a utility called packramfs is called to stuff it into the cramfs filesystem. The ramfs is similar to a RAM disk, but supports file “limits” so that it can be prevented from overrunning available RAM space.
To better support incremental system updates via modem, packramfs can work in a kind of partitioned manner, writing to cramfs in discreet segments. Under development is a journaling feature for packramfs that would allow the equivalent of an ftp “reget” in the case of a dropped connection, so that downloading could resume where left off. In a nod toward dependability, Mobile Linux is configured with a redundant root filesystem to better tolerate faults in the storage media or update process.
Together, Quinlan reckons that cramfs, ramfs and packramfs comprise an “elegant” solution for embedded developers wishing to optimize boot time, resource usage and robustness. “[Transmeta is not] per se a Linux company — we don't sell it as a product — but we try to add cool stuff to Linux that we see as missing.”
Another ongoing project is a minimalist BIOS that does nothing but boot the Linux kernel, which is itself already capable of performing essentially all the functions of a modern BIOS. Such a BIOS could cut boot time substantially.
At present, about 60 packages are available for Mobile Linux if you count those comprising the build system itself. Mobile Linux “packages” are distributed as pristine upstream source with a patch to optimize for size. The packages are meant to be built on a separate system and installed as binaries on the embedded device, so the build environment comes with all needed libraries and the resulting binaries are distribution-independent. Transmeta based its early work on Debian's “Potato” release, and continues to include Debian in its test builds.
Mobile Linux includes XFree86 version 4.x rather than the frame buffer solutions used by many embedded devices. X's modular design saves space, according to Quinlan, and more importantly, frame buffer systems typically allow hardware acceleration with few if any chipsets. XFree86 4.0, by contrast, utilizes kernel-level chipset support for hardware acceleration in nearly all of today's commodity-grade graphics cards and chipsets. Systems without hardware acceleration can produce noticeably poor results when a graphical browser is used.
XFree86 4.x also integrates a TrueType font server and support for XInput, a kind of user-space input device driver for things like graphics tablets and touchscreens. Obviously, many Webpad designers would wish to include a touchscreen, probably with the option of plugging in a USB keyboard.
Not surprisingly, Mobile Linux includes a number of features that optimize it for use with Transmeta hardware. There's full driver support for devices used in Transmeta-based products and a utility to tweak the settings of the LongRun power management system of Transmeta's Code Morphing Software. According to Quinlan, “We want to help developers build cool stuff, and obviously we want to make sure Linux works well on Transmeta hardware.”
What companies are working with Mobile Linux to produce cool products that run Linux? According to Transmeta CEO Dave Ditzel, “[There's the] stuff we showed in the pictures, and if it's not announced, we can't talk about it.” Ditzel's half of the session included slides of about a dozen Webpad-like devices either currently or soon to become available.
In his closing remarks, Quinlan offered some advice for open source developers. This included the use of automated build environments such as the “Tinderbox” used by the Mozilla project. Whenever new code is submitted, builds ensue automatically on all the target platforms, and if something breaks, the developer responsible gets an email nastygram. Transmeta also automates testing: after each commit, if the build succeeds, the machine does a reboot test, launches a browser, and pulls down a Web page. Other tips included using CVS, tracking bugs and getting Q/A from people not involved as developers in the project.
If Mobile Linux ships as expected, and especially if it attracts significant attention from embedded developers, the era of the Internet appliance — so long prophesied by the likes of Larry Ellison and Lou Gerstner — might actually get a few steps closer to reality.
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.