x
Loading
 Loading
Hello, Guest | Login | Register

Down Memory Lane, Part One

Most embedded devices boot from flash memory and have data resident on flash-based storage. Here’s how to use flash devices while embedding Linux.

Today, Linux has penetrated the embedded market and is no longer just a desktop operating system. Linux avatars manifest in personal digital assistants (PDAs), music players, set-top boxes, cell phones, stereo components, and even medical-grade devices.
When you flick the power switch of such a self-contained device, it’s more than likely that it boots from flash memory. Moreover, when you click some buttons to save data, it’s also highly likely that your data is persisted in flash memory.
The Memory Technology Devices (MTD) subsystem of the kernel interfaces your system with the various flavors of flash memory found in portable devices. In this month’s “Gearheads” column, let’s use the example of a Linux handheld to learn about MTD.

The Linux Memory Technology Devices Subsystem

Flash memory is rewritable storage that doesn’t need a power supply to retain information. Flash memory banks are usually organized into sectors, and unlike conventional storage, a write to a flash address must be preceded by an erase of the location. However, erases can be performed only at the granularity of individual sectors.
Given its properties, flash memory is best used with device drivers and filesystems that are specially-designed to suit it. The kernel’s MTD subsystem provides support for flash and similar solid-state storage.
The Linux MTD layer, shown in Figure One, consists of the following:
*The MTD core, which is an infrastructure consisting of library routines and data structures used by the rest of the MTD subsystem;

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Titanium 1.0: The "App for Building Apps"?
  2. Custom Controls for the iPhone
  3. Dumping WYSIWYG: Building Android User Interfaces at Run Time
  4. Linus Declares the Google Nexus One a "Winner"
  5. Writing "C" Code for Android
Follow Linux Magazine
Rackspace