Overview
Midori is a bundle of system software
that is intended to promote the development of energy-efficient
Linux-based devices like Internet appliances.
Midori and its software development environment are based on
Open Source software
and common hardware components.
Midori has a build and package management system
that is designed for embedded software applications.
But most importantly,
Midori contains a set of enhancements to the standard Linux kernel
that will make it applicable to embedded applications.
These include:
-
an ACPI-based power management system
-
support for Crusoe processor-specific power management features
-
a Flash ROM-based filesystem
-
a RAM-based filesystem
-
a boot/runtime system that can run from Flash ROM
These enhancements are in the process of being integrated
into the standard Linux kernel distribution.
Midori is not a monolithic platform like Windows CE or PalmOS.
It isn't even as complete
as one of the commercial desktop Linux distributions
like Debian or Mandrake.
Midori is a bundle of system technology
that can be used to develop embedded products.
But to do this successfully,
you will probably need additional system software
and a more tailored GUI framework.
This chapter describes Midori and its design space.
Subsequent chapters describe the Midori build system,
the Midori package management system,
system software issues
and Midori client management.
Midori Perspectives
It helps to look at Midori from the different perspectives of the
Midori community. Each of the following groups has its own needs:
-
An OEM developer sees Midori as an enabling technology that
provides convenient and reliable operating system software for Internet
appliances. This includes a kernel, shared libraries, a network stack and
a GUI/window system.
-
An application developer sees Midori as a software platform
that provides a set of utilities and services that support modern Internet-savvy
applications for mobile users.
-
A content provider sees a Midori-based product as a target device that contains
an Internet browser with certain GUI characteristics that may need to be
considered in the design of web content. This could include different screen
sizes, touchscreen-based displays and the overall concept of mobility.
-
A network service provider sees Midori as a technology through
which it can offer more convenient network access to its subscribers.
-
A user sees a Midori-based product as a convenient and reliable
device for mobile computing. As a practical matter, users don't even need to know
that a given device is based on Midori.
Our mission is to deliver Midori technology that will be useful to
all members of the Midori community.
Midori and Internet Appliances
Midori is a software technology designed to support a new class of
devices called Internet appliances. The salient characteristics of Internet
appliances are:
-
low-power
-
fast boot process
-
limited capacity, non-volatile storage
-
Internet connectivity
-
mobility
-
ease-of-use
-
personalization
-
network-based client management
Currently, a wide range of Internet appliances are possible with Midori,
including consumer products and special-purpose devices for vertical
markets. Because Midori is a freely available software technology,
developers can modify it to suit the needs of their designs. But to help
bring focus to the concept of an Internet appliance, here are some baseline
hardware characteristics:
-
low-power x86 CPU
-
custom firmware and BIOS
-
bootable Compact Flash storage
-
2D graphics processor
-
small touchscreen-based LCD
-
sound processor
-
diskless operation
-
fanless operation
-
no external input devices
-
support for additional buttons not found on standard desktop systems
-
low memory footprint
-
wireless networking
-
standard component interfaces: USB, PCI, PCMCIA, IDE
Special Kernel Features
Most of the peripherals listed above are supported by the standard Linux
kernel or its device drivers. Midori has introduced a number of special
features that are making their way into the standard Linux kernel:
-
Because power management has not been a traditional strength of
Linux, we have made a considerable effort to support it through the
ACPI
interface.
-
Support for Crusoe-specific features.
-
The compressed memory filesystem (cramfs) increases the amount of
system software that can be stored on and retrieved from compact flash
memory cards.
cramfs supports the same semantics and APIs as any
other Linux filesystem and simplifies the process of adding other libraries,
programs and resources (including fonts, graphics, icons and other media
files). To do this, simply copy files to the runtime environment filesystem
directory. The build system will then use packcramfs to load these
files into a Flash ROM image for the target device.
-
ramfs is a RAM-based file system for storing runtime-based data.
Other Features
Midori includes a number of features that enhance usability on small
and portable devices:
-
mlconfig is a prototype Web-based client management system.
-
[fill in name] is a prototype network upgrade system.
-
MLZ package management system
-
self-contained build environment
Midori Architecture
As might be expected, the Midori architecture is very similar
to the widely-used desktop distributions
based on the Linux 2.4 software releases.
application
layer
|
browser, MP3 player, etc.
|
graphics
layer
|
XFree86 4.x
|
library &
daemon
layer
|
ACPI daemon
mlconfig daemon
PCMCIA card manager
GNU glibc and other libraries
|
Linux
kernel
layer
|
base kernel
|
kernel modules and drivers
cramfs
ramfs
ACPI
|
hardware
layer
|
RAM
|
Flash ROM
|
BIOS ROM
|
low-power
x86 processor
|
peripherals
display
power
network
|
There are, however, some important differences.
-
bootable from Flash ROM
-
diskless operation
-
script-based init
-
no login prompt
-
limited set of utilities
Midori has a boot process that has been streamlined
to meet the needs of small devices.
In practice, this means that Midori has a specially configured Linux kernel
that uses cramfs and ramfs to boot Midori out of Flash ROM
with the assistance of an external BIOS.
Midori also replaces the standard Linux init(8)
with a script-based system that uses pdksh(1).
Briefly,
here is an overview of the Midori boot process:
-
power on the system
-
CPU + BIOS interrogate system to bring up some of the system board
(not the network or the PCMCIA)
-
BIOS runs the bootloader
-
kernel is loaded out of Flash ROM by the bootloader
-
init-based boot sequence to mount root, cramfs and ramfs
-
launch applications
Application Development
As an application environment, Midori is quite different from standard Linux
desktop distributions and it is especially different from platforms
like Windows CE and PalmOS. Because Midori is an enabling technology for consumer
devices, it is left to the actual device designer to define a baseline
application support system for a specific Midori-based device.
Midori Packages
Midori is organized as a set of packages,
one of which holds a recent version of the standard Linux kernel.
Other packages hold system software that provide platform functionality
and applications that users can interact with. Midori also includes
a build system for constructing Flash ROM images of the Midori runtime
that can then be loaded into a target device and a package management system
for adding applications or device drivers.
Midori also includes a few critical build tools like gcc and binutils.
The table below describes the major packages included with Midori:
| operating system |
system: |
|
| Linux kernel |
|
| cramfs:
filesystem
bootloader
configuration utility
upgrade system
packcramfs |
(Midori) |
| ramfs |
(Midori) |
| pdksh |
|
| busybox |
|
| log daemon |
(Midori) |
startup and runtime scripts
(init(8) replacement) |
(Midori) |
| debug support: |
|
| ltrace |
|
| strace |
|
| libraries: |
|
| glibc |
|
| ldconfig |
|
| zlib |
|
| popt command line parsing library |
|
| audiofile library |
|
| network: |
|
| net-tools |
|
| inet utilities |
|
| ppp |
|
| pppoe (PPP over Ethernet) |
|
| pump DHCP client |
|
| devices: |
|
| wireless tools |
|
| hwclock |
|
| touchscreen utility
(MK712 driver only) |
(Midori) |
| usbutils (debug) |
|
| PCMCIA card services |
|
Note: Midori depends on Linux and XFree86 for
device driver support of standard hardware components. In some cases, the
Midori team has submitted new or modified device drivers to the core
Linux distribution.
|
|
| audio: |
|
| tplay sound utility |
|
| aumix sound control utility |
|
| esound server utility |
|
| |
|
|
| GUI/window system |
XFree86 |
|
| GTK+/glib |
|
Microsoft Truetype core web fonts
(must be downloaded separately from
http://www.microsoft.com/typography/fontpack/default.htm) |
(binary) |
| window managers: |
|
| aewm |
|
| icewm |
|
| lwm |
|
| swm |
|
| |
|
|
| applications |
Netscape |
(binary) |
| xkeyboard |
(Midori) |
| xbutton |
(Midori) |
| rxvt xterm client (debugging tool, requires ncurses) |
|
| vim (debugging tool) |
|
| |
|
|
| client management |
mlconfig |
(Midori) |
| network upgrade system |
(Midori) |
| |
|
|
| build system |
GCC |
|
| binutils |
|
| MLZ package management system |
(Midori) |
| |
|
|
FAQ
Q: How can I hack on the kernel?
A: The source code for the Midori kernel is in the subdirectory
cache/build/linux. This source code has been substantially modified
from the Linux 2.4 distribution.
Q: How can I use gdb?
A: The Midori build system doesn't support remote debugging with
gdb. Use ltrace and strace instead.
Q: It crapped out before it finished building, but whatever went
wrong scrolled by too quickly for me to catch.
A: Run your make command with the script(1)
terminal session logger:
% script
% make
% exit
This command sequence will send all the diagnostic output to the file typescript.
Q: This build process is righteously hosed. How do I force it to
rebuild everything?
A: Rebuilding everything takes a very long time, because everything
includes gcc, glibc, and X. To do this, type make distclean. However, if
you do not want to build those three packages, just run make clean.
This will let you rebuild much faster.
Q: It's printing out tons of debugging messages. Make it stop!
A: Use Webconfig to turn off the debug options.
Q: Something is completely screwed here.
A: Set DEBUG=yes in config and try again. This will
print out what's happening in the scripts. These scripts are as bullet-proof
as we could make them with limited time, but there are problems, and turning
on debugging can help find them. If you haven't the time to debug, then
do a make clean or make distclean and start over.
Q: What can I do about Netscape crashing?
A: Any experienced user of Linux Netscape is used to seeing it crash
and the included version of Linux Netscape is no exception. This is probably
not good, but the product does not come with source code. The workaround
is to run Netscape in a loop.
Q: How does Midori provide support for disaster recovery?
A: Midori has several provisions to aid in disaster recovery.
First, a Midori Flash ROM image includes two identical root
(system software) directories.
This provides a backup Linux kernel that can take over if the primary Linux kernel
becomes damaged.
Second, Midori provides a persistent storage mechanism
that enables Internet appliances to store important information
like user preferences in Flash ROM.
Finally, Midori supports selected updates
of compressed system software on Flash ROM.
This enables Internet appliance developers to design
an efficient and crash-proof software update strategy.